Skip to content

op-reth: differential test for Isthmus withdrawalsRoot under default persistence settings #23119

Open

Description

@sebastianst

No test compares op-reth's Isthmus withdrawalsRoot against an independent computation under production engine persistence settings. The review of #23046 found that reth v2.6.0's overlay storage_root computed a wrong root once state masking (now on by default) left stale storage-trie nodes in the database. Nothing failed, for four reasons:

  • Upstream never reads a storage root through a masked provider. Its end-to-end tests mostly keep the default threshold (short tests never persist), use persistence_threshold(0) (masking off), or disable masking explicitly.
  • Unit tests build state in one step, so the database trie never has the partially persisted layout.
  • Short devstack runs never hit the trigger. They don't reach a partial persistence cycle, and their L2ToL1MessagePasser storage is too small to have stored branch nodes with cached child hashes.
  • Every op-reth node shares the same code: the sequencer (evm/src/build.rs) and validator (node/src/engine.rs) both go through isthmus::withdrawals_root. An all-op-reth devstack agrees on a wrong root, and op-node doesn't check the field.

The fix (ethereum-optimism/reth#11, pinned in #23118) adds a provider-level regression test. That covers this bug, not the next change to how trie data is persisted or read.

Proposed test

  • Engine settings: run op-reth with its default engine persistence settings, masking included.
  • Length and load: well past several persistence cycles, with enough withdrawals that the message passer storage trie has stored branch nodes.
  • Shape: mix in reorgs and a restart after an unclean stop.
  • Check: assert every block's withdrawalsRoot equals an independent computation, either kona's executor over the same blocks or a from-scratch storage root over the message passer's full storage.
  • Placement: candidates are rust/op-reth/tests/proofs-style devstack tests, or an acceptance test that runs op-reth next to kona-node.

🤖 Co-created with Claude Opus 5.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions