refactor(builder): use reth BlockBuilder for execution paths - #574
Open
julio4 wants to merge 1 commit into
Open
Conversation
julio4
requested review from
0x416e746f6e,
SozinM and
avalonche
as code owners
August 31, 2026 08:21
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors transaction execution in the payload builder to route sequencer/pool/backrun execution through reth’s BlockBuilder/OpBlockExecutor, aiming to rely on upstream execution correctness and hardfork behavior rather than local evm.transact() + receipt/commit logic.
Changes:
- Added
ExecutionInfo::commit_executed_txto record results produced by analloy_evm/reth block executor (including rebasing cumulative gas in receipts). - Updated payload-building execution paths to use
builder_for_next_block(...).executor_mut().execute_transaction*and commit via executor receipts. - Added tests asserting parity between raw execution and block-builder execution, and clamped Jovian DA-footprint caller budgets to block gas limit.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/op-rbuilder/src/tx.rs | Adds into_consensus_with2718 to propagate encoded+recovered txs for executor paths. |
| crates/op-rbuilder/src/primitives/reth/execution.rs | Introduces executor-based commit helper and adds parity-focused tests. |
| crates/op-rbuilder/src/builder/context.rs | Switches sequencer/pool/backrun execution to reth BlockBuilder/executor with receipt-based commits. |
| crates/op-rbuilder/src/builder/candidate.rs | Clamps DA-footprint budget passed to execution to not exceed block gas limit. |
Suppressed comments (1)
crates/op-rbuilder/src/primitives/reth/execution.rs:279
EthChainSpecis imported but not used in this test module; please remove it to avoid unused-import warnings.
use reth_chainspec::EthChainSpec;
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+3
to
+6
| use alloy_evm::{ | ||
| Database, Evm, | ||
| block::{BlockExecutor as AlloyBlockExecutor, CommitChanges, TxResult}, | ||
| }; |
Comment on lines
+266
to
+269
| use alloy_evm::{ | ||
| Evm, | ||
| block::{BlockExecutor, CommitChanges, TxResult}, | ||
| }; |
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.
Routes all execution paths (sequencer, pool, backrun) through reth
BlockBuilder/OpBlockExecutorinstead of rawevm.transact()+ receipt/commit logic.Goal: use upstream execution layer to inherits any correctness fixes, features, hardforks, etc...