feat: add ChainSpec AT to EngineTypes (#11054)

This commit is contained in:
Arsenii Kulikov
2024-09-23 18:02:57 +03:00
committed by GitHub
parent faca096263
commit cf294ce397
8 changed files with 14 additions and 8 deletions

View File

@ -12,7 +12,6 @@ workspace = true
[dependencies]
# reth
reth-chainspec.workspace = true
reth-execution-types.workspace = true
reth-payload-primitives.workspace = true
reth-primitives.workspace = true

View File

@ -11,7 +11,6 @@
mod invalid_block_hook;
pub use invalid_block_hook::InvalidBlockHook;
use reth_chainspec::ChainSpec;
pub use reth_payload_primitives::{
BuiltPayload, EngineApiMessageVersion, EngineObjectValidationError, PayloadOrAttributes,
PayloadTypes,
@ -32,6 +31,9 @@ pub trait EngineTypes:
+ Serialize
+ 'static
{
/// The chain specification of the node.
type ChainSpec: Send + Sync;
/// Execution Payload V1 type.
type ExecutionPayloadV1: DeserializeOwned + Serialize + Clone + Unpin + Send + Sync + 'static;
/// Execution Payload V2 type.
@ -44,7 +46,7 @@ pub trait EngineTypes:
/// Validates the presence or exclusion of fork-specific fields based on the payload attributes
/// and the message version.
fn validate_version_specific_fields(
chain_spec: &ChainSpec,
chain_spec: &Self::ChainSpec,
version: EngineApiMessageVersion,
payload_or_attrs: PayloadOrAttributes<'_, Self::PayloadAttributes>,
) -> Result<(), EngineObjectValidationError>;