Trait NodePrimitives

pub trait NodePrimitives:
    Send
    + Sync
    + Unpin
    + Clone
    + Default
    + Debug
    + PartialEq
    + Eq
    + 'static {
    type Block: Block<Header = Self::BlockHeader, Body = Self::BlockBody> + MaybeSerdeBincodeCompat;
    type BlockHeader: FullBlockHeader;
    type BlockBody: FullBlockBody<Transaction = Self::SignedTx, OmmerHeader = Self::BlockHeader>;
    type SignedTx: FullSignedTx;
    type Receipt: Receipt;
}
Expand description

Configures all the primitive types of the node.

This trait defines the core types used throughout the node for representing blockchain data. It serves as the foundation for type consistency across different node implementations.

Required Associated Types§

type Block: Block<Header = Self::BlockHeader, Body = Self::BlockBody> + MaybeSerdeBincodeCompat

Block primitive.

type BlockHeader: FullBlockHeader

Block header primitive.

type BlockBody: FullBlockBody<Transaction = Self::SignedTx, OmmerHeader = Self::BlockHeader>

Block body primitive.

type SignedTx: FullSignedTx

Signed version of the transaction type.

This represents the transaction as it exists in the blockchain - the consensus format that includes the signature and can be included in a block.

type Receipt: Receipt

A receipt.

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 NodePrimitives for OpPrimitives

§

type Block = Block<OpTxEnvelope>

§

type BlockHeader = Header

§

type BlockBody = <Block<OpTxEnvelope> as Block>::Body

§

type SignedTx = OpTxEnvelope

§

type Receipt = OpReceipt

Implementors§

§

impl NodePrimitives for EthPrimitives

§

type Block = Block<EthereumTxEnvelope<TxEip4844>>

§

type BlockHeader = Header

§

type BlockBody = BlockBody<EthereumTxEnvelope<TxEip4844>>

§

type SignedTx = EthereumTxEnvelope<TxEip4844>

§

type Receipt = Receipt