Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e1e034e
feat(evm-ee): add EVM execution environment implementation
purusang Nov 5, 2025
a45de18
test(evm-ee): add integration test with real witness data
purusang Nov 5, 2025
d6ea890
chore: add strata-evm-ee to workspace
purusang Nov 5, 2025
600944c
test: add --no-tests=warn flag to integration test command
purusang Nov 5, 2025
02207b7
fix(minor): fix import ordering in evm-ee execution tests & comment
purusang Nov 5, 2025
7fb3d4e
refactor(evm-ee): extract helper utilities for code reuse
purusang Nov 7, 2025
2e7bdc8
feat(evm-ee): implement Codec traits for all core types
purusang Nov 7, 2025
26c4b9d
feat(evm-ee): improve execution flow and add withdrawal intent conver…
purusang Nov 7, 2025
b4f2d64
nits
purusang Nov 10, 2025
3077f81
refactor: move header verification earlier
purusang Nov 12, 2025
2120d87
refactor: update bytecodes & ancestors datatypes to BTreeMap
purusang Nov 12, 2025
71bb6cc
refactor(evm-ee): optimize clone operations in execution path
purusang Nov 12, 2025
b725aae
refactor(evm-ee): split types module into separate files
purusang Nov 13, 2025
e15daa7
refactor(evm-ee): address PR review comments
purusang Nov 13, 2025
8875f73
style: apply formatting to types module
purusang Nov 13, 2025
1baa877
refactor: rename collect_withdrawal_intents to withdrawal_intents
purusang Nov 13, 2025
0370541
refactor: address PR review comments
purusang Nov 18, 2025
0847440
refactor: move codec helpers to separate codec_shims module
purusang Nov 18, 2025
63a1500
nits
purusang Nov 20, 2025
c109be6
perf: optimize zkVM performance by caching hashes
purusang Nov 24, 2025
f987de0
refactor: rename collect_withdrawal function
purusang Nov 24, 2025
e8f8468
refactor: separate block assembly from proof execution trait
purusang Nov 24, 2025
615d433
feat(evm-ee): implement deposit validation
purusang Nov 24, 2025
63c1178
chore: specify version for strata-codec
purusang Nov 24, 2025
00a9395
refactor(evm-ee): replace bincode with custom deterministic Codec imp…
purusang Nov 25, 2025
fdf7d37
evm-ee: defer state root verification to merge to avoid state clone i…
purusang Nov 26, 2025
9226823
refactor: use WithdrawalMsgData type for messages
purusang Dec 1, 2025
d05b777
nit: remove unused crate
purusang Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ cov-unit: ensure-cargo-llvm-cov ensure-cargo-nextest
cov-report-html: ensure-cargo-llvm-cov ensure-cargo-nextest
cargo llvm-cov --open --workspace --locked nextest

# Run integration tests
[group('test')]
test-int: ensure-cargo-nextest
cargo nextest run -p "integration-tests" --status-level=fail --no-capture --no-tests=warn


# Runs `nextest` under `cargo-mutants`. Caution: This can take *really* long to run
[group('test')]
mutants-test: ensure-cargo-mutants
Expand Down
33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ members = [
"crates/ee-acct-types",
"crates/ee-chain-types",
"crates/eectl",
"crates/evm-ee",
"crates/evmexec",
"crates/identifiers",
"crates/key-derivation",
Expand Down Expand Up @@ -313,6 +314,7 @@ reth-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-cli-commands = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-cli-runner = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-engine-local = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
Expand Down Expand Up @@ -349,7 +351,9 @@ reth-rpc-types-compat = { git = "https://github.com/paradigmxyz/reth", tag = "v1
reth-storage-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", default-features = false }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", features = [
"serde",
] }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2", default-features = false }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }

Expand Down Expand Up @@ -393,6 +397,7 @@ hex = { version = "0.4", features = ["serde"] }
http = "1.0.0"
hyper = "0.14.25"
int-enum = "1.2"
itertools = "0.14"
jsonrpsee = { version = "0.26.0" }
jsonrpsee-http-client = { version = "0.26.0" }
jsonrpsee-types = { version = "0.26.0" }
Expand Down
2 changes: 1 addition & 1 deletion crates/asm/manifest-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ edition = "2024"
[dependencies]
borsh.workspace = true
serde.workspace = true
thiserror.workspace = true
strata-codec.workspace = true
strata-identifiers.workspace = true
strata-msg-fmt.workspace = true
thiserror.workspace = true

[lints]
workspace = true
6 changes: 3 additions & 3 deletions crates/ee-acct-runtime/src/chain_segment_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use digest::Digest;
use sha2::Sha256;
use strata_codec::encode_to_vec;
use strata_ee_acct_types::{
CommitBlockData, CommitChainSegment, ExecBlock, ExecHeader, ExecPartialState, ExecPayload,
ExecutionEnvironment, PendingInputEntry,
BlockAssembler, CommitBlockData, CommitChainSegment, ExecBlock, ExecHeader, ExecPartialState,
ExecPayload, ExecutionEnvironment, PendingInputEntry,
};
use strata_ee_chain_types::{BlockInputs, ExecBlockCommitment, ExecBlockPackage};

Expand All @@ -28,7 +28,7 @@ pub struct ChainSegmentBuilder<E: ExecutionEnvironment> {
consumed_inputs: usize,
}

impl<E: ExecutionEnvironment> ChainSegmentBuilder<E> {
impl<E: ExecutionEnvironment + BlockAssembler> ChainSegmentBuilder<E> {
/// Creates a new chain segment builder from an existing state, header, and
/// pending inputs queue.
pub fn new(
Expand Down
4 changes: 3 additions & 1 deletion crates/ee-acct-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ pub use inputs::ExecPayload;
pub use messages::*;
pub use outputs::ExecBlockOutput;
pub use state::{EeAccountState, PendingFinclEntry, PendingInputEntry, PendingInputType};
pub use traits::{ExecBlock, ExecBlockBody, ExecHeader, ExecPartialState, ExecutionEnvironment};
pub use traits::{
BlockAssembler, ExecBlock, ExecBlockBody, ExecHeader, ExecPartialState, ExecutionEnvironment,
};
27 changes: 19 additions & 8 deletions crates/ee-acct-types/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,6 @@ pub trait ExecutionEnvironment: Sized {
inputs: &BlockInputs,
) -> EnvResult<ExecBlockOutput<Self>>;

/// Completes a header for an exec payload using the exec outputs. This can
/// be assembled into a final block.
fn complete_header(
&self,
exec_payload: &ExecPayload<'_, Self::Block>,
output: &ExecBlockOutput<Self>,
) -> EnvResult<<Self::Block as ExecBlock>::Header>;

/// Performs any additional checks needed from the block outputs against the
/// header.
fn verify_outputs_against_header(
Expand All @@ -103,9 +95,28 @@ pub trait ExecutionEnvironment: Sized {
) -> EnvResult<()>;

/// Applies a pending write batch into the partial state.
// NOTE: should this be moved to BlockAssembler?
fn merge_write_into_state(
&self,
state: &mut Self::PartialState,
wb: &Self::WriteBatch,
) -> EnvResult<()>;
}

/// Block assembly trait for constructing complete headers from execution outputs.
///
/// This trait is separate from ExecutionEnvironment because header completion
/// is only needed when building new blocks, not when verifying existing blocks.
/// The ExecutionEnvironment trait focuses on proof-related operations.
pub trait BlockAssembler: ExecutionEnvironment {
/// Constructs a complete header from header intrinsics and execution outputs.
///
/// This combines the header intrinsics (parent hash, timestamp, etc.) with
/// the computed commitments from execution (state root, logs bloom, etc.)
/// to produce a complete block header.
fn complete_header(
&self,
exec_payload: &ExecPayload<'_, Self::Block>,
output: &ExecBlockOutput<Self>,
) -> EnvResult<<Self::Block as ExecBlock>::Header>;
}
50 changes: 50 additions & 0 deletions crates/evm-ee/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[package]
name = "strata-evm-ee"
version = "0.1.0"
edition = "2024"

[dependencies]
# Strata crates
strata-acct-types.workspace = true
strata-codec.workspace = true
strata-ee-acct-types.workspace = true
strata-ee-chain-types.workspace = true
strata-ol-msg-types.workspace = true

# RSP for sparse MPT and execution
rsp-client-executor.workspace = true
rsp-mpt.workspace = true

# Reth for EVM execution
alpen-reth-evm.workspace = true
alpen-reth-primitives.workspace = true
reth-chainspec.workspace = true
reth-consensus-common.workspace = true
reth-errors.workspace = true
reth-evm.workspace = true
reth-evm-ethereum.workspace = true
reth-primitives.workspace = true
reth-primitives-traits.workspace = true
reth-trie.workspace = true # Used for HashedPostState in EvmWriteBatch

# REVM
revm.workspace = true
revm-primitives.workspace = true

# Alloy for Ethereum types
alloy-consensus = { workspace = true, features = ["serde-bincode-compat"] }
alloy-rlp.workspace = true

# Serialization
rlp.workspace = true

# Utilities
itertools.workspace = true

[dev-dependencies]
alloy-eips.workspace = true
serde.workspace = true
serde_json.workspace = true

[lints]
workspace = true
Loading
Loading