fix(anvil): canonicalize eth_simulateV1 state roots - #15934
Merged
mablr merged 9 commits intoJul 29, 2026
Merged
Conversation
Build simulated roots from the recursively merged candidate state and omit deleted accounts and zero-valued storage leaves from full, incremental, and historical tries.
mablr
requested review from
0xrusowsky,
DaniPopes,
figtracer,
grandizzy,
mattsse and
stevencartavia
as code owners
July 28, 2026 13:36
…ts-used-by-eth_simulatev1
Contributor
✅ Changelog foundThe deterministic check will validate the changed entry. |
…ts-used-by-eth_simulatev1 # Conflicts: # crates/anvil/src/eth/backend/mem/mod.rs
Retain historical tombstones internally and carry storage-cleared provenance across simulated calls so deleted accounts and storage cannot be reconstructed as live state.
Collaborator
|
cyclops audit fast |
…ts-used-by-eth_simulatev1
Collaborator
|
cyclops audit fast |
State overrides could turn deleted accounts into partial overlays and reload storage from the simulation base. Preserve storage-cleared provenance across override commits and cover code-only overrides after SELFDESTRUCT.
…ts-used-by-eth_simulatev1
figtracer
reviewed
Jul 29, 2026
Empty account overrides were committed as touched accounts, changing eth_simulateV1 state roots despite requesting no mutation. Filter no-op entries after precompile move extraction and cover root parity over HTTP.
figtracer
approved these changes
Jul 29, 2026
mablr
deleted the
mablr/oss-598-canonicalize-anvil-state-roots-used-by-eth_simulatev1
branch
July 29, 2026 17:00
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.
Description
Anvil constructed simulated state roots from incomplete candidate overlays and retained zero-valued storage or deleted accounts in trie inputs, producing non-canonical headers. This recursively merges candidate and base state, applies canonical absence rules across full, incremental, and historical paths, and returns the resulting root from local
eth_simulateV1responses. Coverage includes storage updates and deletions plus LondonSELFDESTRUCTparity between simulated and mined roots.Closes OSS-598. Fork-backed root policy and broader response assembly remain in OSS-565; block transitions, blob handling, and mining finalization are unchanged.