reth::builder::components

Trait NodeComponents

Source
pub trait NodeComponents<T>:
    Clone
    + Unpin
    + Send
    + Sync
    + 'static
where T: FullNodeTypes,
{ type Pool: TransactionPool + Unpin where <Self::Pool as TransactionPool>::Transaction: PoolTransaction<Consensus = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx>; type Evm: ConfigureEvm<Header = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader, Transaction = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx>; type Executor: BlockExecutorProvider<Primitives = <<T as FullNodeTypes>::Types as NodeTypes>::Primitives>; type Consensus: FullConsensus<<<T as FullNodeTypes>::Types as NodeTypes>::Primitives> + Clone + Unpin + 'static; type Network: FullNetwork where <Self::Network as BlockDownloaderProvider>::Client: BlockClient<Header = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader, Body = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockBody>; type PayloadBuilder: PayloadBuilder<PayloadType = <<T as FullNodeTypes>::Types as NodeTypesWithEngine>::Engine> + Clone; // 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(&self) -> &Self::PayloadBuilder; }
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 + Unpin where <Self::Pool as TransactionPool>::Transaction: PoolTransaction<Consensus = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx>

The transaction pool of the node.

Source

type Evm: ConfigureEvm<Header = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader, Transaction = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx>

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

Source

type Executor: BlockExecutorProvider<Primitives = <<T as FullNodeTypes>::Types as NodeTypes>::Primitives>

The type that knows how to execute blocks.

Source

type Consensus: FullConsensus<<<T as FullNodeTypes>::Types as NodeTypes>::Primitives> + Clone + Unpin + 'static

The consensus type of the node.

Source

type Network: FullNetwork where <Self::Network as BlockDownloaderProvider>::Client: BlockClient<Header = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader, Body = <<<T as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockBody>

Network API.

Source

type PayloadBuilder: PayloadBuilder<PayloadType = <<T as FullNodeTypes>::Types as NodeTypesWithEngine>::Engine> + Clone

Builds new blocks.

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

Returns the handle to the payload builder service.

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, Executor, Cons, N> NodeComponents<Node> for Components<Node, N, Pool, EVM, Executor, Cons>
where N: NetworkPrimitives<BlockHeader = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader, BlockBody = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockBody>, Node: FullNodeTypes, Pool: TransactionPool + Unpin + 'static, <Pool as TransactionPool>::Transaction: PoolTransaction<Consensus = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx>, EVM: ConfigureEvm<Header = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::BlockHeader, Transaction = <<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::SignedTx>, Executor: BlockExecutorProvider<Primitives = <<Node as FullNodeTypes>::Types as NodeTypes>::Primitives>, Cons: FullConsensus<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives> + Clone + Unpin + 'static,