Trait NodeComponents

Source
pub trait NodeComponents<T: FullNodeTypes>:
    Clone
    + Debug
    + Unpin
    + Send
    + Sync
    + 'static {
    type Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<T::Types>>> + Unpin;
    type Evm: ConfigureEvm<Primitives = <T::Types as NodeTypes>::Primitives>;
    type Consensus: FullConsensus<<T::Types as NodeTypes>::Primitives, Error = ConsensusError> + Clone + Unpin + 'static;
    type Network: FullNetwork<Primitives: NetPrimitivesFor<<T::Types as NodeTypes>::Primitives>>;

    // Required methods
    fn pool(&self) -> &Self::Pool;
    fn evm_config(&self) -> &Self::Evm;
    fn consensus(&self) -> &Self::Consensus;
    fn network(&self) -> &Self::Network;
    fn payload_builder_handle(
        &self,
    ) -> &PayloadBuilderHandle<<T::Types as NodeTypes>::Payload>;
}
Expand description

An abstraction over the components of a node, consisting of:

  • evm and executor
  • transaction pool
  • network
  • payload builder.

Required Associated Types§

Source

type Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<T::Types>>> + Unpin

The transaction pool of the node.

Source

type Evm: ConfigureEvm<Primitives = <T::Types as NodeTypes>::Primitives>

The node’s EVM configuration, defining settings for the Ethereum Virtual Machine.

Source

type Consensus: FullConsensus<<T::Types as NodeTypes>::Primitives, Error = ConsensusError> + Clone + Unpin + 'static

The consensus type of the node.

Source

type Network: FullNetwork<Primitives: NetPrimitivesFor<<T::Types as NodeTypes>::Primitives>>

Network API.

Required Methods§

Source

fn pool(&self) -> &Self::Pool

Returns the transaction pool of the node.

Source

fn evm_config(&self) -> &Self::Evm

Returns the node’s evm config.

Source

fn consensus(&self) -> &Self::Consensus

Returns the node’s consensus type.

Source

fn network(&self) -> &Self::Network

Returns the handle to the network

Source

fn payload_builder_handle( &self, ) -> &PayloadBuilderHandle<<T::Types as NodeTypes>::Payload>

Returns the handle to the payload builder service handling payload building requests from the 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.

Implementors§

Source§

impl<Node, Pool, EVM, Cons, Network> NodeComponents<Node> for Components<Node, Network, Pool, EVM, Cons>
where Node: FullNodeTypes, Network: FullNetwork<Primitives: NetPrimitivesFor<PrimitivesTy<Node::Types>, PooledTransaction = PoolPooledTx<Pool>>>, Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Node::Types>>> + Unpin + 'static, EVM: ConfigureEvm<Primitives = PrimitivesTy<Node::Types>> + 'static, Cons: FullConsensus<PrimitivesTy<Node::Types>, Error = ConsensusError> + Clone + Unpin + 'static,

Source§

type Pool = Pool

Source§

type Evm = EVM

Source§

type Consensus = Cons

Source§

type Network = Network