diff --git a/bin/reth/src/main.rs b/bin/reth/src/main.rs index 45f56ce94c..a81649d111 100644 --- a/bin/reth/src/main.rs +++ b/bin/reth/src/main.rs @@ -29,7 +29,7 @@ fn main() { install_ress_subprotocol( ress_args, node.provider, - node.block_executor, + node.evm_config, node.network, node.task_executor, node.add_ons_handle.engine_events.new_listener(), diff --git a/bin/reth/src/ress.rs b/bin/reth/src/ress.rs index 0eb8480fd4..43ddcb6a3a 100644 --- a/bin/reth/src/ress.rs +++ b/bin/reth/src/ress.rs @@ -1,5 +1,5 @@ use reth_ethereum_primitives::EthPrimitives; -use reth_evm::execute::BlockExecutorProvider; +use reth_evm::ConfigureEvm; use reth_network::{protocol::IntoRlpxSubProtocol, NetworkProtocols}; use reth_network_api::FullNetwork; use reth_node_api::BeaconConsensusEngineEvent; @@ -16,14 +16,14 @@ use tracing::*; pub fn install_ress_subprotocol
( args: RessArgs, provider: BlockchainProvider
,
- block_executor: E,
+ evm_config: E,
network: N,
task_executor: TaskExecutor,
engine_events: EventStream {
/// The provider to read the historical state and do the EVM execution.
provider: P,
/// The EVM configuration to use for the execution.
- executor: E,
+ evm_config: E,
/// The directory to write the witness to. Additionally, diff files will be written to this
/// directory in case of failed sanity checks.
output_directory: PathBuf,
@@ -128,11 +128,11 @@ impl InvalidBlockWitnessHook {
/// Creates a new witness hook.
pub const fn new(
provider: P,
- executor: E,
+ evm_config: E,
output_directory: PathBuf,
healthy_node_client: Option >(
+ pub fn new >(
id: String,
node_head: BlockNumHash,
provider: P,
- executor: E,
+ evm_config: E,
wal_handle: WalHandle ) {
let (notification_tx, notification_rx) = mpsc::channel(1);
let (event_tx, event_rx) = mpsc::unbounded_channel();
let notifications =
- ExExNotifications::new(node_head, provider, executor, notification_rx, wal_handle);
+ ExExNotifications::new(node_head, provider, evm_config, notification_rx, wal_handle);
(
Self {
@@ -663,7 +663,7 @@ mod tests {
use futures::{StreamExt, TryStreamExt};
use rand::Rng;
use reth_db_common::init::init_genesis;
- use reth_evm_ethereum::{execute::EthExecutorProvider, MockExecutorProvider};
+ use reth_evm_ethereum::{execute::EthExecutorProvider, EthEvmConfig};
use reth_primitives_traits::RecoveredBlock;
use reth_provider::{
providers::BlockchainProvider, test_utils::create_test_provider_factory, BlockReader,
@@ -687,7 +687,7 @@ mod tests {
"test_exex".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
@@ -707,7 +707,7 @@ mod tests {
"test_exex_1".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
@@ -729,7 +729,7 @@ mod tests {
"test_exex_1".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
@@ -757,7 +757,7 @@ mod tests {
"test_exex".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
@@ -812,7 +812,7 @@ mod tests {
"test_exex".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
@@ -863,7 +863,7 @@ mod tests {
"test_exex".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
@@ -918,14 +918,14 @@ mod tests {
"test_exex1".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
let (exex_handle2, event_tx2, _) = ExExHandle::new(
"test_exex2".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
@@ -975,14 +975,14 @@ mod tests {
"test_exex1".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
let (exex_handle2, event_tx2, _) = ExExHandle::new(
"test_exex2".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
@@ -1038,7 +1038,7 @@ mod tests {
"test_exex_1".to_string(),
Default::default(),
(),
- MockExecutorProvider::default(),
+ EthEvmConfig::mainnet(),
wal.handle(),
);
diff --git a/crates/exex/exex/src/notifications.rs b/crates/exex/exex/src/notifications.rs
index 675b1f4a07..eac5208f2f 100644
--- a/crates/exex/exex/src/notifications.rs
+++ b/crates/exex/exex/src/notifications.rs
@@ -3,7 +3,7 @@ use alloy_consensus::BlockHeader;
use alloy_eips::BlockNumHash;
use futures::{Stream, StreamExt};
use reth_ethereum_primitives::EthPrimitives;
-use reth_evm::execute::BlockExecutorProvider;
+use reth_evm::ConfigureEvm;
use reth_exex_types::ExExHead;
use reth_node_api::NodePrimitives;
use reth_provider::{BlockReader, Chain, HeaderProvider, StateProviderFactory};
@@ -22,7 +22,7 @@ use tokio::sync::mpsc::Receiver;
#[derive(Debug)]
pub struct ExExNotifications
where
- E: BlockExecutorProvider,
+ E: ConfigureEvm,
{
inner: ExExNotificationsInner ,
}
@@ -66,7 +66,7 @@ pub trait ExExNotificationsStream
where
- E: BlockExecutorProvider,
+ E: ConfigureEvm,
{
/// A stream of [`ExExNotification`]s. The stream will emit notifications for all blocks.
WithoutHead(ExExNotificationsWithoutHead ),
@@ -80,13 +80,13 @@ where
impl ExExNotifications
where
- E: BlockExecutorProvider,
+ E: ConfigureEvm,
{
/// Creates a new stream of [`ExExNotifications`] without a head.
pub const fn new(
node_head: BlockNumHash,
provider: P,
- executor: E,
+ evm_config: E,
notifications: Receiver ExExNotificationsStream
where
P: BlockReader + HeaderProvider + StateProviderFactory + Clone + Unpin + 'static,
- E: BlockExecutorProvider Stream for ExExNotifications
where
P: BlockReader + HeaderProvider + StateProviderFactory + Clone + Unpin + 'static,
- E: BlockExecutorProvider
where
- E: BlockExecutorProvider,
+ E: ConfigureEvm,
{
node_head: BlockNumHash,
provider: P,
- executor: E,
+ evm_config: E,
notifications: Receiver
where
- E: Debug + BlockExecutorProvider,
+ E: ConfigureEvm + Debug,
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("ExExNotifications")
.field("provider", &self.provider)
- .field("executor", &self.executor)
+ .field("evm_config", &self.evm_config)
.field("notifications", &self.notifications)
.finish()
}
@@ -207,17 +201,17 @@ where
impl ExExNotificationsWithoutHead
where
- E: BlockExecutorProvider,
+ E: ConfigureEvm,
{
/// Creates a new instance of [`ExExNotificationsWithoutHead`].
const fn new(
node_head: BlockNumHash,
provider: P,
- executor: E,
+ evm_config: E,
notifications: Receiver
where
- E: Unpin + BlockExecutorProvider,
+ E: ConfigureEvm,
{
type Item = ExExNotification
where
- E: BlockExecutorProvider,
+ E: ConfigureEvm,
{
/// The node's local head at launch.
initial_local_head: BlockNumHash,
provider: P,
- executor: E,
+ evm_config: E,
notifications: Receiver ExExNotificationsWithHead
where
- E: BlockExecutorProvider,
+ E: ConfigureEvm,
{
/// Creates a new [`ExExNotificationsWithHead`].
const fn new(
node_head: BlockNumHash,
provider: P,
- executor: E,
+ evm_config: E,
notifications: Receiver ExExNotificationsWithHead
where
P: BlockReader + HeaderProvider + StateProviderFactory + Clone + Unpin + 'static,
- E: BlockExecutorProvider Stream for ExExNotificationsWithHead
where
P: BlockReader + HeaderProvider + StateProviderFactory + Clone + Unpin + 'static,
- E: BlockExecutorProvider