Repository navigation
op-reth: test the proofs multiproof V2 path - #23420
Closed
einar-oplabs wants to merge 1 commit into
Closed
einar-oplabs wants to merge 1 commit into
einar-oplabs wants to merge 1 commit into
Conversation
2 tasks
Contributor
|
This pr has been automatically marked as stale and will be closed in 5 days if no updates |
einar-oplabs
force-pushed
the
einar/23387-proofs-reconcile-tests
branch
2 times, most recently
from
November 9, 2026 22:30
2135d12 to
c9231e5
Compare
einar-oplabs
force-pushed
the
einar/23394-proofs-multiproof-v2
branch
from
November 9, 2026 22:30
4bbcaae to
1a32f35
Compare
einar-oplabs
changed the base branch from
einar/23387-proofs-reconcile-tests
to
develop
November 10, 2026 13:11
einar-oplabs
force-pushed
the
einar/23394-proofs-multiproof-v2
branch
from
November 10, 2026 13:19
1a32f35 to
1b2e317
Compare
einar-oplabs
marked this pull request as ready for review
November 10, 2026 13:19
einar-oplabs
force-pushed
the
einar/23394-proofs-multiproof-v2
branch
from
November 10, 2026 15:33
300c323 to
d6c5057
Compare
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
einar-oplabs
force-pushed
the
einar/23394-proofs-multiproof-v2
branch
from
November 10, 2026 15:46
d6c5057 to
d530ba4
Compare
einar-oplabs
force-pushed
the
einar/23394-proofs-multiproof-v2
branch
from
November 10, 2026 16:35
8919a7c to
ad7fa73
Compare
einar-oplabs
force-pushed
the
einar/23394-proofs-multiproof-v2
branch
from
November 10, 2026 19:04
6456ebc to
b20fb0f
Compare
Checks the V2 multiproofs of both proofs state providers against the V1 multiproofs and the tip's roots on a three-block fixture whose fillers store branch nodes the tip rewrites and whose middle block writes values the tip overwrites: V1 and V2 verify and agree for live, zeroed and unwritten slots, a destroyed account, updated and untouched EOAs and a missing account, over both store backends and six tip placements (flushed; buffered alone or with its parent; passed as trie input blocks, as trie input state with prefix sets, or as caller input over a buffered parent); the V2 payload recomputes the state root and every targeted account's storage root, its branch nodes carry the masks the fixture's blocks stored, account-only, storage-only and below-known-root target shapes are covered, and V1 and V2 agree on account info, storage roots and proof nodes. Mutations that drop the prefix-set leg, reverse the overlay merge or the buffer order, or zero the masks the cursor or the overlay return, each fail exactly the cells built to catch them. The buffered placements build their provider through a test_utils helper over the engine's buffer, whose insert and tip become pub(crate), and the store helpers the provider, overlay and proof tests share move to test_utils::proofs_store. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
einar-oplabs
force-pushed
the
einar/23394-proofs-multiproof-v2
branch
from
November 10, 2026 19:35
8dce9ea to
971c3ba
Compare
This branch was successfully deployed
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.
Covers the V2 multiproof path the reth 2.6 bump (#23046) made the default on both proofs state providers (
DatabaseProof::overlay_multiproof_v2,multiproof_v2), which reth's engine and RPC take through the proofs provider and which had no test. Closes #23394.rust/op-reth/crates/trie/src/proof/tests.rs, anrstesttable on a three-block fixture computed once per process: block 1 creates a contract, accounts, EOAs and 256 filler accounts and slots per storage trie so that stored branch nodes exist; block 2 writes the EOA and the zeroed slot with values the tip overwrites, so the tip's values show only when it is applied over block 2; block 3, the tip, destroys an account, zeroes the slot and updates the EOA.fixture_tip_rewrites_stored_branch_nodespins the property the fillers exist for: block 1 stores a branch node below the root on the EOA's path in the account trie and on the changed slots' paths in both contracts' storage tries, and the tip rewrites or removes it, so the proofs read stored and overlaid branch nodes, not leaves alone.fixture_tip_root_matches_plain_statepins the expected root to one computed from the plain state, independently of the store.fixture_tip_rewrites_second_block_branch_nodespins that block 2 and the tip both write a branch node below the root on the EOA's path and on the zeroed slot's path, which the ordering cells rely on.multiproof_v2_matches_multiproofrequests V1 and V2 proofs for the same targets (live slot, zeroed slot, unwritten slot, destroyed account, updated and untouched EOA, missing account, and all at once) and verifies each against the tip's state root and checks that the two show the same accounts, storage roots and proof nodes, over target shape {account and storage, account only, storage only, every target below the already revealed root branch} as cases, and tip placement {flushed, buffered over flushed block 2, buffered together with block 2, passed as the caller'sTrieInputwith nodes and state over flushed block 2, passed as the caller'sTrieInputover buffered block 2, passed as state and prefix sets only} and store {in-memory, MDBX} as#[values]dimensions. The V2 payload is checked directly too: its account proof nodes recompute the state root, each targeted account's storage proof nodes its storage root, every branch node on a proof path carries the masks of the branch node the blocks store at its path, and the proof below the known root is the proof from the root less the root nodes. 108 cells in a few seconds.Mutation checks: dropping the node overlay from
overlay_multiproof_v2failed the buffered and trie-input cells on V2 only; droppingprepend_selffrom the overlay provider failed the buffered cells; dropping.with_prefix_sets_mut(input.prefix_sets)fromoverlay_multiproof_v2fails exactly the state-and-prefix-sets cells; merging the caller's input under the buffer in the overlay provider'smultiproof_v2fails exactly the 18 trie-input-over-buffered cells; dropping the oldest-to-newest reversal inTrieBufferState::state_providerfails exactly the 18 buffered-with-parent cells; zeroing the tree masks of the branch nodes the proofs trie cursor returns tooverlay_multiproof_v2, or of the overlay provider's aggregated trie input, fails only the masks assertions (24 cells each, in the placements that read the mutated nodes). Seams:test_utils::proofs_store::buffered_state_providerbuffers blocks into a freshTrieBufferStateand reads them at its tip (TrieBufferState::insertandtipwiden topub(crate)and the engine's buffer modules becomepub(crate); the overlay provider gains nothing); the general proofs-store helpers (INITIAL_ANCHOR,plain_slot,hashed_slot,hashed_storage,storage_diff,seed_initial_storage,store_block,state_provider) live intest_utils::proofs_storebeside it, withdestroyed_accountskeeping the destroyed-account fixtures;rstestandalloy-rlpbecome dev-dependencies.Breakdown
AI Reviews
🤖 Generated with Claude Code