mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: move database to FullNodeTypes (#13414)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -8126,6 +8126,7 @@ dependencies = [
|
||||
"eyre",
|
||||
"reth-beacon-consensus",
|
||||
"reth-consensus",
|
||||
"reth-db-api",
|
||||
"reth-engine-primitives",
|
||||
"reth-evm",
|
||||
"reth-network-api",
|
||||
|
||||
@ -209,7 +209,7 @@ where
|
||||
/// Testing database
|
||||
pub type TmpDB = Arc<TempDatabase<DatabaseEnv>>;
|
||||
type TmpNodeAdapter<N, Provider = BlockchainProvider<NodeTypesWithDBAdapter<N, TmpDB>>> =
|
||||
FullNodeTypesAdapter<NodeTypesWithDBAdapter<N, TmpDB>, Provider>;
|
||||
FullNodeTypesAdapter<N, TmpDB, Provider>;
|
||||
|
||||
/// Type alias for a `NodeAdapter`
|
||||
pub type Adapter<N, Provider = BlockchainProvider<NodeTypesWithDBAdapter<N, TmpDB>>> = NodeAdapter<
|
||||
|
||||
@ -10,9 +10,7 @@ use reth_ethereum_payload_builder::EthereumBuilderConfig;
|
||||
use reth_evm::execute::BasicBlockExecutorProvider;
|
||||
use reth_evm_ethereum::execute::EthExecutionStrategyFactory;
|
||||
use reth_network::{EthNetworkPrimitives, NetworkHandle, PeersInfo};
|
||||
use reth_node_api::{
|
||||
AddOnsContext, ConfigureEvm, FullNodeComponents, HeaderTy, NodeTypesWithDB, TxTy,
|
||||
};
|
||||
use reth_node_api::{AddOnsContext, ConfigureEvm, FullNodeComponents, HeaderTy, TxTy};
|
||||
use reth_node_builder::{
|
||||
components::{
|
||||
ComponentsBuilder, ConsensusBuilder, ExecutorBuilder, NetworkBuilder,
|
||||
@ -94,16 +92,9 @@ pub type EthereumAddOns<N> = RpcAddOns<
|
||||
EthereumEngineValidatorBuilder,
|
||||
>;
|
||||
|
||||
impl<Types, N> Node<N> for EthereumNode
|
||||
impl<N> Node<N> for EthereumNode
|
||||
where
|
||||
Types: NodeTypesWithDB
|
||||
+ NodeTypesWithEngine<
|
||||
Engine = EthEngineTypes,
|
||||
ChainSpec = ChainSpec,
|
||||
Primitives = EthPrimitives,
|
||||
Storage = EthStorage,
|
||||
>,
|
||||
N: FullNodeTypes<Types = Types>,
|
||||
N: FullNodeTypes<Types = Self>,
|
||||
{
|
||||
type ComponentsBuilder = ComponentsBuilder<
|
||||
N,
|
||||
|
||||
@ -175,7 +175,8 @@ pub type Adapter = NodeAdapter<
|
||||
RethFullAdapter<TmpDB, TestNode>,
|
||||
<<TestNode as Node<
|
||||
FullNodeTypesAdapter<
|
||||
NodeTypesWithDBAdapter<TestNode, TmpDB>,
|
||||
TestNode,
|
||||
TmpDB,
|
||||
BlockchainProvider<NodeTypesWithDBAdapter<TestNode, TmpDB>>,
|
||||
>,
|
||||
>>::ComponentsBuilder as NodeComponentsBuilder<RethFullAdapter<TmpDB, TestNode>>>::Components,
|
||||
@ -290,7 +291,7 @@ pub async fn test_exex_context_with_chain_spec(
|
||||
|
||||
let (_, payload_builder) = NoopPayloadBuilderService::<EthEngineTypes>::new();
|
||||
|
||||
let components = NodeAdapter::<FullNodeTypesAdapter<_, _>, _> {
|
||||
let components = NodeAdapter::<FullNodeTypesAdapter<_, _, _>, _> {
|
||||
components: Components {
|
||||
transaction_pool,
|
||||
evm_config,
|
||||
|
||||
@ -12,6 +12,7 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
# reth
|
||||
reth-db-api.workspace = true
|
||||
reth-beacon-consensus.workspace = true
|
||||
reth-consensus.workspace = true
|
||||
reth-evm.workspace = true
|
||||
|
||||
@ -4,10 +4,14 @@ use crate::ConfigureEvm;
|
||||
use alloy_rpc_types_engine::JwtSecret;
|
||||
use reth_beacon_consensus::BeaconConsensusEngineHandle;
|
||||
use reth_consensus::FullConsensus;
|
||||
use reth_db_api::{
|
||||
database_metrics::{DatabaseMetadata, DatabaseMetrics},
|
||||
Database,
|
||||
};
|
||||
use reth_evm::execute::BlockExecutorProvider;
|
||||
use reth_network_api::FullNetwork;
|
||||
use reth_node_core::node_config::NodeConfig;
|
||||
use reth_node_types::{HeaderTy, NodeTypes, NodeTypesWithDB, NodeTypesWithEngine, TxTy};
|
||||
use reth_node_types::{HeaderTy, NodeTypes, NodeTypesWithDBAdapter, NodeTypesWithEngine, TxTy};
|
||||
use reth_payload_builder_primitives::PayloadBuilder;
|
||||
use reth_provider::FullProvider;
|
||||
use reth_tasks::TaskExecutor;
|
||||
@ -20,26 +24,25 @@ use std::{future::Future, marker::PhantomData};
|
||||
/// Its types are configured by node internally and are not intended to be user configurable.
|
||||
pub trait FullNodeTypes: Send + Sync + Unpin + 'static {
|
||||
/// Node's types with the database.
|
||||
type Types: NodeTypesWithDB + NodeTypesWithEngine;
|
||||
type Types: NodeTypesWithEngine;
|
||||
/// Underlying database type used by the node to store and retrieve data.
|
||||
type DB: Database + DatabaseMetrics + DatabaseMetadata + Clone + Unpin + 'static;
|
||||
/// The provider type used to interact with the node.
|
||||
type Provider: FullProvider<Self::Types>;
|
||||
type Provider: FullProvider<NodeTypesWithDBAdapter<Self::Types, Self::DB>>;
|
||||
}
|
||||
|
||||
/// An adapter type that adds the builtin provider type to the user configured node types.
|
||||
#[derive(Debug)]
|
||||
pub struct FullNodeTypesAdapter<Types, Provider> {
|
||||
/// An instance of the user configured node types.
|
||||
pub types: PhantomData<Types>,
|
||||
/// The provider type used by the node.
|
||||
pub provider: PhantomData<Provider>,
|
||||
}
|
||||
pub struct FullNodeTypesAdapter<Types, DB, Provider>(PhantomData<(Types, DB, Provider)>);
|
||||
|
||||
impl<Types, Provider> FullNodeTypes for FullNodeTypesAdapter<Types, Provider>
|
||||
impl<Types, DB, Provider> FullNodeTypes for FullNodeTypesAdapter<Types, DB, Provider>
|
||||
where
|
||||
Types: NodeTypesWithDB + NodeTypesWithEngine,
|
||||
Provider: FullProvider<Types>,
|
||||
Types: NodeTypesWithEngine,
|
||||
DB: Database + DatabaseMetrics + DatabaseMetadata + Clone + Unpin + 'static,
|
||||
Provider: FullProvider<NodeTypesWithDBAdapter<Types, DB>>,
|
||||
{
|
||||
type Types = Types;
|
||||
type DB = DB;
|
||||
type Provider = Provider;
|
||||
}
|
||||
|
||||
|
||||
@ -50,10 +50,8 @@ pub use states::*;
|
||||
|
||||
/// The adapter type for a reth node with the builtin provider type
|
||||
// Note: we need to hardcode this because custom components might depend on it in associated types.
|
||||
pub type RethFullAdapter<DB, Types> = FullNodeTypesAdapter<
|
||||
NodeTypesWithDBAdapter<Types, DB>,
|
||||
BlockchainProvider<NodeTypesWithDBAdapter<Types, DB>>,
|
||||
>;
|
||||
pub type RethFullAdapter<DB, Types> =
|
||||
FullNodeTypesAdapter<Types, DB, BlockchainProvider<NodeTypesWithDBAdapter<Types, DB>>>;
|
||||
|
||||
#[allow(clippy::doc_markdown)]
|
||||
#[cfg_attr(doc, aquamarine::aquamarine)]
|
||||
@ -252,7 +250,7 @@ where
|
||||
/// Configures the types of the node and the provider type that will be used by the node.
|
||||
pub fn with_types_and_provider<T, P>(
|
||||
self,
|
||||
) -> NodeBuilderWithTypes<FullNodeTypesAdapter<NodeTypesWithDBAdapter<T, DB>, P>>
|
||||
) -> NodeBuilderWithTypes<FullNodeTypesAdapter<T, DB, P>>
|
||||
where
|
||||
T: NodeTypesWithEngine<ChainSpec = ChainSpec> + NodeTypesForProvider,
|
||||
P: FullProvider<NodeTypesWithDBAdapter<T, DB>>,
|
||||
@ -313,9 +311,7 @@ where
|
||||
/// Configures the types of the node and the provider type that will be used by the node.
|
||||
pub fn with_types_and_provider<T, P>(
|
||||
self,
|
||||
) -> WithLaunchContext<
|
||||
NodeBuilderWithTypes<FullNodeTypesAdapter<NodeTypesWithDBAdapter<T, DB>, P>>,
|
||||
>
|
||||
) -> WithLaunchContext<NodeBuilderWithTypes<FullNodeTypesAdapter<T, DB, P>>>
|
||||
where
|
||||
T: NodeTypesWithEngine<ChainSpec = ChainSpec> + NodeTypesForProvider,
|
||||
P: FullProvider<NodeTypesWithDBAdapter<T, DB>>,
|
||||
|
||||
@ -13,7 +13,7 @@ use crate::{
|
||||
AddOns, FullNode,
|
||||
};
|
||||
use reth_exex::ExExContext;
|
||||
use reth_node_api::{FullNodeComponents, FullNodeTypes, NodeAddOns, NodeTypes, NodeTypesWithDB};
|
||||
use reth_node_api::{FullNodeComponents, FullNodeTypes, NodeAddOns, NodeTypes};
|
||||
use reth_node_core::node_config::NodeConfig;
|
||||
use reth_tasks::TaskExecutor;
|
||||
use std::{fmt, future::Future};
|
||||
@ -30,7 +30,7 @@ impl<T: FullNodeTypes> NodeBuilderWithTypes<T> {
|
||||
/// Creates a new instance of the node builder with the given configuration and types.
|
||||
pub const fn new(
|
||||
config: NodeConfig<<T::Types as NodeTypes>::ChainSpec>,
|
||||
database: <T::Types as NodeTypesWithDB>::DB,
|
||||
database: T::DB,
|
||||
) -> Self {
|
||||
Self { config, adapter: NodeTypesAdapter::new(database) }
|
||||
}
|
||||
@ -54,12 +54,12 @@ impl<T: FullNodeTypes> NodeBuilderWithTypes<T> {
|
||||
/// Container for the node's types and the database the node uses.
|
||||
pub struct NodeTypesAdapter<T: FullNodeTypes> {
|
||||
/// The database type used by the node.
|
||||
pub database: <T::Types as NodeTypesWithDB>::DB,
|
||||
pub database: T::DB,
|
||||
}
|
||||
|
||||
impl<T: FullNodeTypes> NodeTypesAdapter<T> {
|
||||
/// Create a new adapter from the given node types.
|
||||
pub(crate) const fn new(database: <T::Types as NodeTypesWithDB>::DB) -> Self {
|
||||
pub(crate) const fn new(database: T::DB) -> Self {
|
||||
Self { database }
|
||||
}
|
||||
}
|
||||
@ -83,6 +83,7 @@ pub struct NodeAdapter<T: FullNodeTypes, C: NodeComponents<T>> {
|
||||
|
||||
impl<T: FullNodeTypes, C: NodeComponents<T>> FullNodeTypes for NodeAdapter<T, C> {
|
||||
type Types = T::Types;
|
||||
type DB = T::DB;
|
||||
type Provider = T::Provider;
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,10 @@ use rayon::ThreadPoolBuilder;
|
||||
use reth_chainspec::{Chain, EthChainSpec, EthereumHardforks};
|
||||
use reth_config::{config::EtlConfig, PruneConfig};
|
||||
use reth_consensus::noop::NoopConsensus;
|
||||
use reth_db_api::{database::Database, database_metrics::DatabaseMetrics};
|
||||
use reth_db_api::{
|
||||
database::Database,
|
||||
database_metrics::{DatabaseMetadata, DatabaseMetrics},
|
||||
};
|
||||
use reth_db_common::init::{init_genesis, InitStorageError};
|
||||
use reth_downloaders::{bodies::noop::NoopBodiesDownloader, headers::noop::NoopHeaderDownloader};
|
||||
use reth_engine_local::MiningMode;
|
||||
@ -24,6 +27,7 @@ use reth_invalid_block_hooks::InvalidBlockWitnessHook;
|
||||
use reth_network_p2p::headers::client::HeadersClient;
|
||||
use reth_node_api::{
|
||||
FullNodePrimitives, FullNodeTypes, NodePrimitives, NodeTypes, NodeTypesWithDB,
|
||||
NodeTypesWithDBAdapter,
|
||||
};
|
||||
use reth_node_core::{
|
||||
args::InvalidBlockHookType,
|
||||
@ -44,7 +48,7 @@ use reth_node_metrics::{
|
||||
};
|
||||
use reth_primitives::{Head, TransactionSigned};
|
||||
use reth_provider::{
|
||||
providers::{ProviderNodeTypes, StaticFileProvider},
|
||||
providers::{NodeTypesForProvider, ProviderNodeTypes, StaticFileProvider},
|
||||
BlockHashReader, BlockNumReader, ChainSpecProvider, ProviderError, ProviderFactory,
|
||||
ProviderResult, StageCheckpointReader, StateProviderFactory, StaticFileProviderFactory,
|
||||
};
|
||||
@ -567,12 +571,16 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<N> LaunchContextWith<Attached<WithConfigs<N::ChainSpec>, WithMeteredProvider<N>>>
|
||||
impl<N, DB>
|
||||
LaunchContextWith<
|
||||
Attached<WithConfigs<N::ChainSpec>, WithMeteredProvider<NodeTypesWithDBAdapter<N, DB>>>,
|
||||
>
|
||||
where
|
||||
N: NodeTypesWithDB,
|
||||
N: NodeTypes,
|
||||
DB: Database + DatabaseMetrics + DatabaseMetadata + Clone + Unpin + 'static,
|
||||
{
|
||||
/// Returns the configured `ProviderFactory`.
|
||||
const fn provider_factory(&self) -> &ProviderFactory<N> {
|
||||
const fn provider_factory(&self) -> &ProviderFactory<NodeTypesWithDBAdapter<N, DB>> {
|
||||
&self.right().provider_factory
|
||||
}
|
||||
|
||||
@ -588,8 +596,8 @@ where
|
||||
create_blockchain_provider: F,
|
||||
) -> eyre::Result<LaunchContextWith<Attached<WithConfigs<N::ChainSpec>, WithMeteredProviders<T>>>>
|
||||
where
|
||||
T: FullNodeTypes<Types = N>,
|
||||
F: FnOnce(ProviderFactory<N>) -> eyre::Result<T::Provider>,
|
||||
T: FullNodeTypes<Types = N, DB = DB>,
|
||||
F: FnOnce(ProviderFactory<NodeTypesWithDBAdapter<N, DB>>) -> eyre::Result<T::Provider>,
|
||||
{
|
||||
let blockchain_db = create_blockchain_provider(self.provider_factory().clone())?;
|
||||
|
||||
@ -615,15 +623,17 @@ impl<T>
|
||||
Attached<WithConfigs<<T::Types as NodeTypes>::ChainSpec>, WithMeteredProviders<T>>,
|
||||
>
|
||||
where
|
||||
T: FullNodeTypes<Types: ProviderNodeTypes>,
|
||||
T: FullNodeTypes<Types: NodeTypesForProvider>,
|
||||
{
|
||||
/// Returns access to the underlying database.
|
||||
pub const fn database(&self) -> &<T::Types as NodeTypesWithDB>::DB {
|
||||
pub const fn database(&self) -> &T::DB {
|
||||
self.provider_factory().db_ref()
|
||||
}
|
||||
|
||||
/// Returns the configured `ProviderFactory`.
|
||||
pub const fn provider_factory(&self) -> &ProviderFactory<T::Types> {
|
||||
pub const fn provider_factory(
|
||||
&self,
|
||||
) -> &ProviderFactory<NodeTypesWithDBAdapter<T::Types, T::DB>> {
|
||||
&self.right().db_provider_container.provider_factory
|
||||
}
|
||||
|
||||
@ -708,11 +718,13 @@ impl<T, CB>
|
||||
Attached<WithConfigs<<T::Types as NodeTypes>::ChainSpec>, WithComponents<T, CB>>,
|
||||
>
|
||||
where
|
||||
T: FullNodeTypes<Types: ProviderNodeTypes>,
|
||||
T: FullNodeTypes<Types: NodeTypesForProvider>,
|
||||
CB: NodeComponentsBuilder<T>,
|
||||
{
|
||||
/// Returns the configured `ProviderFactory`.
|
||||
pub const fn provider_factory(&self) -> &ProviderFactory<T::Types> {
|
||||
pub const fn provider_factory(
|
||||
&self,
|
||||
) -> &ProviderFactory<NodeTypesWithDBAdapter<T::Types, T::DB>> {
|
||||
&self.right().db_provider_container.provider_factory
|
||||
}
|
||||
|
||||
@ -731,7 +743,9 @@ where
|
||||
}
|
||||
|
||||
/// Creates a new [`StaticFileProducer`] with the attached database.
|
||||
pub fn static_file_producer(&self) -> StaticFileProducer<ProviderFactory<T::Types>> {
|
||||
pub fn static_file_producer(
|
||||
&self,
|
||||
) -> StaticFileProducer<ProviderFactory<NodeTypesWithDBAdapter<T::Types, T::DB>>> {
|
||||
StaticFileProducer::new(self.provider_factory().clone(), self.prune_modes())
|
||||
}
|
||||
|
||||
@ -865,7 +879,7 @@ impl<T, CB>
|
||||
where
|
||||
T: FullNodeTypes<
|
||||
Provider: StateProviderFactory + ChainSpecProvider,
|
||||
Types: ProviderNodeTypes<Primitives: NodePrimitives<SignedTx = TransactionSigned>>,
|
||||
Types: NodeTypesForProvider<Primitives: NodePrimitives<SignedTx = TransactionSigned>>,
|
||||
>,
|
||||
CB: NodeComponentsBuilder<T>,
|
||||
{
|
||||
@ -1008,7 +1022,7 @@ pub struct WithMeteredProviders<T>
|
||||
where
|
||||
T: FullNodeTypes,
|
||||
{
|
||||
db_provider_container: WithMeteredProvider<T::Types>,
|
||||
db_provider_container: WithMeteredProvider<NodeTypesWithDBAdapter<T::Types, T::DB>>,
|
||||
blockchain_db: T::Provider,
|
||||
}
|
||||
|
||||
@ -1019,7 +1033,7 @@ where
|
||||
T: FullNodeTypes,
|
||||
CB: NodeComponentsBuilder<T>,
|
||||
{
|
||||
db_provider_container: WithMeteredProvider<T::Types>,
|
||||
db_provider_container: WithMeteredProvider<NodeTypesWithDBAdapter<T::Types, T::DB>>,
|
||||
node_adapter: NodeAdapter<T, CB::Components>,
|
||||
head: Head,
|
||||
}
|
||||
|
||||
@ -3,10 +3,14 @@
|
||||
use futures::{future::Either, stream, stream_select, StreamExt};
|
||||
use reth_beacon_consensus::{
|
||||
hooks::{EngineHooks, StaticFileHook},
|
||||
BeaconConsensusEngineHandle, EngineNodeTypes,
|
||||
BeaconConsensusEngineHandle,
|
||||
};
|
||||
use reth_chainspec::EthChainSpec;
|
||||
use reth_consensus_debug_client::{DebugConsensusClient, EtherscanBlockProvider};
|
||||
use reth_db_api::{
|
||||
database_metrics::{DatabaseMetadata, DatabaseMetrics},
|
||||
Database,
|
||||
};
|
||||
use reth_engine_local::{LocalEngineService, LocalPayloadAttributesBuilder};
|
||||
use reth_engine_service::service::{ChainEvent, EngineService};
|
||||
use reth_engine_tree::{
|
||||
@ -18,8 +22,8 @@ use reth_exex::ExExManagerHandle;
|
||||
use reth_network::{NetworkSyncUpdater, SyncState};
|
||||
use reth_network_api::BlockDownloaderProvider;
|
||||
use reth_node_api::{
|
||||
BlockTy, BuiltPayload, EngineValidator, FullNodeTypes, NodeTypesWithEngine,
|
||||
PayloadAttributesBuilder, PayloadBuilder, PayloadTypes,
|
||||
BlockTy, BuiltPayload, EngineValidator, FullNodeTypes, NodeTypesWithDBAdapter,
|
||||
NodeTypesWithEngine, PayloadAttributesBuilder, PayloadBuilder, PayloadTypes,
|
||||
};
|
||||
use reth_node_core::{
|
||||
dirs::{ChainPath, DataDirPath},
|
||||
@ -28,7 +32,7 @@ use reth_node_core::{
|
||||
};
|
||||
use reth_node_events::{cl::ConsensusLayerHealthEvents, node};
|
||||
use reth_primitives::{EthPrimitives, EthereumHardforks};
|
||||
use reth_provider::providers::BlockchainProvider2;
|
||||
use reth_provider::providers::{BlockchainProvider2, NodeTypesForProvider};
|
||||
use reth_tasks::TaskExecutor;
|
||||
use reth_tokio_util::EventSender;
|
||||
use reth_tracing::tracing::{debug, error, info};
|
||||
@ -67,10 +71,15 @@ impl EngineNodeLauncher {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Types, T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for EngineNodeLauncher
|
||||
impl<Types, DB, T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for EngineNodeLauncher
|
||||
where
|
||||
Types: EngineNodeTypes<Primitives = EthPrimitives>,
|
||||
T: FullNodeTypes<Types = Types, Provider = BlockchainProvider2<Types>>,
|
||||
Types: NodeTypesForProvider + NodeTypesWithEngine<Primitives = EthPrimitives>,
|
||||
DB: Database + DatabaseMetrics + DatabaseMetadata + Clone + Unpin + 'static,
|
||||
T: FullNodeTypes<
|
||||
Types = Types,
|
||||
DB = DB,
|
||||
Provider = BlockchainProvider2<NodeTypesWithDBAdapter<Types, DB>>,
|
||||
>,
|
||||
CB: NodeComponentsBuilder<T>,
|
||||
AO: RethRpcAddOns<NodeAdapter<T, CB::Components>>
|
||||
+ EngineValidatorAddOn<
|
||||
|
||||
@ -8,6 +8,10 @@ pub(crate) mod engine;
|
||||
pub use common::LaunchContext;
|
||||
use common::{Attached, LaunchContextWith, WithConfigs};
|
||||
pub use exex::ExExLauncher;
|
||||
use reth_db_api::{
|
||||
database_metrics::{DatabaseMetadata, DatabaseMetrics},
|
||||
Database,
|
||||
};
|
||||
|
||||
use std::{future::Future, sync::Arc};
|
||||
|
||||
@ -17,21 +21,21 @@ use reth_beacon_consensus::{
|
||||
BeaconConsensusEngine,
|
||||
};
|
||||
use reth_blockchain_tree::{
|
||||
externals::TreeNodeTypes, noop::NoopBlockchainTree, BlockchainTree, BlockchainTreeConfig,
|
||||
ShareableBlockchainTree, TreeExternals,
|
||||
noop::NoopBlockchainTree, BlockchainTree, BlockchainTreeConfig, ShareableBlockchainTree,
|
||||
TreeExternals,
|
||||
};
|
||||
use reth_chainspec::EthChainSpec;
|
||||
use reth_consensus_debug_client::{DebugConsensusClient, EtherscanBlockProvider, RpcBlockProvider};
|
||||
use reth_engine_util::EngineMessageStreamExt;
|
||||
use reth_exex::ExExManagerHandle;
|
||||
use reth_network::BlockDownloaderProvider;
|
||||
use reth_node_api::{AddOnsContext, FullNodeTypes, NodeTypesWithEngine};
|
||||
use reth_node_api::{AddOnsContext, FullNodeTypes, NodeTypesWithDBAdapter, NodeTypesWithEngine};
|
||||
use reth_node_core::{
|
||||
dirs::{ChainPath, DataDirPath},
|
||||
exit::NodeExitFuture,
|
||||
};
|
||||
use reth_node_events::{cl::ConsensusLayerHealthEvents, node};
|
||||
use reth_provider::providers::{BlockchainProvider, ProviderNodeTypes};
|
||||
use reth_provider::providers::{BlockchainProvider, NodeTypesForTree};
|
||||
use reth_rpc::eth::RpcNodeCore;
|
||||
use reth_tasks::TaskExecutor;
|
||||
use reth_tracing::tracing::{debug, info};
|
||||
@ -99,10 +103,15 @@ impl DefaultNodeLauncher {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Types, T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for DefaultNodeLauncher
|
||||
impl<Types, DB, T, CB, AO> LaunchNode<NodeBuilderWithComponents<T, CB, AO>> for DefaultNodeLauncher
|
||||
where
|
||||
Types: ProviderNodeTypes + NodeTypesWithEngine + TreeNodeTypes,
|
||||
T: FullNodeTypes<Provider = BlockchainProvider<Types>, Types = Types>,
|
||||
Types: NodeTypesWithEngine + NodeTypesForTree,
|
||||
DB: Database + DatabaseMetrics + DatabaseMetadata + Clone + Unpin + 'static,
|
||||
T: FullNodeTypes<
|
||||
Provider = BlockchainProvider<NodeTypesWithDBAdapter<Types, DB>>,
|
||||
Types = Types,
|
||||
DB = DB,
|
||||
>,
|
||||
CB: NodeComponentsBuilder<T>,
|
||||
AO: RethRpcAddOns<NodeAdapter<T, CB::Components>>,
|
||||
{
|
||||
|
||||
@ -19,7 +19,7 @@ use reth_node_core::{
|
||||
};
|
||||
use reth_payload_builder::PayloadStore;
|
||||
use reth_primitives::{EthPrimitives, PooledTransaction};
|
||||
use reth_provider::providers::ProviderNodeTypes;
|
||||
use reth_provider::providers::NodeTypesForProvider;
|
||||
use reth_rpc::{
|
||||
eth::{EthApiTypes, FullEthApiServer},
|
||||
EthApi,
|
||||
@ -535,7 +535,7 @@ where
|
||||
impl<N, EthApi, EV> NodeAddOns<N> for RpcAddOns<N, EthApi, EV>
|
||||
where
|
||||
N: FullNodeComponents<
|
||||
Types: ProviderNodeTypes<Primitives = EthPrimitives>,
|
||||
Types: NodeTypesForProvider<Primitives = EthPrimitives>,
|
||||
Pool: TransactionPool<Transaction: PoolTransaction<Pooled = PooledTransaction>>,
|
||||
>,
|
||||
EthApi: EthApiTypes
|
||||
|
||||
Reference in New Issue
Block a user