op-reth: align the historical debug_executionWitness override with upstream (mode, by-hash, canonical witness)
Author: sebastianstCreated Sep 23, 2026Updated Sep 23, 2026
Follow-ups from the reth v2.5.2 review (#22495) on the historical-proofs debug_executionWitness override (debug.rs). All pre-date the bump.
- Mode parameter. Upstream's
debug_executionWitness(block, mode)takes an optionalExecutionWitnessMode; the override drops it, so canonical mode is silently ignored on proofs-history nodes. Mirror the signature and propagate the mode. debug_executionWitnessByBlockHash. Not declared in the override, so on a proofs-history node it falls through to the stock live-state handler. Either declare it (now trivial, the override accepts aBlockId) or drop it from the served surface likeeth_getMultiProof(#22990).- Canonical witness mode in the proofs backend.
OpProofsStateProviderRef::witnessignores its mode, always includes root nodes and returns unsorted map values. Implement canonical mode or reject it explicitly. - Non-canonical hash regression. #22495 rejects a hash that names a non-canonical block in the proofs state factory and selects the witness parent by hash; there is no end-to-end test with a fork block yet. Add one to the node integration tests.
Co-created with Claude Fable 5.1
Source: ethereum-optimism/optimism