diff --git a/crates/ethereum/evm/src/execute.rs b/crates/ethereum/evm/src/execute.rs index cfee186c63..ee77ee0db4 100644 --- a/crates/ethereum/evm/src/execute.rs +++ b/crates/ethereum/evm/src/execute.rs @@ -4,6 +4,7 @@ use crate::{ dao_fork::{DAO_HARDFORK_BENEFICIARY, DAO_HARDKFORK_ACCOUNTS}, EthEvmConfig, }; +use core::fmt::Display; use reth_chainspec::{ChainSpec, EthereumHardforks, MAINNET}; use reth_ethereum_consensus::validate_block_post_execution; use reth_evm::{ @@ -33,8 +34,11 @@ use revm_primitives::{ BlockEnv, CfgEnvWithHandlerCfg, EVMError, EnvWithHandlerCfg, ResultAndState, }; +#[cfg(not(feature = "std"))] +use alloc::{boxed::Box, sync::Arc, vec, vec::Vec}; #[cfg(feature = "std")] -use std::{fmt::Display, sync::Arc, vec, vec::Vec}; +use std::sync::Arc; + /// Provides executors to execute regular ethereum blocks #[derive(Debug, Clone)] pub struct EthExecutorProvider { @@ -145,7 +149,7 @@ where ) -> Result where DB: Database, - DB::Error: Into + std::fmt::Display, + DB::Error: Into + Display, { // apply pre execution changes apply_beacon_root_contract_call( @@ -363,7 +367,7 @@ where impl Executor for EthBlockExecutor where EvmConfig: ConfigureEvm, - DB: Database + std::fmt::Display>, + DB: Database + Display>, { type Input<'a> = BlockExecutionInput<'a, BlockWithSenders>; type Output = BlockExecutionOutput; diff --git a/crates/ethereum/evm/src/lib.rs b/crates/ethereum/evm/src/lib.rs index 43f04119e4..fdb121ef84 100644 --- a/crates/ethereum/evm/src/lib.rs +++ b/crates/ethereum/evm/src/lib.rs @@ -18,6 +18,9 @@ use reth_primitives::{transaction::FillTxEnv, Address, Header, TransactionSigned use reth_revm::{Database, EvmBuilder}; use revm_primitives::{AnalysisKind, Bytes, CfgEnvWithHandlerCfg, Env, TxEnv, TxKind}; +#[cfg(not(feature = "std"))] +use alloc::vec::Vec; + mod config; pub use config::{revm_spec, revm_spec_by_timestamp_after_merge};