feat(kona): implement L2PayloadWitness hint for interop to support op-reth#19408
feat(kona): implement L2PayloadWitness hint for interop to support op-reth#19408pauldowman merged 27 commits intodevelopfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #19408 +/- ##
===========================================
+ Coverage 75.3% 75.5% +0.2%
===========================================
Files 194 481 +287
Lines 11285 60238 +48953
===========================================
+ Hits 8502 45512 +37010
- Misses 2639 14726 +12087
+ Partials 144 0 -144
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
ajsutton
left a comment
There was a problem hiding this comment.
Otherwise this looks pretty much right and Claude was mostly happy with it, just a few snarky comments about having too many comments and suggesting writing more tests.
9c86f41 to
01364ac
Compare
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
252442c to
9f902bf
Compare
ajsutton
left a comment
There was a problem hiding this comment.
LGTM. I don't think this was part of the change set but while you're here apparently:
- op-challenger/flags/flags.go:114 (non-blocking)
Typo: "Requires op-reth or execution client with started with" — extra "with".
If you could remove the extra with that would be great.
wwared
left a comment
There was a problem hiding this comment.
Everything looks good to me, I have a small clarifying question below
Adds support for the L2PayloadWitness hint in kona interop mode, enabling execution witness pre-fetching via debug_executePayload RPC. Changes: - Add enable_experimental_witness_endpoint flag to InteropHost config - Add ExecutionWitness and OpPayloadAttributes imports - Implement L2PayloadWitness handler with chain_id routing - Extracts chain_id from last 8 bytes (variable-length pattern) - Routes to correct L2 provider via providers.l2(&chain_id) - Calls debug_executePayload RPC with silent failure for unsupported clients - Stores witness preimages (state, codes, keys) with keccak256 keys - Add unit tests for hint data parsing and validation Follows the same pattern as single-chain implementation with multi-chain routing added for interop. All tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…flag Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Register L2PayloadWitness as a proactive hint in interop cfg.rs to match single-chain behavior - Extract parse_l2_payload_witness_hint() helper and update tests to call it directly rather than reimplementing the parsing logic Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rypoint main.rs was calling launch_with_debug_capabilities directly, bypassing launch_node_with_proof_history entirely, so the proofs-history exex and eth_getProof/debug_executePayload RPC overrides were never installed. Made launch_node_with_proof_history generic over DB to work with the bare DatabaseEnv the CLI provides. Removed --rpc.eth-proof-window from devstack since the exex override now handles all eth_getProof requests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n when not set Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ports the proof history always-on change to mixed_runtime.go (the new location after develop's devstack refactoring). Removes the ELProofHistory toggle — proof history is now unconditionally enabled for all op-reth nodes with a 10000-block window. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…roofs-history Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…able Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ully" This reverts commit c054e41004b3e9d61850e1e1bf63d246ba4df87d.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e3438eb to
5407555
Compare
startMixedOpRethNode was hardcoded so memory-all-opn-op-geth CI job (which sets DEVSTACK_L2EL_KIND=op-geth) was still running op-reth. Add startSupernodeEL helper that reads the env var and falls back to op-reth when not set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This was rebased yet again due to more conflicts and has changed slightly from the reviewed version but I'm going to merge it to avoid more rounds of conflict changes again. There needs to be more cleanup around this as we make op-reth the only option. |
…-reth (ethereum-optimism#19408) * feat(kona): implement L2PayloadWitness hint for interop Adds support for the L2PayloadWitness hint in kona interop mode, enabling execution witness pre-fetching via debug_executePayload RPC. Changes: - Add enable_experimental_witness_endpoint flag to InteropHost config - Add ExecutionWitness and OpPayloadAttributes imports - Implement L2PayloadWitness handler with chain_id routing - Extracts chain_id from last 8 bytes (variable-length pattern) - Routes to correct L2 provider via providers.l2(&chain_id) - Calls debug_executePayload RPC with silent failure for unsupported clients - Stores witness preimages (state, codes, keys) with keccak256 keys - Add unit tests for hint data parsing and validation Follows the same pattern as single-chain implementation with multi-chain routing added for interop. All tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix package reference in interop acceptance tests * feat(op-challenger): add --cannon-kona-experimental-witness-endpoint flag Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * remove redundant witness endpoint acceptance test * fix(kona): add L2PayloadWitness proactive hint and improve interop tests - Register L2PayloadWitness as a proactive hint in interop cfg.rs to match single-chain behavior - Extract parse_l2_payload_witness_hint() helper and update tests to call it directly rather than reimplementing the parsing logic Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(kona): extract preimages iterator before kv lock, add WithL2ELKind tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-reth): wire proof-history exex and RPC overrides into main entrypoint main.rs was calling launch_with_debug_capabilities directly, bypassing launch_node_with_proof_history entirely, so the proofs-history exex and eth_getProof/debug_executePayload RPC overrides were never installed. Made launch_node_with_proof_history generic over DB to work with the bare DatabaseEnv the CLI provides. Removed --rpc.eth-proof-window from devstack since the exex override now handles all eth_getProof requests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Lint fix * fix(op-reth): make supervisor URL optional, disable interop validation when not set Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(rust): apply nightly rustfmt to op-reth changes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Lint fixes * fix(op-devstack): always enable proof history for op-reth, window=10000 Ports the proof history always-on change to mixed_runtime.go (the new location after develop's devstack refactoring). Removes the ELProofHistory toggle — proof history is now unconditionally enabled for all op-reth nodes with a 10000-block window. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(op-devstack): use op-reth for all interop tests, always enable proofs-history Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-devstack): remove supervisor RPC from op-reth node startup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(op-devstack): use op-reth for supernode interop tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-node): handle reorged super authority safe head gracefully Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-devstack): skip op-reth tests gracefully when binary not available Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-devstack): revert startL2ELNodeWithSupervisor to op-geth * fix(op-challenger): clarify --proofs-history requirement in flag usage * fix(op-reth): fix imports and Cargo.toml after rebase conflict resolution * review: fail on missing op-reth binary, clarify supervisor deprecation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Revert "fix(op-node): handle reorged super authority safe head gracefully" This reverts commit c054e41004b3e9d61850e1e1bf63d246ba4df87d. * fix(kona): log info when debug_executePayload is unavailable, add tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(kona): fix import ordering from nightly rustfmt * Lint fix * fix(kona): make is_rpc_method_not_found const to satisfy clippy * fix(op-devstack): respect DEVSTACK_L2EL_KIND in supernode runtime startMixedOpRethNode was hardcoded so memory-all-opn-op-geth CI job (which sets DEVSTACK_L2EL_KIND=op-geth) was still running op-reth. Add startSupernodeEL helper that reads the env var and falls back to op-reth when not set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…-reth (ethereum-optimism#19408) * feat(kona): implement L2PayloadWitness hint for interop Adds support for the L2PayloadWitness hint in kona interop mode, enabling execution witness pre-fetching via debug_executePayload RPC. Changes: - Add enable_experimental_witness_endpoint flag to InteropHost config - Add ExecutionWitness and OpPayloadAttributes imports - Implement L2PayloadWitness handler with chain_id routing - Extracts chain_id from last 8 bytes (variable-length pattern) - Routes to correct L2 provider via providers.l2(&chain_id) - Calls debug_executePayload RPC with silent failure for unsupported clients - Stores witness preimages (state, codes, keys) with keccak256 keys - Add unit tests for hint data parsing and validation Follows the same pattern as single-chain implementation with multi-chain routing added for interop. All tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix package reference in interop acceptance tests * feat(op-challenger): add --cannon-kona-experimental-witness-endpoint flag Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * remove redundant witness endpoint acceptance test * fix(kona): add L2PayloadWitness proactive hint and improve interop tests - Register L2PayloadWitness as a proactive hint in interop cfg.rs to match single-chain behavior - Extract parse_l2_payload_witness_hint() helper and update tests to call it directly rather than reimplementing the parsing logic Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(kona): extract preimages iterator before kv lock, add WithL2ELKind tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-reth): wire proof-history exex and RPC overrides into main entrypoint main.rs was calling launch_with_debug_capabilities directly, bypassing launch_node_with_proof_history entirely, so the proofs-history exex and eth_getProof/debug_executePayload RPC overrides were never installed. Made launch_node_with_proof_history generic over DB to work with the bare DatabaseEnv the CLI provides. Removed --rpc.eth-proof-window from devstack since the exex override now handles all eth_getProof requests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Lint fix * fix(op-reth): make supervisor URL optional, disable interop validation when not set Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(rust): apply nightly rustfmt to op-reth changes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Lint fixes * fix(op-devstack): always enable proof history for op-reth, window=10000 Ports the proof history always-on change to mixed_runtime.go (the new location after develop's devstack refactoring). Removes the ELProofHistory toggle — proof history is now unconditionally enabled for all op-reth nodes with a 10000-block window. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(op-devstack): use op-reth for all interop tests, always enable proofs-history Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-devstack): remove supervisor RPC from op-reth node startup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(op-devstack): use op-reth for supernode interop tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-node): handle reorged super authority safe head gracefully Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-devstack): skip op-reth tests gracefully when binary not available Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(op-devstack): revert startL2ELNodeWithSupervisor to op-geth * fix(op-challenger): clarify --proofs-history requirement in flag usage * fix(op-reth): fix imports and Cargo.toml after rebase conflict resolution * review: fail on missing op-reth binary, clarify supervisor deprecation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Revert "fix(op-node): handle reorged super authority safe head gracefully" This reverts commit c054e41004b3e9d61850e1e1bf63d246ba4df87d. * fix(kona): log info when debug_executePayload is unavailable, add tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(kona): fix import ordering from nightly rustfmt * Lint fix * fix(kona): make is_rpc_method_not_found const to satisfy clippy * fix(op-devstack): respect DEVSTACK_L2EL_KIND in supernode runtime startMixedOpRethNode was hardcoded so memory-all-opn-op-geth CI job (which sets DEVSTACK_L2EL_KIND=op-geth) was still running op-reth. Add startSupernodeEL helper that reads the env var and falls back to op-reth when not set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Implements the
L2PayloadWitnesshint in kona's interop host, which callsdebug_executePayloadon the L2 execution client to pre-fetch execution witnesses.This provides op-reth support because otherwise
debug_dbGetis used which is not supported b op-reth.Also wires up the op-reth
proof-historyentrypoint that was previously defined but never called, and switches all interop acceptance tests to use op-reth (with proof history enabled) as the L2 EL.Changes:
L2PayloadWitnesshint handler; add--enable-experimental-witness-endpointflag to opt inlaunch_node_with_proof_historyinto the main entrypoint so--proofs-historyactually takes effect; generalize over DB type--cannon-kona-experimental-witness-endpointflag; pass it through to kona host--proofs-historyflag for op-reth, also addWithRethL2EL()preset andWithL2ELKind()option; enable witness endpoint for all kona challengers (cherry-picked from experiment: use op-reth for all interop acceptance tests #19416)NOTE this is going to need some conflicts fixed after #19252 merges (it's in the merge queue already).
Description
Tests
Additional context
Metadata
Fixes #19407