Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
297 changes: 244 additions & 53 deletions Cargo.lock

Large diffs are not rendered by default.

39 changes: 34 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -428,15 +428,25 @@ reth-trie-sparse = { path = "crates/trie/sparse" }
reth-zstd-compressors = { path = "crates/storage/zstd-compressors", default-features = false }

# revm
revm = { version = "19.5.0", default-features = false }
revm-primitives = { version = "15.2.0", default-features = false }
revm-interpreter = { version = "15.2.0", default-features = false }
revm-inspectors = "0.15.0"
revm = { version = "20.0.0-alpha.1", default-features = false }
revm-bytecode = { version = "1.0.0-alpha.1", default-features = false }
revm-database = { version = "1.0.0-alpha.1", default-features = false }
revm-state = { version = "1.0.0-alpha.1", default-features = false }
revm-primitives = { version = "16.0.0-alpha.1", default-features = false }
revm-interpreter = { version = "16.0.0-alpha.1", default-features = false }
revm-inspector = { version = "1.0.0-alpha.1", default-features = false }
revm-context = { version = "1.0.0-alpha.1", default-features = false }
revm-context-interface = { version = "1.0.0-alpha.1", default-features = false }
revm-database-interface = { version = "1.0.0-alpha.1", default-features = false }
revm-specification = { version = "1.0.0-alpha.1", default-features = false }
revm-optimism = { version = "1.0.0-alpha.1", default-features = false }
revm-inspectors = "0.15"

# eth
alloy-chains = { version = "0.1.32", default-features = false }
alloy-dyn-abi = "0.8.20"
alloy-eip2124 = { version = "0.1.0", default-features = false }
alloy-evm = { version = "0.1", default-features = false }
alloy-primitives = { version = "0.8.20", default-features = false, features = ["map-foldhash"] }
alloy-rlp = { version = "0.3.10", default-features = false, features = ["core-net"] }
alloy-sol-types = "0.8.20"
Expand Down Expand Up @@ -472,6 +482,7 @@ alloy-transport-ipc = { version = "0.11.1", default-features = false }
alloy-transport-ws = { version = "0.11.1", default-features = false }

# op
alloy-op-evm = { version = "0.1", default-features = false }
op-alloy-rpc-types = { version = "0.10.3", default-features = false }
op-alloy-rpc-types-engine = { version = "0.10.3", default-features = false }
op-alloy-network = { version = "0.10.3", default-features = false }
Expand Down Expand Up @@ -611,7 +622,25 @@ snmalloc-rs = { version = "0.3.7", features = ["build_cc"] }
# See: https://github.com/eira-fransham/crunchy/issues/13
crunchy = "=0.2.2"

# [patch.crates-io]
[patch.crates-io]
alloy-evm = { git = "https://github.com/alloy-rs/evm", rev = "048248c" }
alloy-op-evm = { git = "https://github.com/alloy-rs/evm", rev = "048248c" }

revm = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-bytecode = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-database = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-state = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-interpreter = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-inspector = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-context = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-context-interface = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-database-interface = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-specification = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-optimism = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }

revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "74b6aa4" }

# alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "cfb13aa" }
# alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "cfb13aa" }
# alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "cfb13aa" }
Expand Down
6 changes: 2 additions & 4 deletions bin/reth/src/commands/debug_cmd/build_block.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Command for debugging block building.
use crate::primitives::kzg::KzgSettings;
use alloy_consensus::{BlockHeader, TxEip4844};
use alloy_eips::{
eip2718::Encodable2718,
Expand Down Expand Up @@ -32,10 +33,7 @@ use reth_provider::{
BlockHashReader, BlockReader, BlockWriter, ChainSpecProvider, ProviderFactory,
StageCheckpointReader, StateProviderFactory,
};
use reth_revm::{
cached::CachedReads, cancelled::CancelOnDrop, database::StateProviderDatabase,
primitives::KzgSettings,
};
use reth_revm::{cached::CachedReads, cancelled::CancelOnDrop, database::StateProviderDatabase};
use reth_stages::StageId;
use reth_transaction_pool::{
blobstore::InMemoryBlobStore, BlobStore, EthPooledTransaction, PoolConfig, TransactionOrigin,
Expand Down
19 changes: 19 additions & 0 deletions book/sources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,22 @@ reth-exex = { path = "../../crates/exex/exex" }
reth-node-ethereum = { path = "../../crates/ethereum/node" }
reth-tracing = { path = "../../crates/tracing" }
reth-node-api = { path = "../../crates/node/api" }

[patch.crates-io]
alloy-evm = { git = "https://github.com/alloy-rs/evm", rev = "048248c" }
alloy-op-evm = { git = "https://github.com/alloy-rs/evm", rev = "048248c" }

revm = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-bytecode = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-database = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-state = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-interpreter = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-inspector = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-context = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-context-interface = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-database-interface = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-specification = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }
revm-optimism = { git = "https://github.com/bluealloy/revm", rev = "a8b9b1e" }

revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "74b6aa4" }
5 changes: 3 additions & 2 deletions crates/chain-state/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ reth-trie.workspace = true
alloy-eips.workspace = true
alloy-primitives.workspace = true
alloy-consensus.workspace = true
revm.workspace = true
revm-database.workspace = true
revm-state = { workspace = true, optional = true }

# async
tokio = { workspace = true, default-features = false, features = ["sync", "macros"] }
Expand Down Expand Up @@ -59,9 +60,9 @@ test-utils = [
"alloy-signer",
"alloy-signer-local",
"rand",
"revm-state",
"reth-chainspec/test-utils",
"reth-primitives/test-utils",
"reth-primitives-traits/test-utils",
"reth-trie/test-utils",
"revm/test-utils",
]
2 changes: 1 addition & 1 deletion crates/chain-state/src/in_memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ mod tests {
}

impl HashedPostStateProvider for MockStateProvider {
fn hashed_post_state(&self, _bundle_state: &revm::db::BundleState) -> HashedPostState {
fn hashed_post_state(&self, _bundle_state: &revm_database::BundleState) -> HashedPostState {
HashedPostState::default()
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/chain-state/src/memory_overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use reth_trie::{
updates::TrieUpdates, AccountProof, HashedPostState, HashedStorage, MultiProof,
MultiProofTargets, StorageMultiProof, TrieInput,
};
use revm::db::BundleState;
use revm_database::BundleState;
use std::sync::OnceLock;

/// A state provider that stores references to in-memory blocks along with their state as well as a
Expand Down
3 changes: 2 additions & 1 deletion crates/chain-state/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ use reth_primitives_traits::{
};
use reth_storage_api::NodePrimitivesProvider;
use reth_trie::{root::state_root_unhashed, updates::TrieUpdates, HashedPostState};
use revm::{db::BundleState, primitives::AccountInfo};
use revm_database::BundleState;
use revm_state::AccountInfo;
use std::{
collections::HashMap,
ops::Range,
Expand Down
3 changes: 2 additions & 1 deletion crates/engine/invalid-block-hooks/src/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ use reth_primitives::{NodePrimitives, RecoveredBlock, SealedHeader};
use reth_primitives_traits::{BlockBody, SignedTransaction};
use reth_provider::{BlockExecutionOutput, ChainSpecProvider, StateProviderFactory};
use reth_revm::{
database::StateProviderDatabase, db::states::bundle_state::BundleRetention, StateBuilder,
database::StateProviderDatabase,
db::{states::bundle_state::BundleRetention, StateBuilder},
};
use reth_rpc_api::DebugApiClient;
use reth_tracing::tracing::warn;
Expand Down
1 change: 1 addition & 0 deletions crates/engine/local/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ op = [
"dep:op-alloy-rpc-types-engine",
"dep:reth-optimism-chainspec",
"reth-payload-primitives/op",
"reth-evm/op",
]
1 change: 1 addition & 0 deletions crates/engine/tree/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ reth-trie-db.workspace = true

# alloy
alloy-rlp.workspace = true
revm-state.workspace = true

assert_matches.workspace = true
criterion.workspace = true
Expand Down
7 changes: 3 additions & 4 deletions crates/engine/tree/benches/channel_perf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

#![allow(missing_docs)]

use alloy_primitives::{B256, U256};
use criterion::{criterion_group, criterion_main, BatchSize, BenchmarkId, Criterion};
use proptest::test_runner::TestRunner;
use rand::Rng;
use revm_primitives::{
Account, AccountInfo, AccountStatus, Address, EvmState, EvmStorage, EvmStorageSlot, HashMap,
B256, U256,
};
use revm_primitives::{Address, HashMap};
use revm_state::{Account, AccountInfo, AccountStatus, EvmState, EvmStorage, EvmStorageSlot};
use std::{hint::black_box, thread};

/// Creates a mock state with the specified number of accounts for benchmarking
Expand Down
8 changes: 4 additions & 4 deletions crates/engine/tree/benches/state_root_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#![allow(missing_docs)]

use alloy_consensus::constants::KECCAK_EMPTY;
use alloy_primitives::{Address, B256};
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
use proptest::test_runner::TestRunner;
use rand::Rng;
Expand All @@ -15,10 +17,8 @@ use reth_provider::{
AccountReader, HashingWriter, ProviderFactory,
};
use reth_trie::TrieInput;
use revm_primitives::{
Account as RevmAccount, AccountInfo, AccountStatus, Address, EvmState, EvmStorageSlot, HashMap,
B256, KECCAK_EMPTY, U256,
};
use revm_primitives::{HashMap, U256};
use revm_state::{Account as RevmAccount, AccountInfo, AccountStatus, EvmState, EvmStorageSlot};
use std::{hint::black_box, sync::Arc};

#[derive(Debug, Clone)]
Expand Down
11 changes: 7 additions & 4 deletions crates/engine/tree/src/tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use reth_ethereum_primitives::EthPrimitives;
use reth_evm::{
execute::BlockExecutorProvider,
system_calls::{NoopHook, OnStateHook},
ConfigureEvm, Evm, TransactionEnv,
ConfigureEvm, Evm,
};
use reth_payload_builder::PayloadBuilderHandle;
use reth_payload_primitives::{EngineApiMessageVersion, PayloadBuilderAttributes};
Expand Down Expand Up @@ -2764,12 +2764,15 @@ where

let state_provider = StateProviderDatabase::new(&state_provider);

let mut evm_env = evm_config.evm_env(&block);

evm_env.cfg_env.disable_nonce_check = true;

// create a new executor and disable nonce checks in the env
let mut evm = evm_config.evm_for_block(state_provider, &block);
let mut evm = evm_config.evm_with_env(state_provider, evm_env);

// create the tx env and reset nonce
let mut tx_env = evm_config.tx_env(&tx, tx.signer());
tx_env.unset_nonce();
let tx_env = evm_config.tx_env(&tx, tx.signer());

// exit early if execution is done
if cancel_execution.is_cancelled() {
Expand Down
9 changes: 5 additions & 4 deletions crates/engine/tree/src/tree/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use reth_provider::{
providers::ConsistentDbView, BlockReader, DBProvider, DatabaseProviderFactory,
StateCommitmentProvider,
};
use reth_revm::state::EvmState;
use reth_trie::{
hashed_cursor::HashedPostStateCursorFactory,
prefix_set::TriePrefixSetsMut,
Expand All @@ -27,7 +28,7 @@ use reth_trie_sparse::{
errors::{SparseStateTrieResult, SparseTrieErrorKind},
SparseStateTrie,
};
use revm_primitives::{keccak256, EvmState, B256};
use revm_primitives::{keccak256, B256};
use std::{
collections::{BTreeMap, VecDeque},
sync::{
Expand Down Expand Up @@ -1190,9 +1191,9 @@ mod tests {
};
use reth_testing_utils::generators::{self, Rng};
use reth_trie::{test_utils::state_root, TrieInput};
use revm_primitives::{
Account as RevmAccount, AccountInfo, AccountStatus, Address, EvmState, EvmStorageSlot,
HashMap, B256, KECCAK_EMPTY, U256,
use revm_primitives::{Address, HashMap, B256, KECCAK_EMPTY, U256};
use revm_state::{
Account as RevmAccount, AccountInfo, AccountStatus, EvmState, EvmStorageSlot,
};
use std::sync::Arc;

Expand Down
3 changes: 2 additions & 1 deletion crates/engine/util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ reth-revm.workspace = true
reth-provider.workspace = true
reth-ethereum-forks.workspace = true
revm-primitives.workspace = true
revm-database.workspace = true
reth-trie.workspace = true
reth-payload-primitives.workspace = true

Expand Down Expand Up @@ -53,5 +54,5 @@ tracing.workspace = true

[features]
optimism = [
"revm-primitives/optimism",
"reth-provider/optimism",
]
11 changes: 3 additions & 8 deletions crates/ethereum/evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,22 @@ workspace = true
# Reth
reth-chainspec.workspace = true
reth-ethereum-forks.workspace = true
reth-revm.workspace = true
reth-evm.workspace = true
reth-primitives.workspace = true
reth-ethereum-consensus.workspace = true
reth-consensus.workspace = true
revm.workspace = true

# Ethereum
revm-primitives.workspace = true
reth-primitives-traits.workspace = true

# Alloy
alloy-primitives.workspace = true
alloy-eips.workspace = true
alloy-evm.workspace = true
alloy-sol-types.workspace = true
alloy-consensus.workspace = true

# Misc
derive_more.workspace = true

[dev-dependencies]
reth-testing-utils.workspace = true
reth-evm = { workspace = true, features = ["test-utils"] }
Expand All @@ -53,13 +50,11 @@ std = [
"alloy-eips/std",
"alloy-genesis/std",
"alloy-primitives/std",
"revm/std",
"revm-primitives/std",
"secp256k1/std",
"reth-ethereum-forks/std",
"serde_json/std",
"reth-primitives-traits/std",
"reth-chainspec/std",
"derive_more/std",
"alloy-evm/std",
"reth-execution-types/std",
]
Loading
Loading