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

Rollback account and discard transaction after N blocks #769

Open
SantiagoPittella opened this issue Feb 28, 2025 · 1 comment
Open

Rollback account and discard transaction after N blocks #769

SantiagoPittella opened this issue Feb 28, 2025 · 1 comment

Comments

@SantiagoPittella
Copy link
Collaborator

Related to: #607 (comment)

One potential solution is to establish a block threshold for pending transactions to be committed. During a sync operation, we can then examine the database for these pending transactions and mark them as discarded if they exceed the defined block threshold.

A block threshold should be in place, and after a sync, we can check if any pending transaction passed the threshold. In that case, the transaction should be marked as discarded and a rollback to the account should be applied.

@igamigo
Copy link
Collaborator

igamigo commented Feb 28, 2025

Adding this comment for reference here as well:

Yes, I think for now we can define a threshold of say, 10 blocks to determine whether a transaction can be marked as "stale" or discard it altogether. In the future we might want to store metadata from this transaction. For example, if we define a transaction expiration of 3 blocks, we can store it and then locally update the transaction appropriately.

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

2 participants