reth::network

Trait NetworkPrimitives

Source
pub trait NetworkPrimitives:
    Send
    + Sync
    + Unpin
    + Clone
    + Debug
    + PartialEq
    + Eq
    + 'static {
    type BlockHeader: BlockHeader + 'static;
    type BlockBody: BlockBody + 'static;
    type Block: Block<Header = Self::BlockHeader, Body = Self::BlockBody> + Encodable + Decodable + 'static;
    type BroadcastedTransaction: SignedTransaction + 'static;
    type PooledTransaction: SignedTransaction + TryFrom<Self::BroadcastedTransaction> + 'static;
    type Receipt: TxReceipt + RlpEncodableReceipt + RlpDecodableReceipt + Encodable + Decodable + Unpin + 'static;
}
Expand description

Abstraction over primitive types which might appear in network messages. See crate::EthMessage for more context.

Required Associated Types§

Source

type BlockHeader: BlockHeader + 'static

The block header type.

Source

type BlockBody: BlockBody + 'static

The block body type.

Source

type Block: Block<Header = Self::BlockHeader, Body = Self::BlockBody> + Encodable + Decodable + 'static

Full block type.

Source

type BroadcastedTransaction: SignedTransaction + 'static

The transaction type which peers announce in Transactions messages. It is different from PooledTransactions to account for Ethereum case where EIP-4844 transactions are not being announced and can only be explicitly requested from peers.

Source

type PooledTransaction: SignedTransaction + TryFrom<Self::BroadcastedTransaction> + 'static

The transaction type which peers return in PooledTransactions messages.

Source

type Receipt: TxReceipt + RlpEncodableReceipt + RlpDecodableReceipt + Encodable + Decodable + Unpin + 'static

The transaction type which peers return in GetReceipts messages.

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.

Implementors§