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

fix(mempool): nonce ordering #450

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

fix(mempool): nonce ordering #450

wants to merge 1 commit into from

Conversation

Trantorian1
Copy link
Collaborator

Pull Request type

  • Bugfix

What is the current behavior?

Transactions added to the mempool are not ordered by Nonce and will not wait for previous nonces. This is an issue as it will lead to valid dependant transactions from the same account being rejected if ever they are received out of order, which can happen due to network latency for example.

Resolves: #442

What is the new behavior?

Transactions in the mempool are now ordered by readiness. A transaction is ready if its nonce directly follows that of the previous nonce for that account, as stored in db. Otherwise, a transaction is marked as pending. Pending transactions are still subject to removal due to their age.

Does this introduce a breaking change?

Yes. The database schema has been updated to store mempool transaction readiness. This does not affect full nodes but will pose problems if migrating a sequencer or devnet node.

@Trantorian1 Trantorian1 added bug Something isn't working sequencer The label for sequencing related issues labels Jan 1, 2025
@Trantorian1 Trantorian1 self-assigned this Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sequencer The label for sequencing related issues
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

bug(mempool): correctly handle tx from same account
1 participant