Repository navigation
perf(trie): backport reth#27129 overlay storage roots and historical proofs - #11
Closed
sebastianst wants to merge 2 commits into
Closed
sebastianst wants to merge 2 commits into
sebastianst wants to merge 2 commits into
Conversation
…aradigmxyz#27129) (cherry picked from commit 835e428)
Pin that `OverlayStateProvider::storage_root` reads trie nodes through the overlay when partial persistence leaves database storage-trie nodes older than the persisted hashed storage. OP Stack consensus depends on this: the Isthmus withdrawals root is the L2ToL1MessagePasser storage root, computed through `storage_root` when building and validating blocks. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
sebastianst
force-pushed
the
seb/overlay-storage-root-nodes
branch
from
October 1, 2026 08:47
32c0cd2 to
339cb63
Compare
This was referenced Oct 1, 2026
Member
Author
|
🤖 Opus 5.5 says: Superseded by Josh's pin branch |
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 upstream reth#27129 (
835e42864d, first released in v2.7.0) onto the v2.6.0 pin, plus a regression test for the OP-critical case.Bug: under state masking (on by default since v2.6.0),
OverlayStateProvider::storage_root,storage_proofandstorage_multiproofwalked the database storage trie and ignored the overlay's trie nodes. Masking leaves database nodes older than the persisted hashed storage, so siblings outside the prefix set were hashed from stale values.storageRootvalues frometh_getAccount.withdrawalsRootis the L2ToL1MessagePasser storage root, which op-reth computes this way when building and when validating blocks (rust!: update reth to v2.6.0 optimism#23046).reth#27129 passes the full trie input through
DbStorageRoot::overlay_rootandoverlay_storage_multiproof. It also completes the overlay up to the Finish block before building historical proofs, which fixes proofs and witnesses over masked rows, and it skips loading trie changesets when only roots or proofs are needed. It applies cleanly to4553cf1cab.Test: the second commit adds
storage_root_over_masked_state_trie. It fails on4553cf1caband passes with the backport and on v2.7.0.reth-storage-overlay,reth-trie-dbandreth-providerpass (342 tests), and nightly clippy and fmt are clean.The backport drops out at the next pin bump to v2.7.0 or later. The test is worth proposing upstream.
🤖 Co-created with Claude Opus 5.5