diff --git a/Cargo.lock b/Cargo.lock index ad8d8716c20e..f2693321e689 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8821,7 +8821,8 @@ dependencies = [ "alloy-eips", "alloy-primitives", "reth-ethereum-forks", - "reth-primitives", + "reth-ethereum-primitives", + "reth-primitives-traits", "reth-storage-api", "reth-storage-errors", "reth-trie", diff --git a/crates/revm/Cargo.toml b/crates/revm/Cargo.toml index 07d16f656970..3466dfcc4f49 100644 --- a/crates/revm/Cargo.toml +++ b/crates/revm/Cargo.toml @@ -13,7 +13,8 @@ workspace = true [dependencies] # reth -reth-primitives.workspace = true +reth-primitives-traits.workspace = true +reth-ethereum-primitives.workspace = true reth-storage-errors.workspace = true reth-storage-api.workspace = true reth-trie = { workspace = true, optional = true } @@ -34,19 +35,21 @@ alloy-consensus.workspace = true [features] default = ["std"] std = [ - "reth-primitives/std", + "reth-primitives-traits/std", "alloy-primitives/std", "revm/std", "alloy-eips/std", "alloy-consensus/std", "reth-ethereum-forks/std", + "reth-ethereum-primitives/std", ] witness = ["dep:reth-trie"] test-utils = [ "dep:reth-trie", - "reth-primitives/test-utils", + "reth-primitives-traits/test-utils", "reth-trie?/test-utils", "revm/test-utils", + "reth-ethereum-primitives/test-utils", ] serde = [ "revm/serde", @@ -55,4 +58,5 @@ serde = [ "alloy-consensus/serde", "reth-trie?/serde", "reth-ethereum-forks/serde", + "reth-primitives-traits/serde", ] diff --git a/crates/revm/src/batch.rs b/crates/revm/src/batch.rs index 1cd1884584ee..e61f2c32795d 100644 --- a/crates/revm/src/batch.rs +++ b/crates/revm/src/batch.rs @@ -10,7 +10,7 @@ use alloy_primitives::BlockNumber; /// - pruning receipts according to the pruning configuration. /// - batch range if known #[derive(Debug)] -pub struct BlockBatchRecord { +pub struct BlockBatchRecord { /// The collection of receipts. /// Outer vector stores receipts for each block sequentially. /// The inner vector stores receipts ordered by transaction number. diff --git a/crates/revm/src/database.rs b/crates/revm/src/database.rs index 3c161b348589..e039ca9d6299 100644 --- a/crates/revm/src/database.rs +++ b/crates/revm/src/database.rs @@ -1,7 +1,7 @@ use crate::primitives::alloy_primitives::{BlockNumber, StorageKey, StorageValue}; use alloy_primitives::{Address, B256, U256}; use core::ops::{Deref, DerefMut}; -use reth_primitives::Account; +use reth_primitives_traits::Account; use reth_storage_api::{AccountReader, BlockHashReader, StateProvider}; use reth_storage_errors::provider::{ProviderError, ProviderResult}; use revm::{ @@ -27,7 +27,7 @@ pub trait EvmStateProvider: Send + Sync { fn bytecode_by_hash( &self, code_hash: &B256, - ) -> ProviderResult>; + ) -> ProviderResult>; /// Get storage of the given account. fn storage( @@ -50,7 +50,7 @@ impl EvmStateProvider for T { fn bytecode_by_hash( &self, code_hash: &B256, - ) -> ProviderResult> { + ) -> ProviderResult> { ::bytecode_by_hash(self, code_hash) } diff --git a/crates/revm/src/test_utils.rs b/crates/revm/src/test_utils.rs index 6d2dbf2ca01d..b40fbd0d7f48 100644 --- a/crates/revm/src/test_utils.rs +++ b/crates/revm/src/test_utils.rs @@ -4,7 +4,7 @@ use alloy_primitives::{ map::{B256HashMap, HashMap}, Address, BlockNumber, Bytes, StorageKey, B256, U256, }; -use reth_primitives::{Account, Bytecode}; +use reth_primitives_traits::{Account, Bytecode}; use reth_storage_api::{ AccountReader, BlockHashReader, HashedPostStateProvider, StateProofProvider, StateProvider, StateRootProvider, StorageRootProvider,