Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spike] Cancelling Transactions #101

Open
solanoepalacio opened this issue Sep 13, 2023 · 1 comment
Open

[Spike] Cancelling Transactions #101

solanoepalacio opened this issue Sep 13, 2023 · 1 comment

Comments

@solanoepalacio
Copy link
Collaborator

Currently we have no way of handling timeouts for a given transaction. This causes that if a transaction is submitted to a blockchain is never included in a block, then the workflow will be stucked undefinetly, never throwing a timeout error.

This causes the following issues:

  • The workflow stucked will keep a wallet busy and never release it, making one of the wallets in the pool unusable
  • The workflow stucked doesn't throw an error, and thus is harder to have visibility over the problem
  • If the pod is restarted while this long living transaction is open, it will cause make the wallet un-usable because of the stucked pending transaction

The proposed solution is that it would be better to have an error than a stucked transaction. If we make the transaction throw an error, then we'll have this benefits:

  • The workflow queue and the wallet will be unlocked
  • The failed transaction can be retried automatically with a new gas configuration
  • If the transaction has been retried enough times, the error will trigger an alert for someone to solve the issue manually

A transaction can be cancelled by sending an empty transaction (value = 0) to the same rpc node, using a higher gas price.

In some ocassions this mechanism could lead to complex situations, so it's important to keep this feature behind a feature flag

@solanoepalacio
Copy link
Collaborator Author

I'm thinking that might be ideal to be able to:

  • enable/disable automatic transaction cancellation
  • request the cancel of a transaction using an api which could someday be turned into a button on the relayer operations center

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant