Repository navigation
op-reth: pin the executor-routing reth fork and lock SDM-settled RPC replay - #23942
Conversation
…replay Pins reth to the fork tag op-v2.6.0-4, which replays every block transaction through the block executor (ethereum-optimism/reth#37, a backport of paradigmxyz/reth#28266), so debug, trace and otterscan replays report SDM-settled gas and balances with no override in op-reth. Related to ethereum-optimism/protocol-team#485. Adds the integration tests that pin the behavior on a sequenced Lagoon block with refunded, unrefunded, refund-dependent and reverting transactions: per-transaction gas against receipts, prestate and parity state diffs against `debug_accountAt`, intermediate roots per boundary, the post-exec transaction as a replay target, a synthetic call at an index that earns no refund, call-many on the settled prefix, `trace_filter`, `traceChain` with its per-block error shape, and otterscan revert data. Raw blocks trace with settled gas, and a raw block the executor rejects returns the executor's error. An alloy-op-evm unit test pins that a Verify-mode result is settled before commit with an inspector enabled. Shared fixtures and node helpers live in the Lagoon fixture module. The reth update guide documents the carried patch and the fork tagging rules. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
4e5f2f1 to
72603ef
Compare
…tures Turns `rpc_replay_settlement` into a directory module with the sequenced block in `fixture.rs` and one file per family: debug tracers against receipts and committed state, parity replays and `trace_filter` against `debug_accountAt`, synthetic calls on the settled prefix, the post-exec transaction as a no-op target with intermediate roots, `traceChain`, otterscan and affordability. Each test fails on its own family. Fixture fixes from review: the raw block's transfer and deposit target an EOA instead of the ecrecover precompile; the executor-rejection test matches the call error's message rather than its `Debug` rendering; the post-exec entry of a block trace is asserted at receipt gas; `eth_callMany` surfaces the response error before reading the value; `traceChain` derives its window from the fixture; the transaction count follows `POST_EXEC_INDEX`; the no-op `no_tx_pool` assignment is gone. The alloy-op-evm unit test now compares a Verify-mode result with a Disabled-mode run, so it proves the refund and the saved operator fee are credited before commit. The update guide names `v2.7.0` through `v2.8.1` as the alloy-evm 0.39 bases. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
GPT-6.1-Sol (xhigh): Reviewed at Checked the fork’s production changes, settlement behavior, deposit handling, and regression coverage. Validation:
|
|
Claude: Summary for the inline review above, run at Overall: no blockers. The pin is a strict extension of Comments this change makes wrong (outside the diff):
Behaviour change worth noting: Pre-existing, not from this PR:
Possible follow-ups on the fork:
|
The debug tracer assertions now check what the tracer saw, not only the settled result it was handed: every deployment steps through its init code, only the reverting one fails, and the call frame is from the sender. The synthetic-call refund check runs at a refunded slot, where a leaked refund would show as gas below the intrinsic cost. A rejected bad block is traced through `debug_traceBadBlock` and fails with the executor's reason, and `traceChain` anchors its first trace to the settled deployment gas. The alloy-op-evm Verify-mode test sends calldata so an operator fee is charged at all, asserts the saved fee, and rewards a beneficiary distinct from the sender, so the sender delta no longer nets a zero priority leg by coincidence. Also names the fixture's transaction indexes, uses `TRANSFER_GAS` for the transfer's gas limit, matches the executor's rejection by substring, says which checks are executor-path smoke tests, points the update guide at the test directory, drops the Lagoon genesis duplicate from the derived attributes test, and corrects two alloy-op-evm comments that still described RPC replay as bare-EVM transacting. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Fable 5.1 (high): Thanks. All inline should-fixes and nits are applied in 624ea26, with a reply on each thread. On the points outside the diff:
|
The bad-block trace poll now has a ten-second deadline, the prestate-diff balance loops assert the sender's balance is present before comparing, and a `traceChain` timeout or closed subscription names the block it waited for. The prefix `debug_traceCall` probes a no-code address instead of the ecrecover precompile, and a missing sender in its prestate fails with a message. One launch helper, HTTP client accessor and signed-transaction builder in `lagoon.rs` replace the three copies across the raw-block tests, the fixture and the affordability test; a typed `call_trace` accessor replaces the raw-JSON callTracer requests; the duplicated transfer step check in the post-exec target test is gone. The alloy-op-evm `transact_raw` comment states the local invariant instead of naming a reth caller. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
GPT-6.1-Sol (xhigh): Rereviewed fce2662. No new actionable findings; previous review feedback is addressed. Reviewed the full diff and pinned reth changes. Validation passed: 14 focused integration tests and the settlement unit test. CI is green. |
The raw-block rejection test formats its expected message from the typed `BlockValidationError`, so it survives rewording and still proves which error the executor returned. `SettledBlock` derives its HTTP client from the node like it already does for WebSocket, the test launchers reduce to `launch_node` and `launch_node_with_attributes` with `sdm_rollup_args()`, and the engine test uses the shared client accessor. The node config no longer repeats the unused-ports override that `NodeConfig::test()` already applies, nor does the derived attributes test, and the launch doc no longer claims the node stops when its handle drops. The alloy-op-evm Jovian schedule lives in one `jovian_hardforks` helper shared by the fixture and the Verify-mode settlement test. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Fable 5.1 (xhigh): Reviewed 54e3691 (full diff against develop plus the pinned fork source). No correctness defects in the change; the pin is the tag resolving to reth#37's merge commit, the lockfile moves only the reth source, and every replay path the tests exercise goes through the block executor. Ten test-side and metadata notes, none blocking:
|
`SettledBlock` creates its HTTP client when the block is sequenced and hands out a reference, instead of building a new client with its own connection pool on every accessor call. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Fable 5.1 (xhigh): Reviewed a1cc642. No correctness defects. Checked against the pinned fork: the tag is reth#37's squash-merge commit with all lockfile entries moved and no stale
|
|
GPT-6.1-Sol (xhigh): Reviewed Reviewed the full diff, both added fork commits, inherited replay helpers, SDM transaction indexing and settlement, deposit handling, and the regression assertions. The fork retains all prior patches; the lockfile changes only the reth source. The final HTTP client change shares one connection pool across fixture accessors. Validation: the settlement-before-commit unit test and Previously documented inspector and call-many follow-ups remain outside this PR. Forward review covered replay-related changes in cached upstream main through |
develop now pins op-v2.6.0-4 (#23942), which carries ethereum-optimism/reth#37: RPC block replays through the block executor, which op-reth's SDM refund settlement depends on. Carry it onto op-v2.7.0 as ethereum-optimism/reth#41, stacked on ethereum-optimism/reth#40, and pin its head. Resolve the conflicts with #23942: - Cargo.toml and Cargo.lock: keep the op-v2.7.0 rev, now ethereum-optimism/reth#41's head. - UPDATING-RETH.md: keep both sides, and update "Carried patches" for op-v2.7.0: where ethereum-optimism/reth#37's carry conflicted on v2.7.0, and the trie seek boundary fix carried as ethereum-optimism/reth#40. - invalid_post_exec.rs: develop's crate::lagoon helpers in the E2ETestSetupBuilder call reth v2.7.0 needs. Adapt #23942's new tests to reth v2.7.0: trace_replayTransaction returns an optional TraceResultsWithTransactionHash, and StateProviderDatabase takes an EvmStateProvider. Advance the reth mirror tags; ethereum-optimism/reth#41 touches no mirrored symbol.
Op-reth RPC replay must report the SDM-settled gas and balances committed by block execution.
Pins reth to
op-v2.6.0-4, the merge commit of ethereum-optimism/reth#37 (backport of paradigmxyz/reth#28266). For ethereum-optimism/protocol-team#485; replaces #23670.Regression tests cover debug and parity replays, settled prefixes, refund-dependent affordability, post-exec targets, intermediate roots, traceChain, otterscan, and executor rejection of raw or bad blocks. An alloy-op-evm unit test checks settlement before commit with an inspector enabled.
UPDATING-RETH.mdrecords the carried patch and tagging rules.Pre-existing follow-ups: the default tracer reports
failed: truefor a post-exec target, and #23963 tracks the shared inspector slot. After merge, both op-reth-premium workspaces repin to the merge commit and the same tag.Breakdown
AI Reviews