Skip to content

Conversation

@acha-bill
Copy link
Contributor

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Cancel a tx if it's missing from the blockchain after a certain timeout—currently, 5 block times.

closes #5133

@martinconic
Copy link
Contributor

Is there a way we can test this?

@gacevicljubisa
Copy link
Member

Is there a way we can test this?

Maybe we can test it mannualy with insufficient gas, invalid signature, low nonce, or insufficient funds.

@sbackend123 sbackend123 self-requested a review August 27, 2025 07:53
@mfw78
Copy link
Collaborator

mfw78 commented Sep 19, 2025

In general, I'm not sure about this mechanism. If there has been a transaction that has been signed, and broadcast to some RPC, while that RPC may have some failures of some sort, the bee node has no way to intrinsically verify this.

As such, transactions should never be deemed "cancelled" unless in the circumstance that another transaction has been verified on chain that corresponds to the cancelled transaction's nonce.

For example, if the transaction monitor sent to the RPC a transaction, and after some time, when checking the account's nonce from the RPC it hadn't incremented (ie. the transaction hadn't been confirmed), then it seems that the "failed transaction" could instead be determined to be "stale" and the transaction monitor could simply broadcast another transaction using the same nonce (and if this subsequent transaction is verified, then the stale transaction would change state to 'dropped' / 'cancelled').

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

Successfully merging this pull request may close these issues.

When transaction is not existing (rpc issue), transaction watch doesn't delete it on time

8 participants