Trait FullNodeComponents

Source
pub trait FullNodeComponents:
    FullNodeTypes
    + Clone
    + 'static {
    type Pool: TransactionPool<Transaction: PoolTransaction<Consensus = TxTy<Self::Types>>> + Unpin;
    type Evm: ConfigureEvm<Primitives = <Self::Types as NodeTypes>::Primitives>;
    type Executor: BlockExecutorProvider<Primitives = <Self::Types as NodeTypes>::Primitives>;
    type Consensus: FullConsensus<<Self::Types as NodeTypes>::Primitives, Error = ConsensusError> + Clone + Unpin + 'static;
    type Network: FullNetwork;

    // Required methods
    fn pool(&self) -> &Self::Pool;
    fn evm_config(&self) -> &Self::Evm;
    fn block_executor(&self) -> &Self::Executor;
    fn consensus(&self) -> &Self::Consensus;
    fn network(&self) -> &Self::Network;
    fn payload_builder_handle(
        &self,
    ) -> &PayloadBuilderHandle<<Self::Types as NodeTypesWithEngine>::Engine>;
    fn provider(&self) -> &Self::Provider;
    fn task_executor(&self) -> &TaskExecutor;
}
Expand description

Encapsulates all types and components of the node.

Required Associated Types§

Source

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

The transaction pool of the node.

Source

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

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

Source

type Executor: BlockExecutorProvider<Primitives = <Self::Types as NodeTypes>::Primitives>

The type that knows how to execute blocks.

Source

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

The consensus type of the node.

Source

type Network: FullNetwork

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 block_executor(&self) -> &Self::Executor

Returns the node’s executor type.

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<<Self::Types as NodeTypesWithEngine>::Engine>

Returns the handle to the payload builder service handling payload building requests from the engine.

Source

fn provider(&self) -> &Self::Provider

Returns the provider of the node.

Source

fn task_executor(&self) -> &TaskExecutor

Returns handle to runtime.

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§