diff --git a/crates/blockchain-tree/src/chain.rs b/crates/blockchain-tree/src/chain.rs index b708026b6a20..acb1f140e7f2 100644 --- a/crates/blockchain-tree/src/chain.rs +++ b/crates/blockchain-tree/src/chain.rs @@ -204,7 +204,8 @@ impl AppendableChain { let provider = BundleStateProvider::new(state_provider, bundle_state_data_provider); - let executor = externals.executor_factory.executor(StateProviderDatabase::new(&provider)); + let db = StateProviderDatabase::new(&provider); + let executor = externals.executor_factory.executor(db); let block_hash = block.hash(); let block = block.unseal(); diff --git a/crates/blockchain-tree/src/lib.rs b/crates/blockchain-tree/src/lib.rs index 48c44832d977..3f501bead071 100644 --- a/crates/blockchain-tree/src/lib.rs +++ b/crates/blockchain-tree/src/lib.rs @@ -18,9 +18,6 @@ #![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] #![cfg_attr(not(test), warn(unused_crate_dependencies))] -use reth_revm as _; -use reth_trie_parallel as _; - /// Re-export of the blockchain tree API. pub use reth_blockchain_tree_api::*; diff --git a/crates/engine/invalid-block-hooks/src/witness.rs b/crates/engine/invalid-block-hooks/src/witness.rs index b313d9e6d27a..35be6bcd13a0 100644 --- a/crates/engine/invalid-block-hooks/src/witness.rs +++ b/crates/engine/invalid-block-hooks/src/witness.rs @@ -136,8 +136,9 @@ where let mut hashed_state = db.database.hashed_post_state(&bundle_state); for (address, account) in db.cache.accounts { let hashed_address = provider.hash_key(address.as_ref()); - let hashed_account = account.account.as_ref().map(|a| a.info.clone().into()); - hashed_state.accounts.insert(hashed_address, hashed_account); + hashed_state + .accounts + .insert(hashed_address, account.account.as_ref().map(|a| a.info.clone().into())); let storage = hashed_state .storages diff --git a/crates/revm/src/database.rs b/crates/revm/src/database.rs index 616ed8cab051..db4dd554f3b0 100644 --- a/crates/revm/src/database.rs +++ b/crates/revm/src/database.rs @@ -3,7 +3,11 @@ use alloy_primitives::{Address, B256, U256}; use core::ops::{Deref, DerefMut}; use reth_primitives::Account; use reth_storage_errors::provider::{ProviderError, ProviderResult}; -use revm::{db::DatabaseRef, primitives::Bytecode, AccountInfo, Database}; +use revm::{ + db::DatabaseRef, + primitives::{AccountInfo, Bytecode}, + Database, +}; /// A helper trait responsible for providing state necessary for EVM execution. /// diff --git a/crates/revm/src/either.rs b/crates/revm/src/either.rs index 4d07434be941..e93ba3a8d010 100644 --- a/crates/revm/src/either.rs +++ b/crates/revm/src/either.rs @@ -1,5 +1,8 @@ use alloy_primitives::{Address, B256, U256}; -use revm::{primitives::Bytecode, AccountInfo, Database}; +use revm::{ + primitives::{AccountInfo, Bytecode}, + Database, +}; /// An enum type that can hold either of two different [`Database`] implementations. /// diff --git a/crates/revm/src/witness.rs b/crates/revm/src/witness.rs index b422df7e29c9..6140de9d48ad 100644 --- a/crates/revm/src/witness.rs +++ b/crates/revm/src/witness.rs @@ -43,8 +43,9 @@ impl ExecutionWitnessRecord { for (address, account) in &statedb.cache.accounts { let hashed_address = keccak256(address); - let hashed_account = account.account.as_ref().map(|a| a.info.clone().into()); - self.hashed_state.accounts.insert(hashed_address, hashed_account); + self.hashed_state + .accounts + .insert(hashed_address, account.account.as_ref().map(|a| (&a.info).into())); let storage = self .hashed_state diff --git a/crates/rpc/rpc/src/debug.rs b/crates/rpc/rpc/src/debug.rs index 97500729b5db..d4b8c375705f 100644 --- a/crates/rpc/rpc/src/debug.rs +++ b/crates/rpc/rpc/src/debug.rs @@ -632,8 +632,8 @@ where self.eth_api() .spawn_with_state_at_block(block.parent_hash().into(), move |state_provider| { - let block_executor = - this.inner.block_executor.executor(StateProviderDatabase::new(&state_provider)); + let db = StateProviderDatabase::new(&state_provider); + let block_executor = this.inner.block_executor.executor(db); let mut witness_record = ExecutionWitnessRecord::default(); diff --git a/crates/trie/common/Cargo.toml b/crates/trie/common/Cargo.toml index 4a9d7f5d4097..a89017ffaa70 100644 --- a/crates/trie/common/Cargo.toml +++ b/crates/trie/common/Cargo.toml @@ -87,7 +87,7 @@ serde = [ "alloy-trie/serde", "alloy-rpc-types-eth?/serde", "reth-primitives-traits/serde", - "reth-codecs?/serde", + "reth-codecs?/serde" ] reth-codec = [ "dep:reth-codecs", @@ -117,7 +117,7 @@ arbitrary = [ "alloy-primitives/arbitrary", "nybbles/arbitrary", "reth-codecs/arbitrary", - "alloy-rpc-types-eth?/arbitrary", + "alloy-rpc-types-eth?/arbitrary" ] [[bench]] diff --git a/crates/trie/trie/src/state.rs b/crates/trie/trie/src/state.rs index 708d178d643c..7411e88c58e5 100644 --- a/crates/trie/trie/src/state.rs +++ b/crates/trie/trie/src/state.rs @@ -371,10 +371,9 @@ mod tests { use revm::{ db::{ states::{plain_account::PlainStorage, CacheAccount, StorageSlot}, - BundleAccount, StorageWithOriginalValues, + BundleAccount, PlainAccount, StorageWithOriginalValues, }, primitives::{AccountInfo, Bytecode}, - PlainAccount, }; #[test] @@ -505,7 +504,7 @@ mod tests { let address = Address::random(); // Create mock account info. - let account_info = revm::AccountInfo { + let account_info = AccountInfo { balance: U256::from(500), nonce: 5, code_hash: B256::random(),