reth_node_builder::components

Trait NodeComponentsBuilder

source
pub trait NodeComponentsBuilder<Node: FullNodeTypes>: Send {
    type Components: NodeComponents<Node>;

    // Required method
    fn build_components(
        self,
        ctx: &BuilderContext<Node>,
    ) -> impl Future<Output = Result<Self::Components>> + Send;
}
Expand description

A type that configures all the customizable components of the node and knows how to build them.

Implementers of this trait are responsible for building all the components of the node: See NodeComponents.

The ComponentsBuilder is a generic, general purpose implementation of this trait that can be used to customize certain components of the node using the builder pattern and defaults, e.g. Ethereum and Optimism. A type that’s responsible for building the components of the node.

Required Associated Types§

source

type Components: NodeComponents<Node>

The components for the node with the given types

Required Methods§

source

fn build_components( self, ctx: &BuilderContext<Node>, ) -> impl Future<Output = Result<Self::Components>> + Send

Consumes the type and returns the created components.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Node, F, Fut, Pool, EVM, Executor, Cons, Val> NodeComponentsBuilder<Node> for F
where Node: FullNodeTypes, F: FnOnce(&BuilderContext<Node>) -> Fut + Send, Fut: Future<Output = Result<Components<Node, Pool, EVM, Executor, Cons, Val>>> + Send, Pool: TransactionPool + Unpin + 'static, EVM: ConfigureEvm<Header = Header>, Executor: BlockExecutorProvider, Cons: Consensus + Clone + Unpin + 'static, Val: EngineValidator<<Node::Types as NodeTypesWithEngine>::Engine> + Clone + Unpin + 'static,

source§

type Components = Components<Node, Pool, EVM, Executor, Cons, Val>

source§

impl<Node, PoolB, PayloadB, NetworkB, ExecB, ConsB, EVB> NodeComponentsBuilder<Node> for ComponentsBuilder<Node, PoolB, PayloadB, NetworkB, ExecB, ConsB, EVB>
where Node: FullNodeTypes, PoolB: PoolBuilder<Node>, NetworkB: NetworkBuilder<Node, PoolB::Pool>, PayloadB: PayloadServiceBuilder<Node, PoolB::Pool>, ExecB: ExecutorBuilder<Node>, ConsB: ConsensusBuilder<Node>, EVB: EngineValidatorBuilder<Node>,

source§

type Components = Components<Node, <PoolB as PoolBuilder<Node>>::Pool, <ExecB as ExecutorBuilder<Node>>::EVM, <ExecB as ExecutorBuilder<Node>>::Executor, <ConsB as ConsensusBuilder<Node>>::Consensus, <EVB as EngineValidatorBuilder<Node>>::Validator>