Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

feat: Use alloy-evm for stateless block building#1400

Merged
clabby merged 3 commits intomainfrom
cl/alloy-evm
Apr 15, 2025
Merged

feat: Use alloy-evm for stateless block building#1400
clabby merged 3 commits intomainfrom
cl/alloy-evm

Conversation

@clabby
Copy link
Copy Markdown
Contributor

@clabby clabby commented Apr 9, 2025

Overview

Upgrades the kona-executor crate, and its consumers, to share block building logic with op-reth through the new alloy-evm + alloy-op-evm crates.

Also unblocks the upgrade of all alloy-* + op-alloy-* + revm crates.

@clabby clabby added K-feature Kind: feature A-proof Area: proof crates F-deps Flag: Updates dependencies labels Apr 9, 2025
@clabby clabby self-assigned this Apr 9, 2025
Copilot AI review requested due to automatic review settings April 9, 2025 22:05
@clabby clabby requested review from emhane and refcell as code owners April 9, 2025 22:05
@clabby clabby marked this pull request as draft April 9, 2025 22:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 79 out of 79 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (4)

crates/proof/executor/src/test_utils.rs:4

  • The FEE_RECIPIENT constant was removed and replaced by using executing_header.beneficiary; please ensure that all tests have been updated accordingly.
use crate::{StatelessL2BlockExecutor, TrieDBProvider, constants::FEE_RECIPIENT};

crates/proof/executor/src/lib.rs:19

  • The public API now exposes StatelessL2Builder instead of StatelessL2BlockExecutor; please confirm that all downstream consumers are updated to work with the new builder pattern.
pub use builder::{BlockBuildingOutcome, StatelessL2Builder};

crates/proof/executor/Cargo.toml:36

  • Dependency versions have been updated across several alloy and revm libraries; please verify that these version bumps are fully compatible with the rest of the system and that no breaking changes have been introduced.
alloy-evm.workspace = true

crates/node/p2p/src/gossip/handler.rs:193

  • The test signature type was updated from PrimitiveSignature to Signature; please ensure that this change is consistent across all tests relying on alloy_primitives.
signature: Signature::test_signature(),

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 93.64500% with 87 lines in your changes missing coverage. Please review.

Project coverage is 90.6%. Comparing base (135f967) to head (a69960e).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
bin/client/src/fpvm_evm/factory.rs 45.8% 26 Missing ⚠️
crates/proof/executor/src/builder/assemble.rs 83.5% 21 Missing ⚠️
bin/client/src/fpvm_evm/precompiles/provider.rs 86.9% 17 Missing ⚠️
crates/proof/executor/src/builder/core.rs 90.3% 8 Missing ⚠️
bin/host/src/eth/precompiles.rs 0.0% 4 Missing ⚠️
bin/host/src/single/handler.rs 0.0% 4 Missing ⚠️
crates/proof/executor/src/builder/env.rs 94.7% 4 Missing ⚠️
crates/protocol/genesis/src/rollup.rs 97.3% 2 Missing ⚠️
bin/client/src/fpvm_evm/precompiles/bn128_pair.rs 98.9% 1 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@clabby clabby force-pushed the cl/alloy-evm branch 9 times, most recently from 686db77 to 24e8393 Compare April 12, 2025 02:47
@clabby clabby requested a review from Copilot April 12, 2025 02:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 114 out of 115 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • .config/monorepo: Language not supported
Comments suppressed due to low confidence (2)

crates/proof/executor/src/db/mod.rs:104

  • The updated TrieDB::new signature now accepts a sealed header instead of an explicit root hash. Consider updating the associated documentation and comments to clarify this change for future maintainers and users.
pub fn new(parent_block_header: Sealed<Header>, fetcher: F, hinter: H) -> Self {

.github/workflows/client_host.yaml:15

  • [nitpick] Ensure that the updated block number is consistently used across all deployment and testing configurations if applicable.
name: ["OP Sepolia (Holocene) - Block #26215604"]

@clabby clabby requested a review from Copilot April 12, 2025 03:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 114 out of 115 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • .config/monorepo: Language not supported
Comments suppressed due to low confidence (3)

crates/proof/executor/src/errors.rs:40

  • Ensure that the change to BlockExecutionError is reflected across all downstream error handling code so that outdated references to the legacy EVMError type are fully removed.
ExecutionError(#[from] BlockExecutionError),

Cargo.toml:136

  • Verify that the upgraded 'revm' alongside the added 'op-revm' dependency are fully compatible and that any breaking changes between versions are properly addressed across the codebase.
revm = { version = "22.0.0", default-features = false }

.github/workflows/client_host.yaml:56

  • Double-check that the updated block number and the associated environment variables (L2_CLAIM, L2_OUTPUT_ROOT, L2_HEAD, L1_HEAD) correctly match the new test fixture data and network configuration expectations.
if [[ ${{ contains(matrix.name, 26215604) }} == true ]]; then

@clabby clabby force-pushed the cl/alloy-evm branch 3 times, most recently from 4642f30 to f3b333d Compare April 14, 2025 13:44
@clabby clabby marked this pull request as ready for review April 14, 2025 13:44
@emhane emhane requested review from klkvr and mattsse April 15, 2025 15:38
Copy link
Copy Markdown
Contributor

@refcell refcell left a comment

Choose a reason for hiding this comment

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

Left a few comments. Nice work - so happy we have test coverage because this is beefy

@clabby clabby added this pull request to the merge queue Apr 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 15, 2025
@clabby clabby added this pull request to the merge queue Apr 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 15, 2025
@clabby clabby enabled auto-merge April 15, 2025 19:39
@clabby clabby added this pull request to the merge queue Apr 15, 2025
Merged via the queue into main with commit fb355bd Apr 15, 2025
20 checks passed
@clabby clabby deleted the cl/alloy-evm branch April 15, 2025 20:48
@github-project-automation github-project-automation bot moved this from In Review to Done in Project Tracking Apr 15, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 27, 2025
Align the “executor customization” section with the changes from PR
#1400 (switch to alloy-evm for stateless block building).

close #1427

Co-authored-by: theo <80177219+theochap@users.noreply.github.com>
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
theochap added a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
)

Align the “executor customization” section with the changes from PR
op-rs/kona#1400 (switch to alloy-evm for stateless block building).

close op-rs/kona#1427

Co-authored-by: theo <80177219+theochap@users.noreply.github.com>
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-proof Area: proof crates F-deps Flag: Updates dependencies K-feature Kind: feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants