mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-27 16:18:08 -05:00
chore: no_std support in reth-evm-ethereum (#9687)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -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<EvmConfig = EthEvmConfig> {
|
||||
@@ -145,7 +149,7 @@ where
|
||||
) -> Result<EthExecuteOutput, BlockExecutionError>
|
||||
where
|
||||
DB: Database,
|
||||
DB::Error: Into<ProviderError> + std::fmt::Display,
|
||||
DB::Error: Into<ProviderError> + Display,
|
||||
{
|
||||
// apply pre execution changes
|
||||
apply_beacon_root_contract_call(
|
||||
@@ -363,7 +367,7 @@ where
|
||||
impl<EvmConfig, DB> Executor<DB> for EthBlockExecutor<EvmConfig, DB>
|
||||
where
|
||||
EvmConfig: ConfigureEvm,
|
||||
DB: Database<Error: Into<ProviderError> + std::fmt::Display>,
|
||||
DB: Database<Error: Into<ProviderError> + Display>,
|
||||
{
|
||||
type Input<'a> = BlockExecutionInput<'a, BlockWithSenders>;
|
||||
type Output = BlockExecutionOutput<Receipt>;
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user