diff --git a/crates/e2e-test-utils/src/lib.rs b/crates/e2e-test-utils/src/lib.rs index 091e871844bd..609205a846d6 100644 --- a/crates/e2e-test-utils/src/lib.rs +++ b/crates/e2e-test-utils/src/lib.rs @@ -13,7 +13,7 @@ use reth_node_builder::{ PayloadTypes, }; use reth_node_core::args::{DiscoveryArgs, NetworkArgs, RpcServerArgs}; -use reth_provider::providers::{BlockchainProvider, NodeTypesForProvider, NodeTypesForTree}; +use reth_provider::providers::{BlockchainProvider, NodeTypesForProvider}; use reth_rpc_server_types::RpcModuleSelection; use reth_tasks::TaskManager; use std::sync::Arc; @@ -51,7 +51,7 @@ pub async fn setup( attributes_generator: impl Fn(u64) -> <::Engine as PayloadTypes>::PayloadBuilderAttributes + Copy + 'static, ) -> eyre::Result<(Vec>, TaskManager, Wallet)> where - N: Default + Node> + NodeTypesForTree + NodeTypesWithEngine, + N: Default + Node> + NodeTypesForProvider + NodeTypesWithEngine, N::ComponentsBuilder: NodeComponentsBuilder< TmpNodeAdapter, Components: NodeComponents, Network: PeersHandleProvider>, diff --git a/crates/node/builder/src/builder/mod.rs b/crates/node/builder/src/builder/mod.rs index 8134f8d56eaf..d81868a66c37 100644 --- a/crates/node/builder/src/builder/mod.rs +++ b/crates/node/builder/src/builder/mod.rs @@ -34,7 +34,7 @@ use reth_node_core::{ primitives::Head, }; use reth_provider::{ - providers::{BlockchainProvider, NodeTypesForProvider, NodeTypesForTree}, + providers::{BlockchainProvider, NodeTypesForProvider}, ChainSpecProvider, FullProvider, }; use reth_tasks::TaskExecutor; @@ -242,7 +242,7 @@ where /// Configures the types of the node. pub fn with_types(self) -> NodeBuilderWithTypes> where - T: NodeTypesWithEngine + NodeTypesForTree, + T: NodeTypesWithEngine + NodeTypesForProvider, { self.with_types_and_provider() } @@ -266,7 +266,7 @@ where node: N, ) -> NodeBuilderWithComponents, N::ComponentsBuilder, N::AddOns> where - N: Node, ChainSpec = ChainSpec> + NodeTypesForTree, + N: Node, ChainSpec = ChainSpec> + NodeTypesForProvider, { self.with_types().with_components(node.components_builder()).with_add_ons(node.add_ons()) } @@ -303,7 +303,7 @@ where /// Configures the types of the node. pub fn with_types(self) -> WithLaunchContext>> where - T: NodeTypesWithEngine + NodeTypesForTree, + T: NodeTypesWithEngine + NodeTypesForProvider, { WithLaunchContext { builder: self.builder.with_types(), task_executor: self.task_executor } } @@ -332,7 +332,7 @@ where NodeBuilderWithComponents, N::ComponentsBuilder, N::AddOns>, > where - N: Node, ChainSpec = ChainSpec> + NodeTypesForTree, + N: Node, ChainSpec = ChainSpec> + NodeTypesForProvider, { self.with_types().with_components(node.components_builder()).with_add_ons(node.add_ons()) } @@ -351,14 +351,14 @@ where >>::Node, > where - N: Node, ChainSpec = ChainSpec> + NodeTypesForTree, + N: Node, ChainSpec = ChainSpec> + NodeTypesForProvider, N::AddOns: RethRpcAddOns< NodeAdapter< RethFullAdapter, >>::Components, >, >, - N::Primitives: FullNodePrimitives, + N::Primitives: FullNodePrimitives, EngineNodeLauncher: LaunchNode< NodeBuilderWithComponents, N::ComponentsBuilder, N::AddOns>, >, @@ -549,7 +549,7 @@ where impl WithLaunchContext, CB, AO>> where DB: Database + DatabaseMetrics + DatabaseMetadata + Clone + Unpin + 'static, - T: NodeTypesWithEngine + NodeTypesForTree, + T: NodeTypesWithEngine + NodeTypesForProvider, CB: NodeComponentsBuilder>, AO: RethRpcAddOns, CB::Components>>, EngineNodeLauncher: LaunchNode, CB, AO>>, diff --git a/crates/storage/provider/src/providers/mod.rs b/crates/storage/provider/src/providers/mod.rs index 7ac5bde40741..3d8193a5ee27 100644 --- a/crates/storage/provider/src/providers/mod.rs +++ b/crates/storage/provider/src/providers/mod.rs @@ -3,7 +3,6 @@ use reth_chainspec::EthereumHardforks; use reth_db::table::Value; use reth_node_types::{FullNodePrimitives, NodeTypes, NodeTypesWithDB, NodeTypesWithEngine}; -use reth_primitives::EthPrimitives; mod database; pub use database::*; @@ -61,23 +60,7 @@ where } impl ProviderNodeTypes for T where T: NodeTypesForProvider + NodeTypesWithDB {} -/// A helper trait with requirements for [`NodeTypesForProvider`] to be used within legacy -/// blockchain tree. -pub trait NodeTypesForTree: - NodeTypesForProvider + NodeTypesWithEngine -{ -} -impl NodeTypesForTree for T where - T: NodeTypesForProvider + NodeTypesWithEngine -{ -} - /// Helper trait expressing requirements for node types to be used in engine. pub trait EngineNodeTypes: ProviderNodeTypes + NodeTypesWithEngine {} impl EngineNodeTypes for T where T: ProviderNodeTypes + NodeTypesWithEngine {} - -/// Helper trait with requirements for [`ProviderNodeTypes`] to be used within legacy blockchain -/// tree. -pub trait TreeNodeTypes: ProviderNodeTypes + NodeTypesForTree {} -impl TreeNodeTypes for T where T: ProviderNodeTypes + NodeTypesForTree {}