feat: add Primitives AT to BlockExecutorProvider (#12994)

This commit is contained in:
Arsenii Kulikov
2024-11-29 16:53:25 +04:00
committed by GitHub
parent b6b8c474ab
commit 29289ccaec
52 changed files with 591 additions and 409 deletions

View File

@ -48,7 +48,7 @@
//! Events:
//! CanonStateSubscriptions<Primitives = reth_primitives::EthPrimitives> + Clone + 'static,
//! EvmConfig: ConfigureEvm<Header = Header>,
//! BlockExecutor: BlockExecutorProvider,
//! BlockExecutor: BlockExecutorProvider<Primitives = Events::Primitives>,
//! Consensus: reth_consensus::Consensus + Clone + 'static,
//! {
//! // configure the rpc module per transport
@ -130,7 +130,7 @@
//! EngineApi: EngineApiServer<EngineT>,
//! EngineT: EngineTypes,
//! EvmConfig: ConfigureEvm<Header = Header>,
//! BlockExecutor: BlockExecutorProvider,
//! BlockExecutor: BlockExecutorProvider<Primitives = Events::Primitives>,
//! Consensus: reth_consensus::Consensus + Clone + 'static,
//! {
//! // configure the rpc module per transport
@ -198,7 +198,7 @@ use reth_consensus::Consensus;
use reth_engine_primitives::EngineTypes;
use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
use reth_network_api::{noop::NoopNetwork, NetworkInfo, Peers};
use reth_primitives::EthPrimitives;
use reth_primitives::{EthPrimitives, NodePrimitives};
use reth_provider::{
AccountReader, BlockReader, CanonStateSubscriptions, ChainSpecProvider, ChangeSetReader,
EvmEnvProvider, FullRpcProvider, ReceiptProvider, StateProviderFactory,
@ -278,7 +278,12 @@ where
Events: CanonStateSubscriptions<Primitives = EthPrimitives> + Clone + 'static,
EvmConfig: ConfigureEvm<Header = alloy_consensus::Header>,
EthApi: FullEthApiServer,
BlockExecutor: BlockExecutorProvider,
BlockExecutor: BlockExecutorProvider<
Primitives: NodePrimitives<
Block = reth_primitives::Block,
Receipt = reth_primitives::Receipt,
>,
>,
{
let module_config = module_config.into();
server_config
@ -630,7 +635,12 @@ where
Tasks: TaskSpawner + Clone + 'static,
Events: CanonStateSubscriptions<Primitives = EthPrimitives> + Clone + 'static,
EvmConfig: ConfigureEvm<Header = Header>,
BlockExecutor: BlockExecutorProvider,
BlockExecutor: BlockExecutorProvider<
Primitives: NodePrimitives<
Block = reth_primitives::Block,
Receipt = reth_primitives::Receipt,
>,
>,
Consensus: reth_consensus::Consensus + Clone + 'static,
{
/// Configures all [`RpcModule`]s specific to the given [`TransportRpcModuleConfig`] which can
@ -1104,7 +1114,8 @@ where
RpcBlock<EthApi::NetworkTypes>,
RpcReceipt<EthApi::NetworkTypes>,
> + EthApiTypes,
BlockExecutor: BlockExecutorProvider,
BlockExecutor:
BlockExecutorProvider<Primitives: NodePrimitives<Block = reth_primitives::Block>>,
{
/// Register Eth Namespace
///
@ -1250,7 +1261,8 @@ where
pub fn debug_api(&self) -> DebugApi<Provider, EthApi, BlockExecutor>
where
EthApi: EthApiSpec + EthTransactions + TraceExt,
BlockExecutor: BlockExecutorProvider,
BlockExecutor:
BlockExecutorProvider<Primitives: NodePrimitives<Block = reth_primitives::Block>>,
{
DebugApi::new(
self.provider.clone(),
@ -1306,7 +1318,12 @@ where
Tasks: TaskSpawner + Clone + 'static,
Events: CanonStateSubscriptions<Primitives = EthPrimitives> + Clone + 'static,
EthApi: FullEthApiServer,
BlockExecutor: BlockExecutorProvider,
BlockExecutor: BlockExecutorProvider<
Primitives: NodePrimitives<
Block = reth_primitives::Block,
Receipt = reth_primitives::Receipt,
>,
>,
Consensus: reth_consensus::Consensus + Clone + 'static,
{
/// Configures the auth module that includes the