feat(rpc): relax VaidationApi and EngineApi (#13241)

This commit is contained in:
Arsenii Kulikov
2024-12-10 01:48:29 +04:00
committed by GitHub
parent af5dc60867
commit eb6080863b
20 changed files with 259 additions and 193 deletions

View File

@ -6,14 +6,13 @@ use reth_basic_payload_builder::{BasicPayloadJobGenerator, BasicPayloadJobGenera
use reth_beacon_consensus::EthBeaconConsensus;
use reth_chainspec::ChainSpec;
use reth_ethereum_engine_primitives::{
EthBuiltPayload, EthPayloadAttributes, EthPayloadBuilderAttributes, EthereumEngineValidator,
EthBuiltPayload, EthPayloadAttributes, EthPayloadBuilderAttributes,
};
use reth_evm::execute::BasicBlockExecutorProvider;
use reth_evm_ethereum::execute::EthExecutionStrategyFactory;
use reth_network::{NetworkHandle, PeersInfo};
use reth_node_api::{
AddOnsContext, ConfigureEvm, EngineValidator, FullNodeComponents, HeaderTy, NodeTypesWithDB,
TxTy,
AddOnsContext, ConfigureEvm, FullNodeComponents, HeaderTy, NodeTypesWithDB, TxTy,
};
use reth_node_builder::{
components::{
@ -37,6 +36,8 @@ use reth_trie_db::MerklePatriciaTrie;
use crate::{EthEngineTypes, EthEvmConfig};
pub use reth_ethereum_engine_primitives::EthereumEngineValidator;
/// Type configuration for a regular Ethereum node.
#[derive(Debug, Default, Clone, Copy)]
#[non_exhaustive]
@ -353,9 +354,12 @@ pub struct EthereumEngineValidatorBuilder;
impl<Node, Types> EngineValidatorBuilder<Node> for EthereumEngineValidatorBuilder
where
Types: NodeTypesWithEngine<ChainSpec = ChainSpec>,
Types: NodeTypesWithEngine<
ChainSpec = ChainSpec,
Engine = EthEngineTypes,
Primitives = EthPrimitives,
>,
Node: FullNodeComponents<Types = Types>,
EthereumEngineValidator: EngineValidator<Types::Engine>,
{
type Validator = EthereumEngineValidator;