diff --git a/Cargo.lock b/Cargo.lock index 92b089a0eafd..49f58bafca05 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9498,7 +9498,8 @@ dependencies = [ "reth-storage-api", "reth-tasks", "reth-tracing", - "revm", + "revm-interpreter", + "revm-primitives", "rustc-hash 2.1.0", "schnellru", "serde", diff --git a/Cargo.toml b/Cargo.toml index ab2fba7b99e0..e1936a8b1a2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -429,6 +429,7 @@ reth-zstd-compressors = { path = "crates/storage/zstd-compressors", default-feat revm = { version = "18.0.0", features = ["std"], default-features = false } revm-inspectors = "0.12.0" revm-primitives = { version = "14.0.0", default-features = false } +revm-interpreter = { version = "14.0.0", default-features = false } # eth alloy-chains = { version = "0.1.32", default-features = false } diff --git a/crates/transaction-pool/Cargo.toml b/crates/transaction-pool/Cargo.toml index 214633188167..f2586059967e 100644 --- a/crates/transaction-pool/Cargo.toml +++ b/crates/transaction-pool/Cargo.toml @@ -23,10 +23,11 @@ reth-execution-types.workspace = true reth-fs-util.workspace = true reth-storage-api.workspace = true reth-tasks.workspace = true -revm.workspace = true +revm-primitives.workspace = true +revm-interpreter.workspace = true # ethereum -alloy-eips.workspace = true +alloy-eips = { workspace = true, features = ["kzg"] } alloy-primitives.workspace = true alloy-rlp.workspace = true alloy-consensus.workspace = true @@ -85,9 +86,10 @@ serde = [ "bitflags/serde", "parking_lot/serde", "rand?/serde", - "revm/serde", "smallvec/serde", "reth-primitives-traits/serde", + "revm-interpreter/serde", + "revm-primitives/serde" ] test-utils = [ "rand", @@ -97,7 +99,6 @@ test-utils = [ "reth-chainspec/test-utils", "reth-primitives/test-utils", "reth-provider/test-utils", - "revm/test-utils", "reth-primitives-traits/test-utils", ] arbitrary = [ @@ -110,9 +111,10 @@ arbitrary = [ "alloy-eips/arbitrary", "alloy-primitives/arbitrary", "bitflags/arbitrary", - "revm/arbitrary", "reth-primitives-traits/arbitrary", "smallvec/arbitrary", + "revm-interpreter/arbitrary", + "revm-primitives/arbitrary" ] [[bench]] diff --git a/crates/transaction-pool/src/validate/eth.rs b/crates/transaction-pool/src/validate/eth.rs index 998de5ffb510..bc26014f4083 100644 --- a/crates/transaction-pool/src/validate/eth.rs +++ b/crates/transaction-pool/src/validate/eth.rs @@ -18,16 +18,12 @@ use alloy_consensus::{ }, BlockHeader, }; -use alloy_eips::eip4844::MAX_BLOBS_PER_BLOCK; +use alloy_eips::eip4844::{env_settings::EnvKzgSettings, MAX_BLOBS_PER_BLOCK}; use reth_chainspec::{ChainSpec, EthereumHardforks}; use reth_primitives::{InvalidTransactionError, SealedBlock}; use reth_primitives_traits::GotExpected; use reth_storage_api::{AccountReader, StateProviderFactory}; use reth_tasks::TaskSpawner; -use revm::{ - interpreter::gas::validate_initial_tx_gas, - primitives::{EnvKzgSettings, SpecId}, -}; use std::{ marker::PhantomData, sync::{atomic::AtomicBool, Arc}, @@ -807,6 +803,7 @@ pub fn ensure_intrinsic_gas( transaction: &T, fork_tracker: &ForkTracker, ) -> Result<(), InvalidPoolTransactionError> { + use revm_primitives::SpecId; let spec_id = if fork_tracker.is_prague_activated() { SpecId::PRAGUE } else if fork_tracker.is_shanghai_activated() { @@ -815,7 +812,7 @@ pub fn ensure_intrinsic_gas( SpecId::MERGE }; - let gas_after_merge = validate_initial_tx_gas( + let gas_after_merge = revm_interpreter::gas::validate_initial_tx_gas( spec_id, transaction.input(), transaction.is_create(),