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

fatxpool: report_invalid: do not ban Future/Stale txs from re-entering the view #7777

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

michalkucharczyk
Copy link
Contributor

Description

...tdb...

Note for reviewers

When re-org is handled by transaction pool, the view for new fork (Bn') is cloned from the tip of the other existing fork (Bn). The new view is not entirely re-validated during the maintain process (it will be revalidated in the background), so it may happen that it contains transactions that are ready on (Bn) but actually are not ready on (Bn'). All required (which are expected to be in retracted set) transactions are submitted to the new view, but order of txs in ready iterator is not updated.

The proper fix would require to re-build the the iterator - which is not trivial as we do not have tags for transactions for block Bn' yet. We could force retracted txs to be before ready transactions but it also does not feel to be a good solution - it still would be best effort trial.

For now allowing future transactions to re-enter the view immediately is in my opinion a good compromise. This PR is a quick fix and actually brings back behavior of txpool from before merging #6008. The bad thing is that incorrect transactions are detected during block authorship, but this situation to happen requires some specific pre-conditions which should be rare.

If this PR is not merged, some transaction will get included into blocks, only after DEFAULT_BAN_TIME_SECS, which is pretty bad.

@michalkucharczyk michalkucharczyk changed the title fatxpool: report_invalid: do not ban Future/Stale txs from re-entring the view fatxpool: report_invalid: do not ban Future/Stale txs from re-entering the view Mar 4, 2025
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.

1 participant