Repository navigation
Conversation
Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
…yz#26750) Co-authored-by: Matthias Seitz <19890894+mattsse@users.noreply.github.com> Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com>
Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
…mxyz#26708) (cherry picked from commit 90ea46d)
Squash the fork CI support from 04e73b7 and push-event support from b0d194c into one replayable maintenance commit. Preserve release action pins and advisory policy when resolving the replay. Select the book build job without entering Pages deployment. Refresh the standalone lockfile to patched h2 and rustls releases instead of suppressing RUSTSEC-2026-0258 and RUSTSEC-2026-0285; rustls requires the updated AWS-LC backend. Co-authored-by: Josh Klopfenstein <git@joshklop.com> Co-authored-by: falcorocks <14293929+falcorocks@users.noreply.github.com> Maintenance CI: Compare optimism push vectors against v2.5.2, retaining actual PR and merge-queue bases.:
The RPC helpers that replay a block's own transactions (debug_trace*, trace_*, eth_callMany/debug_traceCall at an index/debug_traceCallMany, debug_intermediateRoots, ots) ran them on a bare EVM. Per-transaction logic that lives in the block executor was skipped, so on OP Stack SDM blocks traces reported pre-refund gas and unsettled balances, and the intermediate roots never reached the header's state root. Prefix replays now go through `executor_for_block`, and traced transactions run on an executor built over the inspected EVM via `execute_transaction_without_commit`. alloy-evm's `TxTracer` is replaced by an executor loop with a local `TracingCtx` of the same public shape. Ref: ethereum-optimism/protocol-team#485 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
@joshklop @sebastianst this is the reth half of the fix for ethereum-optimism/protocol-team#485. On SDM blocks, every RPC path that replays a block's own transactions reports pre-refund gas and unsettled balances, because settlement only happens in the block executor and these helpers ran on a bare EVM. Explorers and indexers ingest these numbers, so we'd like it in the op-reth release that carries Lagoon. What we need from you:
On CI: |
Collaborator
Author
|
in favour of #23 |
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.
Fixes the reth side of ethereum-optimism/protocol-team#485.
The RPC helpers that replay a block's own transactions ran them on a bare EVM, skipping per-transaction logic that lives in the block executor. On OP Stack SDM (0x7D) blocks that logic is the refund settlement, so
debug_trace*,trace_*,eth_callMany/debug_traceCallat an index /debug_traceCallMany,debug_intermediateRootsand otterscan reported pre-refund gas and unsettled balances, and the last intermediate root never matched the header.Prefix replays now go through
executor_for_block. Traced transactions run on a single executor built over the inspected EVM (Trace::inspected_block_executor) withexecute_transaction_without_commit, so tracers see the settledResultAndState. One executor replays from tx 0 because the OP executor finds each refund by the transaction's position in the block. alloy-evm'sTxTracercan't be driven by an executor (itsTracingCtxhas private fields), sotrace_block_until_with_inspectorhas its own loop and a localTracingCtxwith the same public surface; callers are unchanged.Behaviour changes:
inspect_transaction_in_blockdrops itstarget_tx_envargument and traces the block's own transaction at the index. No caller in optimism or optimism-premium.trace_block_until_with_inspectornow fails the call instead of silently truncating the results.debug_traceRawBlock/debug_traceBadBlockhit the executor's per-transaction checks (cumulative gas, DA footprint, SDM entry validation), so a block failing one of them errors instead of tracing.BlockExecutionErrorinstead offrom_evm_err, so their RPC error codes change.Rebase note for the v2.6.0 pin (#15): its BAL shortcut is fine for
replay_block_until(the cached BAL is executor-settled state). Oninspect_transaction_in_blockandspawn_replay_transaction, though, it runs the target on a bare EVM, which brings the bug back on any block with a cached BAL; a fresh executor started at the target would look up the refund at index 0. The newtrace_chain_blockthere is another bare-EVM replay to port.Regression test: ethereum-optimism/optimism#23465 (
rust/op-reth/crates/node/tests/it/debug_trace_post_exec.rs) sequences a real SDM block and checks every path against the receipt, the committed balances and the header. It fails on0fbe4285and passes with this branch.reth-rpc,reth-rpc-eth-api,reth-node-ethereumandreth-rpc-e2e-teststests pass.Fork CI:
act-lint-deny(no OIDC token under act) andact-compact.yml(the "Read vectors" step) fail the same way on #15–#17 and are not caused by this change. Locally, nightly clippy and rustdoc with-D warningsare clean forreth-rpcandreth-rpc-eth-api.🤖 Generated with Claude Code