Trait NodeTypes

pub trait NodeTypes:
    Clone
    + Debug
    + Send
    + Sync
    + Unpin
    + 'static {
    type Primitives: NodePrimitives;
    type ChainSpec: EthChainSpec<Header = <Self::Primitives as NodePrimitives>::BlockHeader>;
    type StateCommitment: StateCommitment;
    type Storage: Default + Send + Sync + Unpin + Debug + 'static;
    type Payload: PayloadTypes
       where <Self::Payload as PayloadTypes>::BuiltPayload: BuiltPayload<Primitives = Self::Primitives>;
}
Expand description

The type that configures the essential types of an Ethereum-like node.

This includes the primitive types of a node and chain specification.

This trait is intended to be stateless and only define the types of the node.

Required Associated Types§

type Primitives: NodePrimitives

The node’s primitive types, defining basic operations and structures.

type ChainSpec: EthChainSpec<Header = <Self::Primitives as NodePrimitives>::BlockHeader>

The type used for configuration of the EVM.

type StateCommitment: StateCommitment

The type used to perform state commitment operations.

type Storage: Default + Send + Sync + Unpin + Debug + 'static

The type responsible for writing chain primitives to storage.

type Payload: PayloadTypes where <Self::Payload as PayloadTypes>::BuiltPayload: BuiltPayload<Primitives = Self::Primitives>

The node’s engine types, defining the interaction with the consensus engine.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl NodeTypes for EthereumNode

§

type Primitives = EthPrimitives

§

type ChainSpec = ChainSpec

§

type StateCommitment = MerklePatriciaTrie

§

type Storage = EthStorage

§

type Payload = EthEngineTypes

Implementors§

Source§

impl<N, C, AO> NodeTypes for AnyNode<N, C, AO>
where N: FullNodeTypes, C: Clone + Debug + Send + Sync + Unpin + 'static, AO: Clone + Debug + Send + Sync + Unpin + 'static,

§

impl<P, C, SC, S, PL> NodeTypes for AnyNodeTypes<P, C, SC, S, PL>
where P: NodePrimitives + Send + Sync + Unpin + 'static, C: EthChainSpec<Header = <P as NodePrimitives>::BlockHeader> + Clone + 'static, SC: StateCommitment, S: Default + Clone + Send + Sync + Unpin + Debug + 'static, PL: PayloadTypes + Send + Sync + Unpin + 'static, <PL as PayloadTypes>::BuiltPayload: BuiltPayload<Primitives = P>,

§

type Primitives = P

§

type ChainSpec = C

§

type StateCommitment = SC

§

type Storage = S

§

type Payload = PL

§

impl<P, E, C, SC, S, PL> NodeTypes for AnyNodeTypesWithEngine<P, E, C, SC, S, PL>
where P: NodePrimitives + Send + Sync + Unpin + 'static, E: EngineTypes + Send + Sync + Unpin, C: EthChainSpec<Header = <P as NodePrimitives>::BlockHeader> + Clone + 'static, SC: StateCommitment, S: Default + Clone + Send + Sync + Unpin + Debug + 'static, PL: PayloadTypes + Send + Sync + Unpin + 'static, <PL as PayloadTypes>::BuiltPayload: BuiltPayload<Primitives = P>,

§

type Primitives = P

§

type ChainSpec = C

§

type StateCommitment = SC

§

type Storage = S

§

type Payload = PL

§

impl<Types, DB> NodeTypes for NodeTypesWithDBAdapter<Types, DB>
where Types: NodeTypes, DB: Clone + Debug + Send + Sync + Unpin + 'static,

§

type Primitives = <Types as NodeTypes>::Primitives

§

type ChainSpec = <Types as NodeTypes>::ChainSpec

§

type StateCommitment = <Types as NodeTypes>::StateCommitment

§

type Storage = <Types as NodeTypes>::Storage

§

type Payload = <Types as NodeTypes>::Payload

impl NodeTypes for TestNode

impl NodeTypes for OpNode