mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add ExecutionData AT (#14179)
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
//!
|
||||
//! ```
|
||||
//! use reth_consensus::{ConsensusError, FullConsensus};
|
||||
//! use reth_engine_primitives::PayloadValidator;
|
||||
//! use reth_engine_primitives::{ExecutionData, PayloadValidator};
|
||||
//! use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
|
||||
//! use reth_evm_ethereum::EthEvmConfig;
|
||||
//! use reth_network_api::{NetworkInfo, Peers};
|
||||
@ -58,7 +58,7 @@
|
||||
//! Network: NetworkInfo + Peers + Clone + 'static,
|
||||
//! BlockExecutor: BlockExecutorProvider<Primitives = Provider::Primitives>,
|
||||
//! Consensus: FullConsensus<Provider::Primitives, Error = ConsensusError> + Clone + 'static,
|
||||
//! Validator: PayloadValidator<Block = reth_primitives::Block>,
|
||||
//! Validator: PayloadValidator<Block = reth_primitives::Block, ExecutionData = ExecutionData>,
|
||||
//! {
|
||||
//! // configure the rpc module per transport
|
||||
//! let transports = TransportRpcModuleConfig::default().with_http(vec![
|
||||
@ -89,7 +89,7 @@
|
||||
//!
|
||||
//! ```
|
||||
//! use reth_consensus::{ConsensusError, FullConsensus};
|
||||
//! use reth_engine_primitives::{EngineTypes, PayloadValidator};
|
||||
//! use reth_engine_primitives::{EngineTypes, ExecutionData, PayloadValidator};
|
||||
//! use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
|
||||
//! use reth_evm_ethereum::EthEvmConfig;
|
||||
//! use reth_network_api::{NetworkInfo, Peers};
|
||||
@ -146,7 +146,7 @@
|
||||
//! EngineT: EngineTypes,
|
||||
//! BlockExecutor: BlockExecutorProvider<Primitives = Provider::Primitives>,
|
||||
//! Consensus: FullConsensus<Provider::Primitives, Error = ConsensusError> + Clone + 'static,
|
||||
//! Validator: PayloadValidator<Block = reth_primitives::Block>,
|
||||
//! Validator: PayloadValidator<Block = reth_primitives::Block, ExecutionData = ExecutionData>,
|
||||
//! {
|
||||
//! // configure the rpc module per transport
|
||||
//! let transports = TransportRpcModuleConfig::default().with_http(vec![
|
||||
@ -213,7 +213,7 @@ use jsonrpsee::{
|
||||
};
|
||||
use reth_chainspec::EthereumHardforks;
|
||||
use reth_consensus::{ConsensusError, FullConsensus};
|
||||
use reth_engine_primitives::{EngineTypes, PayloadValidator};
|
||||
use reth_engine_primitives::{EngineTypes, ExecutionData, PayloadValidator};
|
||||
use reth_evm::{execute::BlockExecutorProvider, ConfigureEvm};
|
||||
use reth_network_api::{noop::NoopNetwork, NetworkInfo, Peers};
|
||||
use reth_primitives::NodePrimitives;
|
||||
@ -284,7 +284,9 @@ pub async fn launch<Provider, Pool, Network, Tasks, EvmConfig, EthApi, BlockExec
|
||||
eth: DynEthApiBuilder<Provider, Pool, EvmConfig, Network, Tasks, EthApi>,
|
||||
block_executor: BlockExecutor,
|
||||
consensus: Arc<dyn FullConsensus<BlockExecutor::Primitives, Error = ConsensusError>>,
|
||||
payload_validator: Arc<dyn PayloadValidator<Block = Provider::Block>>,
|
||||
payload_validator: Arc<
|
||||
dyn PayloadValidator<Block = Provider::Block, ExecutionData = ExecutionData>,
|
||||
>,
|
||||
) -> Result<RpcServerHandle, RpcError>
|
||||
where
|
||||
Provider: FullRpcProvider<
|
||||
@ -614,7 +616,9 @@ where
|
||||
module_config: TransportRpcModuleConfig,
|
||||
engine: EngineApi,
|
||||
eth: DynEthApiBuilder<Provider, Pool, EvmConfig, Network, Tasks, EthApi>,
|
||||
payload_validator: Arc<dyn PayloadValidator<Block = Provider::Block>>,
|
||||
payload_validator: Arc<
|
||||
dyn PayloadValidator<Block = Provider::Block, ExecutionData = ExecutionData>,
|
||||
>,
|
||||
) -> (
|
||||
TransportRpcModules,
|
||||
AuthRpcModule,
|
||||
@ -665,7 +669,7 @@ where
|
||||
///
|
||||
/// ```no_run
|
||||
/// use reth_consensus::noop::NoopConsensus;
|
||||
/// use reth_engine_primitives::PayloadValidator;
|
||||
/// use reth_engine_primitives::{ExecutionData, PayloadValidator};
|
||||
/// use reth_evm::ConfigureEvm;
|
||||
/// use reth_evm_ethereum::execute::EthExecutorProvider;
|
||||
/// use reth_network_api::noop::NoopNetwork;
|
||||
@ -680,7 +684,8 @@ where
|
||||
/// fn init<Evm, Validator>(evm: Evm, validator: Validator)
|
||||
/// where
|
||||
/// Evm: ConfigureEvm<Header = Header, Transaction = TransactionSigned> + 'static,
|
||||
/// Validator: PayloadValidator<Block = reth_primitives::Block> + 'static,
|
||||
/// Validator: PayloadValidator<Block = reth_primitives::Block, ExecutionData = ExecutionData>
|
||||
/// + 'static,
|
||||
/// {
|
||||
/// let mut registry = RpcModuleBuilder::default()
|
||||
/// .with_provider(NoopProvider::default())
|
||||
@ -699,7 +704,9 @@ where
|
||||
self,
|
||||
config: RpcModuleConfig,
|
||||
eth: DynEthApiBuilder<Provider, Pool, EvmConfig, Network, Tasks, EthApi>,
|
||||
payload_validator: Arc<dyn PayloadValidator<Block = Provider::Block>>,
|
||||
payload_validator: Arc<
|
||||
dyn PayloadValidator<Block = Provider::Block, ExecutionData = ExecutionData>,
|
||||
>,
|
||||
) -> RpcRegistryInner<Provider, Pool, Network, Tasks, EthApi, BlockExecutor, Consensus>
|
||||
where
|
||||
EthApi: EthApiTypes + 'static,
|
||||
@ -726,7 +733,9 @@ where
|
||||
self,
|
||||
module_config: TransportRpcModuleConfig,
|
||||
eth: DynEthApiBuilder<Provider, Pool, EvmConfig, Network, Tasks, EthApi>,
|
||||
payload_validator: Arc<dyn PayloadValidator<Block = Provider::Block>>,
|
||||
payload_validator: Arc<
|
||||
dyn PayloadValidator<Block = Provider::Block, ExecutionData = ExecutionData>,
|
||||
>,
|
||||
) -> TransportRpcModules<()>
|
||||
where
|
||||
EthApi: FullEthApiServer<
|
||||
@ -869,7 +878,8 @@ pub struct RpcRegistryInner<
|
||||
executor: Tasks,
|
||||
block_executor: BlockExecutor,
|
||||
consensus: Consensus,
|
||||
payload_validator: Arc<dyn PayloadValidator<Block = Provider::Block>>,
|
||||
payload_validator:
|
||||
Arc<dyn PayloadValidator<Block = Provider::Block, ExecutionData = ExecutionData>>,
|
||||
/// Holds the configuration for the RPC modules
|
||||
config: RpcModuleConfig,
|
||||
/// Holds a all `eth_` namespace handlers
|
||||
@ -910,7 +920,9 @@ where
|
||||
evm_config: EvmConfig,
|
||||
eth_api_builder: DynEthApiBuilder<Provider, Pool, EvmConfig, Network, Tasks, EthApi>,
|
||||
block_executor: BlockExecutor,
|
||||
payload_validator: Arc<dyn PayloadValidator<Block = Provider::Block>>,
|
||||
payload_validator: Arc<
|
||||
dyn PayloadValidator<Block = Provider::Block, ExecutionData = ExecutionData>,
|
||||
>,
|
||||
) -> Self
|
||||
where
|
||||
EvmConfig: ConfigureEvm<Header = Provider::Header>,
|
||||
|
||||
@ -79,7 +79,7 @@ impl<Provider, EngineT, Pool, Validator, ChainSpec>
|
||||
EngineApi<Provider, EngineT, Pool, Validator, ChainSpec>
|
||||
where
|
||||
Provider: HeaderProvider + BlockReader + StateProviderFactory + 'static,
|
||||
EngineT: EngineTypes,
|
||||
EngineT: EngineTypes<ExecutionData = ExecutionData>,
|
||||
Pool: TransactionPool + 'static,
|
||||
Validator: EngineValidator<EngineT>,
|
||||
ChainSpec: EthereumHardforks + Send + Sync + 'static,
|
||||
@ -748,7 +748,7 @@ impl<Provider, EngineT, Pool, Validator, ChainSpec> EngineApiServer<EngineT>
|
||||
for EngineApi<Provider, EngineT, Pool, Validator, ChainSpec>
|
||||
where
|
||||
Provider: HeaderProvider + BlockReader + StateProviderFactory + 'static,
|
||||
EngineT: EngineTypes,
|
||||
EngineT: EngineTypes<ExecutionData = ExecutionData>,
|
||||
Pool: TransactionPool + 'static,
|
||||
Validator: EngineValidator<EngineT>,
|
||||
ChainSpec: EthereumHardforks + Send + Sync + 'static,
|
||||
|
||||
@ -51,7 +51,10 @@ where
|
||||
config: ValidationApiConfig,
|
||||
task_spawner: Box<dyn TaskSpawner>,
|
||||
payload_validator: Arc<
|
||||
dyn PayloadValidator<Block = <E::Primitives as NodePrimitives>::Block>,
|
||||
dyn PayloadValidator<
|
||||
Block = <E::Primitives as NodePrimitives>::Block,
|
||||
ExecutionData = ExecutionData,
|
||||
>,
|
||||
>,
|
||||
) -> Self {
|
||||
let ValidationApiConfig { disallow, validation_window } = config;
|
||||
@ -468,7 +471,12 @@ pub struct ValidationApiInner<Provider, E: BlockExecutorProvider> {
|
||||
/// Consensus implementation.
|
||||
consensus: Arc<dyn FullConsensus<E::Primitives, Error = ConsensusError>>,
|
||||
/// Execution payload validator.
|
||||
payload_validator: Arc<dyn PayloadValidator<Block = <E::Primitives as NodePrimitives>::Block>>,
|
||||
payload_validator: Arc<
|
||||
dyn PayloadValidator<
|
||||
Block = <E::Primitives as NodePrimitives>::Block,
|
||||
ExecutionData = ExecutionData,
|
||||
>,
|
||||
>,
|
||||
/// Block executor factory.
|
||||
executor_provider: E,
|
||||
/// Set of disallowed addresses
|
||||
|
||||
Reference in New Issue
Block a user