Repository navigation
feat(txpool): add --txpool.enforce-tracked-nonce (backport of #28526) - #47
Merged
joshklop merged 1 commit intoNov 20, 2026
Conversation
Co-authored-by: raz-glm <178501331+raz-glm@users.noreply.github.com> (cherry picked from commit 3e88af4)
joshklop
force-pushed
the
joshklop/op-v2.7.0-enforce-tracked-nonce
branch
from
November 20, 2026 20:38
d6e407a to
34f8e37
Compare
joshklop
changed the base branch from
op-v2.7.0
to
joshklop/op-v2.7.0-deny-advisories
November 20, 2026 20:38
bitwiseguy
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports paradigmxyz#28526 onto
op-v2.7.0, for the nextop-v2.7.0-<n>tag. It tracks ethereum-optimism/optimism#24321.Stacked on #48, which fixes the
lint-denyfailure that now hits every PR intoop-v2.7.0, so this PR's CI can go green. Review only this PR's own commit. When #48 merges, GitHub deletes its branch and retargets this PR toop-v2.7.0.What
Cherry-picks
3e88af42a04264f1ad32d1bde14f67025de152bewith-x. It applied cleanly onop-v2.7.0-1(ed91041f36b973eda3521ff90b3a25165087c133), the current branch tip.--txpool.enforce-tracked-nonce, off by default, andDefaultTxPoolValues::with_enforce_tracked_nonce.TxPoolArgs::pool_confignow readsenforce_tracked_noncefrom the flag. Before, it always tookPoolConfig::default()'sfalse.PoolConfig.Why
The guard (
PoolConfig::enforce_tracked_nonce, paradigmxyz#26981) is already on this branch. But without this flag, the only way to turn it on is to replace the pool builder.An OP Stack sequencer with 1 s blocks hit the race the guard closes. The validator reads the sender's nonce outside the pool lock. When nonce
N+1is validated just before the block that minesNis committed, the pool records the stale nonceN, sees a nonce gap, and queuesN+1. Nothing promotes it until the sender's account changes again. It happened 3 times in about 17k transactions, each time holding the transaction for 5–10 minutes. With the guard on, the pool uses its tracked nonce, which is newer, andN+1goes to pending.Not included
This picks a feature, not a fix, so it runs no forward sweep. #44 swept up to its own tip, and the next sweep is planned for a later tag. No upstream release contains paradigmxyz#28526 yet, so it has to be carried onto the next
op-*branch too.Testing
cargo test -p reth-node-core --lib args::txpool: 6 passed, including the newtxpool_enforce_tracked_nonce_reaches_the_pool_config.cargo +nightly-2026-07-14 fmt --all --checkpasses.Merging: after #48 lands and this PR is retargeted, squash-merge it, keeping the
(cherry picked from commit 3e88af42…)line in the message, which the next update's carried-patch audit reads. The squash then contains only this backport, with no rebase or push needed. A rebase-merge would replay #48's commit too.🤖 Generated with Claude Code