fix(txpool): reload queued senders on USDC storage changes - #485
Open
Kewe63 wants to merge 1 commit into
Open
Conversation
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.
Summary
Closes #381
Fixes queued transaction reloads when a block mutates a sender's USDC predeploy balance. Previously, txpool maintenance only marked senders dirty when their native account state changed, so USDC-only balance slot updates did not cause queued transactions to be re-evaluated.
Changes
crates/transaction-pool/src/maintain.rs— add a hook extension point for queued senders affected by off-account state updates and invoke it after commit/reorg updates.crates/seismic/txpool/src/maintain.rs— detect changed USDC balance storage slots and mark matching queued senders dirty.crates/seismic/txpool/src/maintain.rs— add regression tests for filtering affected queued senders and unioning old/new state changes across reorgs.How to Test
cargo +nightly fmt --all --check cargo +1.88.0 test -p reth-seismic-txpool cargo +1.88.0 check -p reth-transaction-pool -p reth-seismic-txpool cargo +1.88.0 clippy -p reth-seismic-txpool --lib --no-deps -- -D warnings -W clippy::unwrap_used -W clippy::expect_used -W clippy::indexing_slicing -W clippy::panic -W clippy::unreachable -W clippy::todoResults:
reth-seismic-txpooltests passed: 33 passedCompatibility
No consensus, state format, wire protocol, or API compatibility impact.
Checklist
Risk & Impact
Low-to-medium. The change affects txpool maintenance only and limits reloads to queued senders whose USDC balance storage slot changed. No consensus, state format, wire protocol, or API compatibility impact.
Type: 🐛 Bug fix
Closes: #381