mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
evm: use Header AT in ConfigureEvmEnv (#10968)
This commit is contained in:
@@ -4,6 +4,7 @@ use std::{future::Future, marker::PhantomData};
|
||||
|
||||
use reth_consensus::Consensus;
|
||||
use reth_evm::execute::BlockExecutorProvider;
|
||||
use reth_primitives::Header;
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
|
||||
use crate::{
|
||||
@@ -371,7 +372,7 @@ where
|
||||
F: FnOnce(&BuilderContext<Node>) -> Fut + Send,
|
||||
Fut: Future<Output = eyre::Result<Components<Node, Pool, EVM, Executor, Cons>>> + Send,
|
||||
Pool: TransactionPool + Unpin + 'static,
|
||||
EVM: ConfigureEvm,
|
||||
EVM: ConfigureEvm<Header = Header>,
|
||||
Executor: BlockExecutorProvider,
|
||||
Cons: Consensus + Clone + Unpin + 'static,
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
use crate::{BuilderContext, FullNodeTypes};
|
||||
use reth_evm::execute::BlockExecutorProvider;
|
||||
use reth_node_api::ConfigureEvm;
|
||||
use reth_primitives::Header;
|
||||
use std::future::Future;
|
||||
|
||||
/// A type that knows how to build the executor types.
|
||||
@@ -9,7 +10,7 @@ pub trait ExecutorBuilder<Node: FullNodeTypes>: Send {
|
||||
/// The EVM config to use.
|
||||
///
|
||||
/// This provides the node with the necessary configuration to configure an EVM.
|
||||
type EVM: ConfigureEvm;
|
||||
type EVM: ConfigureEvm<Header = Header>;
|
||||
|
||||
/// The type that knows how to execute blocks.
|
||||
type Executor: BlockExecutorProvider;
|
||||
@@ -24,7 +25,7 @@ pub trait ExecutorBuilder<Node: FullNodeTypes>: Send {
|
||||
impl<Node, F, Fut, EVM, Executor> ExecutorBuilder<Node> for F
|
||||
where
|
||||
Node: FullNodeTypes,
|
||||
EVM: ConfigureEvm,
|
||||
EVM: ConfigureEvm<Header = Header>,
|
||||
Executor: BlockExecutorProvider,
|
||||
F: FnOnce(&BuilderContext<Node>) -> Fut + Send,
|
||||
Fut: Future<Output = eyre::Result<(EVM, Executor)>> + Send,
|
||||
|
||||
@@ -27,6 +27,7 @@ use reth_network::NetworkHandle;
|
||||
use reth_network_api::FullNetwork;
|
||||
use reth_node_api::NodeTypesWithEngine;
|
||||
use reth_payload_builder::PayloadBuilderHandle;
|
||||
use reth_primitives::Header;
|
||||
use reth_transaction_pool::TransactionPool;
|
||||
|
||||
use crate::{ConfigureEvm, FullNodeTypes};
|
||||
@@ -41,7 +42,7 @@ pub trait NodeComponents<T: FullNodeTypes>: Clone + Unpin + Send + Sync + 'stati
|
||||
type Pool: TransactionPool + Unpin;
|
||||
|
||||
/// The node's EVM configuration, defining settings for the Ethereum Virtual Machine.
|
||||
type Evm: ConfigureEvm;
|
||||
type Evm: ConfigureEvm<Header = Header>;
|
||||
|
||||
/// The type that knows how to execute blocks.
|
||||
type Executor: BlockExecutorProvider;
|
||||
@@ -95,7 +96,7 @@ impl<Node, Pool, EVM, Executor, Cons> NodeComponents<Node>
|
||||
where
|
||||
Node: FullNodeTypes,
|
||||
Pool: TransactionPool + Unpin + 'static,
|
||||
EVM: ConfigureEvm,
|
||||
EVM: ConfigureEvm<Header = Header>,
|
||||
Executor: BlockExecutorProvider,
|
||||
Cons: Consensus + Clone + Unpin + 'static,
|
||||
{
|
||||
@@ -136,7 +137,7 @@ impl<Node, Pool, EVM, Executor, Cons> Clone for Components<Node, Pool, EVM, Exec
|
||||
where
|
||||
Node: FullNodeTypes,
|
||||
Pool: TransactionPool,
|
||||
EVM: ConfigureEvm,
|
||||
EVM: ConfigureEvm<Header = Header>,
|
||||
Executor: BlockExecutorProvider,
|
||||
Cons: Consensus + Clone,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user