Repository navigation
rpc: expose block replay extension points - #26
Closed
einar-oplabs wants to merge 3 commits into
Closed
einar-oplabs wants to merge 3 commits into
einar-oplabs wants to merge 3 commits into
Conversation
This was referenced Oct 26, 2026
einar-oplabs
changed the base branch from
op-v2.6.0
to
einar/reth-compression-security-485
October 27, 2026 01:16
einar-oplabs
changed the base branch from
einar/reth-compression-security-485
to
op-v2.6.0
October 29, 2026 17:18
einar-oplabs
changed the base branch from
op-v2.6.0
to
einar/reth-compression-security-485
October 31, 2026 01:53
einar-oplabs
changed the base branch from
einar/reth-compression-security-485
to
op-v2.6.0
November 1, 2026 16:18
This was referenced Nov 1, 2026
einar-oplabs
marked this pull request as ready for review
November 2, 2026 04:12
Moves the debug_traceBlock*, debug_traceChain and debug_intermediateRoots loops out of DebugApi, and the trace_* block loop out of Trace::trace_block_until_with_inspector, into defaulted Trace methods, and adds Trace::inspect_canonical_transaction_in_block for replaying the signed transaction recorded at an index. Canonical and unvalidated block tracing are separate methods so a downstream block executor only sees blocks the node validated. The loop bodies move verbatim and Ethereum behavior is unchanged; seven standard tests pin the moved loop against alloy-evm's tracer, including callback errors, inspector handoff and the truncation on a failed transaction. The trace context mirrors upstream main: a borrowed `ResultAndState`, the database and an owned per-transaction inspector that `take_inspector` consumes, with `inspector_setup` invoked once per transaction. BREAKING CHANGE: explicitly typed block-trace callbacks import `TracingCtx` from `reth_rpc_eth_api::helpers::trace` instead of alloy-evm, read `ctx.result.result` and `ctx.result.state`, and `take_inspector` takes the context by value. Also keeps the fork's required check green on op-v2.6.0: compatible lockfile patch releases for libz-sys, rustls-webpki, tokio, webpki-root-certs, webpki-roots and zstd-sys; documented deny.toml ignores for the zstd advisories pinned by reth-core 0.7 and for crypto-bigint RUSTSEC-2026-0387; the docs build pinned to the nightly the book job installs; and real Git checkouts for the compact job under act. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
einar-oplabs
force-pushed
the
einar/rpc-replay-hooks-485
branch
from
November 2, 2026 04:28
6edc1bd to
e6d32dc
Compare
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Author
|
Superseded by the executor routing approach in paradigmxyz#28266 |
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.
Related to ethereum-optimism/protocol-team#485. Exposes replay hooks so downstream executors can apply transaction settlement while canonical and diagnostic block tracing retain distinct policies. Ethereum keeps its existing EVM and BAL behavior. Builds on George’s extension-point work in #25 as an independent replacement PR. Proposed upstream as paradigmxyz#28233, ported to main on evm2 types, and this PR now mirrors that shape so the eventual move to a release containing the upstream hooks is small:
TracingCtxholds a borrowedResultAndState, the database and an owned per-transaction inspector thattake_inspectorconsumes,inspector_setupruns once per transaction, canonical and unvalidated block tracing are two methods, and the canonical transaction hook returns the same tuple asinspect_transaction_in_block. The remaining difference from upstream is the revm versus evm2 type names.Targets
op-v2.6.0directly. The compression security backport (#27 and ethereum-optimism/reth-core#1) is no longer part of this change. To keep the fork’s cargo-deny gate green on this release line, the lockfile takes compatible patch releases for the advisories that have them (libz-sys 1.1.31, rustls-webpki 0.103.16, tokio 1.53.3, webpki-root-certs 1.0.10, webpki-roots 1.0.10, zstd-sys 2.1.2), anddeny.tomldocuments ignores for the ones op-v2.6.0 cannot fix: zstd 0.13 and zstd-safe 7 are pinned by reth-zstd-compressors 0.7, whose patched releases need reth-core 0.8 and Rust 1.96, and crypto-bigint 0.5 has no patched release compatible with elliptic-curve 0.13. op-reth and op-reth-premium already resolve the same zstd and crypto-bigint versions. The Rust 1.95 minimum is preserved.BREAKING CHANGE: explicitly typed block-trace callbacks must import
TracingCtxfromreth_rpc_eth_api::helpers::traceinstead of alloy-evm, readctx.result.resultandctx.result.stateinstead ofctx.resultandctx.state, andtake_inspectortakes the context by value. Canonical transaction tracing has a separate hook, so the existing supplied-environment helper keeps its contract.Replay coverage uses seven standard Rust
#[test]cases intrace/replay_tests.rs, included fromtrace/mod.rs, with a shared parity assertion helper. No test framework is added. The compact job uses real Git checkouts underact, preserving generated vectors while removing source files deleted between revisions.Validation: the CI invocation
cargo deny --log-level warn --all-features check all(cargo-deny 0.20.2) passes locally on470cfb96. The RPC sources are unchanged fromd87b1bb0, on which every functional CI check passed. The final commit pins the docs build to the nightly the book job already installs, adapted from upstream paradigmxyz#28220, because the unpinnedcargo +nightlypicked up the 2026-11-01 nightly that fails to compile boa_engine (rust-lang/rust#165263). All 30 checks passed on831e5742before the API alignment, including the cargo-deny gate and the book build. The branch is one signed commit,e6d32dc3, with the same tree as the previously pushed6edc1bdb, plus a merge ofop-v2.6.0after #30 landed, so the diff against the base is now the RPC change alone; all 30 checks passed one6d32dc3and CI on the merged head is in progress.Consumer: ethereum-optimism/optimism#23670, pinned at this head. Replace temporary source revisions with the validated merged fork tag before landing consumers.
ethereum-optimism/optimism#23795 adds opt-in
check-lagoon sdm rpcdetection against canonical receipts and transaction-boundary state; it does not fix clients. Correct receipts and balances alone do not establish tracing correctness. Release-artifact replay validation, including JS-tracer parity and coverage skips, remains outstanding.