Skip to content

refactor(builder): use reth BlockBuilder for execution paths - #574

Open
julio4 wants to merge 1 commit into
mainfrom
refactor/blockbuilder-execution
Open

refactor(builder): use reth BlockBuilder for execution paths#574
julio4 wants to merge 1 commit into
mainfrom
refactor/blockbuilder-execution

Conversation

@julio4

@julio4 julio4 commented Aug 31, 2026

Copy link
Copy Markdown
Member

Routes all execution paths (sequencer, pool, backrun) through reth BlockBuilder/OpBlockExecutor instead of raw evm.transact() + receipt/commit logic.

Goal: use upstream execution layer to inherits any correctness fixes, features, hardforks, etc...

Copilot AI lite review requested due to automatic review settings August 31, 2026 08:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_tx to record results produced by an alloy_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

  • EthChainSpec is 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},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants