feat: add Header AT to EthChainSpec (#13046)

This commit is contained in:
Arsenii Kulikov
2024-12-02 04:56:00 +04:00
committed by GitHub
parent 7f88e62781
commit 3f93f35c20
7 changed files with 39 additions and 24 deletions

View File

@ -31,7 +31,7 @@ pub trait NodeTypes: Send + Sync + Unpin + 'static {
/// The node's primitive types, defining basic operations and structures.
type Primitives: NodePrimitives;
/// The type used for configuration of the EVM.
type ChainSpec: EthChainSpec;
type ChainSpec: EthChainSpec<Header = <Self::Primitives as NodePrimitives>::BlockHeader>;
/// The type used to perform state commitment operations.
type StateCommitment: StateCommitment;
/// The type responsible for writing chain primitives to storage.
@ -151,7 +151,7 @@ impl<P, C, SC, S> AnyNodeTypes<P, C, SC, S> {
impl<P, C, SC, S> NodeTypes for AnyNodeTypes<P, C, SC, S>
where
P: NodePrimitives + Send + Sync + Unpin + 'static,
C: EthChainSpec + 'static,
C: EthChainSpec<Header = P::BlockHeader> + 'static,
SC: StateCommitment,
S: Default + Send + Sync + Unpin + Debug + 'static,
{
@ -212,7 +212,7 @@ impl<P, E, C, SC, S> NodeTypes for AnyNodeTypesWithEngine<P, E, C, SC, S>
where
P: NodePrimitives + Send + Sync + Unpin + 'static,
E: EngineTypes + Send + Sync + Unpin,
C: EthChainSpec + 'static,
C: EthChainSpec<Header = P::BlockHeader> + 'static,
SC: StateCommitment,
S: Default + Send + Sync + Unpin + Debug + 'static,
{
@ -226,7 +226,7 @@ impl<P, E, C, SC, S> NodeTypesWithEngine for AnyNodeTypesWithEngine<P, E, C, SC,
where
P: NodePrimitives + Send + Sync + Unpin + 'static,
E: EngineTypes + Send + Sync + Unpin,
C: EthChainSpec + 'static,
C: EthChainSpec<Header = P::BlockHeader> + 'static,
SC: StateCommitment,
S: Default + Send + Sync + Unpin + Debug + 'static,
{