Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDhejavu committed Dec 13, 2024
1 parent 93ea802 commit f586549
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/storage/provider/src/test_utils/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ use reth_trie::{
MultiProofTargets, StorageMultiProof, StorageProof, TrieInput,
};
use reth_trie_db::MerklePatriciaTrie;
use revm::primitives::{BlockEnv, CfgEnvWithHandlerCfg};
use std::{
collections::BTreeMap,
ops::{RangeBounds, RangeInclusive},
Expand Down
14 changes: 9 additions & 5 deletions examples/custom-beacon-withdrawals/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ use reth::{
},
};
use reth_chainspec::{ChainSpec, EthereumHardforks};
use reth_evm::execute::{
BlockExecutionError, BlockExecutionStrategy, BlockExecutionStrategyFactory, ExecuteOutput,
InternalBlockExecutionError,
use reth_evm::{
env::EvmEnv,
execute::{
BlockExecutionError, BlockExecutionStrategy, BlockExecutionStrategyFactory, ExecuteOutput,
InternalBlockExecutionError,
},
};
use reth_evm_ethereum::EthEvmConfig;
use reth_node_ethereum::{node::EthereumAddOns, BasicBlockExecutorProvider, EthereumNode};
Expand Down Expand Up @@ -131,8 +134,9 @@ where
header: &alloy_consensus::Header,
total_difficulty: U256,
) -> EnvWithHandlerCfg {
let (cfg, block_env) = self.evm_config.cfg_and_block_env(header, total_difficulty);
EnvWithHandlerCfg::new_with_cfg_env(cfg, block_env, Default::default())
let evm_env = self.evm_config.cfg_and_block_env(header, total_difficulty);
let EvmEnv { cfg_env_with_handler_cfg, block_env } = evm_env;
EnvWithHandlerCfg::new_with_cfg_env(cfg_env_with_handler_cfg, block_env, Default::default())
}
}

Expand Down
1 change: 1 addition & 0 deletions examples/custom-evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ reth-node-core.workspace = true
reth-primitives.workspace = true
reth-node-ethereum = { workspace = true, features = ["test-utils"] }
reth-tracing.workspace = true
reth-evm.workspace = true
alloy-genesis.workspace = true
alloy-primitives.workspace = true
alloy-consensus.workspace = true
Expand Down
5 changes: 3 additions & 2 deletions examples/custom-evm/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ use reth::{
handler::register::EvmHandler,
inspector_handle_register,
precompile::{Precompile, PrecompileOutput, PrecompileSpecId},
primitives::{BlockEnv, CfgEnvWithHandlerCfg, Env, PrecompileResult, TxEnv},
primitives::{CfgEnvWithHandlerCfg, Env, PrecompileResult, TxEnv},
ContextPrecompiles, Database, Evm, EvmBuilder, GetInspector,
},
rpc::types::engine::PayloadAttributes,
tasks::TaskManager,
transaction_pool::{PoolTransaction, TransactionPool},
};
use reth_chainspec::{Chain, ChainSpec};
use reth_evm::env::EvmEnv;
use reth_evm_ethereum::EthEvmConfig;
use reth_node_api::{
ConfigureEvm, ConfigureEvmEnv, FullNodeTypes, NextBlockEnvAttributes, NodeTypes,
Expand Down Expand Up @@ -115,7 +116,7 @@ impl ConfigureEvmEnv for MyEvmConfig {
&self,
parent: &Self::Header,
attributes: NextBlockEnvAttributes,
) -> Result<(CfgEnvWithHandlerCfg, BlockEnv), Self::Error> {
) -> Result<EvmEnv, Self::Error> {
self.inner.next_cfg_and_block_env(parent, attributes)
}
}
Expand Down
1 change: 1 addition & 0 deletions examples/stateful-precompile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ reth-node-core.workspace = true
reth-primitives.workspace = true
reth-node-ethereum = { workspace = true, features = ["test-utils"] }
reth-tracing.workspace = true
reth-evm.workspace = true
alloy-genesis.workspace = true
alloy-primitives.workspace = true
alloy-consensus.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions examples/stateful-precompile/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ use reth::{
inspector_handle_register,
precompile::{Precompile, PrecompileSpecId},
primitives::{
BlockEnv, CfgEnvWithHandlerCfg, Env, PrecompileResult, SpecId, StatefulPrecompileMut,
TxEnv,
CfgEnvWithHandlerCfg, Env, PrecompileResult, SpecId, StatefulPrecompileMut, TxEnv,
},
ContextPrecompile, ContextPrecompiles, Database, Evm, EvmBuilder, GetInspector,
},
tasks::TaskManager,
};
use reth_chainspec::{Chain, ChainSpec};
use reth_evm::env::EvmEnv;
use reth_node_api::{ConfigureEvm, ConfigureEvmEnv, FullNodeTypes, NodeTypes};
use reth_node_core::{args::RpcServerArgs, node_config::NodeConfig};
use reth_node_ethereum::{
Expand Down Expand Up @@ -178,7 +178,7 @@ impl ConfigureEvmEnv for MyEvmConfig {
&self,
parent: &Self::Header,
attributes: NextBlockEnvAttributes,
) -> Result<(CfgEnvWithHandlerCfg, BlockEnv), Self::Error> {
) -> Result<EvmEnv, Self::Error> {
self.inner.next_cfg_and_block_env(parent, attributes)
}
}
Expand Down

0 comments on commit f586549

Please sign in to comment.