Repository navigation
feat: add --skip-historical-state #81
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Operators using
--skip-historical-statestill get mismatches, because block and transaction re-execution traces read the same parent-block state and stay enabled. Only the call replays and the contracteth_getCode/eth_getStorageAtare gated.trace_block,debug_trace_block_by_*withprestate_tracer_opts()andtrace_replay_block_transactions(tester.rs:175-180) are not.debug_trace_transaction,trace_replayTransactionandots_*(tester.rs:401-415) are not either. Fix: gate every check that runs the EVM on, or reads accounts from, a past block, or narrow the flag's doc and README to what it skips. [also at: crates/rpc-tester/src/tester.rs:389 - Tempo operators using--skip-historical-statestill get past-block reads of untouched accounts, so the target node keeps reporting mismatches.]Why this was flagged
The trigger is a node restored from a snapshot without its history indices, which the flag's doc at main.rs:77-82 names as its target, run with
--skip-historical-state. The per-block list at tester.rs:151-181 always includestrace_block,trace_replay_block_transactionswithStateDiff, anddebug_trace_block_by_numberwithprestate_tracer_opts(). It also always includeseth_getBalanceat the tested block hash. The per-txtx_hash_callsat tester.rs:396-416 replay each transaction on its parent state, including the prestate and diff tracers. These replays load the same old, unchanged contracts that the skippedeth_call/trace_callat the parent block would load. So the history-index divergence still shows up in these traces, and the comparison still reports failures. The flag claims to skip 'anything that reads account state at a past block', but nothing in the diff guards these calls. Base behaviour is unchanged, but the flag does not give the clean run it is meant to provide.Verification: Severity: normal. On a node restored from a snapshot without its indices,
--skip-historical-statedoes not keep the comparison clean, because re-execution traces still read parent-block state. The per-block list at tester.rs:151-181 is extended with no condition (tests.extend(block_calls);at 183).tx_hash_callsat 396-416 is gated only on!self.minimal(394).