add doc_markdown clippy lint (#8552)

Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Thomas Coratger
2024-06-03 15:21:45 +02:00
committed by GitHub
parent 34af610b8e
commit 7c17c6e469
440 changed files with 2166 additions and 2145 deletions

View File

@@ -47,38 +47,38 @@ pub type RethFullAdapter<DB, Types> = FullNodeTypesAdapter<Types, DB, Blockchain
/// ## Order
///
/// Configuring a node starts out with a [`NodeConfig`] (this can be obtained from cli arguments for
/// example) and then proceeds to configure the core static types of the node: [NodeTypes], these
/// example) and then proceeds to configure the core static types of the node: [`NodeTypes`], these
/// include the node's primitive types and the node's engine types.
///
/// Next all stateful components of the node are configured, these include all the
/// components of the node that are downstream of those types, these include:
///
/// - The EVM and Executor configuration: [ExecutorBuilder](crate::components::ExecutorBuilder)
/// - The transaction pool: [PoolBuilder]
/// - The network: [NetworkBuilder](crate::components::NetworkBuilder)
/// - The payload builder: [PayloadBuilder](crate::components::PayloadServiceBuilder)
/// - The EVM and Executor configuration: [`ExecutorBuilder`](crate::components::ExecutorBuilder)
/// - The transaction pool: [`PoolBuilder`]
/// - The network: [`NetworkBuilder`](crate::components::NetworkBuilder)
/// - The payload builder: [`PayloadBuilder`](crate::components::PayloadServiceBuilder)
///
/// Once all the components are configured, the node is ready to be launched.
///
/// On launch the builder returns a fully type aware [NodeHandle] that has access to all the
/// On launch the builder returns a fully type aware [`NodeHandle`] that has access to all the
/// configured components and can interact with the node.
///
/// There are convenience functions for networks that come with a preset of types and components via
/// the [Node] trait, see `reth_node_ethereum::EthereumNode` or `reth_node_optimism::OptimismNode`.
///
/// The [NodeBuilder::node] function configures the node's types and components in one step.
/// The [`NodeBuilder::node`] function configures the node's types and components in one step.
///
/// ## Components
///
/// All components are configured with a [NodeComponentsBuilder] that is responsible for actually
/// All components are configured with a [`NodeComponentsBuilder`] that is responsible for actually
/// creating the node components during the launch process. The
/// [ComponentsBuilder](crate::components::ComponentsBuilder) is a general purpose implementation of
/// the [NodeComponentsBuilder] trait that can be used to configure the executor, network,
/// [`ComponentsBuilder`](crate::components::ComponentsBuilder) is a general purpose implementation
/// of the [`NodeComponentsBuilder`] trait that can be used to configure the executor, network,
/// transaction pool and payload builder of the node. It enforces the correct order of
/// configuration, for example the network and the payload builder depend on the transaction pool
/// type that is configured first.
///
/// All builder traits are generic over the node types and are invoked with the [BuilderContext]
/// All builder traits are generic over the node types and are invoked with the [`BuilderContext`]
/// that gives access to internals of the that are needed to configure the components. This include
/// the original config, chain spec, the database provider and the task executor,
///
@@ -86,44 +86,45 @@ pub type RethFullAdapter<DB, Types> = FullNodeTypesAdapter<Types, DB, Blockchain
///
/// Once all the components are configured, the builder can be used to set hooks that are run at
/// specific points in the node's lifecycle. This way custom services can be spawned before the node
/// is launched [NodeBuilder::on_component_initialized], or once the rpc server(s) are launched
/// [NodeBuilder::on_rpc_started]. The [NodeBuilder::extend_rpc_modules] can be used to inject
/// custom rpc modules into the rpc server before it is launched. See also [RpcContext]
/// is launched [`NodeBuilder::on_component_initialized`], or once the rpc server(s) are launched
/// [`NodeBuilder::on_rpc_started`]. The [`NodeBuilder::extend_rpc_modules`] can be used to inject
/// custom rpc modules into the rpc server before it is launched. See also [`RpcContext`]
/// All hooks accept a closure that is then invoked at the appropriate time in the node's launch
/// process.
///
/// ## Flow
///
/// The [NodeBuilder] is intended to sit behind a CLI that provides the necessary [NodeConfig]
/// input: [NodeBuilder::new]
/// The [`NodeBuilder`] is intended to sit behind a CLI that provides the necessary [`NodeConfig`]
/// input: [`NodeBuilder::new`]
///
/// From there the builder is configured with the node's types, components, and hooks, then launched
/// with the [NodeBuilder::launch] method. On launch all the builtin internals, such as the
/// `Database` and its providers [BlockchainProvider] are initialized before the configured
/// [NodeComponentsBuilder] is invoked with the [BuilderContext] to create the transaction pool,
/// with the [`NodeBuilder::launch`] method. On launch all the builtin internals, such as the
/// `Database` and its providers [`BlockchainProvider`] are initialized before the configured
/// [`NodeComponentsBuilder`] is invoked with the [`BuilderContext`] to create the transaction pool,
/// network, and payload builder components. When the RPC is configured, the corresponding hooks are
/// invoked to allow for custom rpc modules to be injected into the rpc server:
/// [NodeBuilder::extend_rpc_modules]
/// [`NodeBuilder::extend_rpc_modules`]
///
/// Finally all components are created and all services are launched and a [NodeHandle] is returned
/// that can be used to interact with the node: [FullNode]
/// Finally all components are created and all services are launched and a [`NodeHandle`] is
/// returned that can be used to interact with the node: [`FullNode`]
///
/// The following diagram shows the flow of the node builder from CLI to a launched node.
///
/// include_mmd!("docs/mermaid/builder.mmd")
/// `include_mmd!("docs/mermaid/builder.mmd`")
///
/// ## Internals
///
/// The node builder is fully type safe, it uses the [NodeTypes] trait to enforce that all
/// The node builder is fully type safe, it uses the [`NodeTypes`] trait to enforce that all
/// components are configured with the correct types. However the database types and with that the
/// provider trait implementations are currently created by the builder itself during the launch
/// process, hence the database type is not part of the [NodeTypes] trait and the node's components,
/// that depend on the database, are configured separately. In order to have a nice trait that
/// encapsulates the entire node the [FullNodeComponents] trait was introduced. This trait has
/// convenient associated types for all the components of the node. After [NodeBuilder::launch] the
/// [NodeHandle] contains an instance of [FullNode] that implements the [FullNodeComponents] trait
/// and has access to all the components of the node. Internally the node builder uses several
/// generic adapter types that are then map to traits with associated types for ease of use.
/// process, hence the database type is not part of the [`NodeTypes`] trait and the node's
/// components, that depend on the database, are configured separately. In order to have a nice
/// trait that encapsulates the entire node the [`FullNodeComponents`] trait was introduced. This
/// trait has convenient associated types for all the components of the node. After
/// [`NodeBuilder::launch`] the [`NodeHandle`] contains an instance of [`FullNode`] that implements
/// the [`FullNodeComponents`] trait and has access to all the components of the node. Internally
/// the node builder uses several generic adapter types that are then map to traits with associated
/// types for ease of use.
///
/// ### Limitations
///
@@ -209,10 +210,10 @@ where
}
}
/// A [NodeBuilder] with it's launch context already configured.
/// A [`NodeBuilder`] with it's launch context already configured.
///
/// This exposes the same methods as [NodeBuilder] but with the launch context already configured,
/// See [WithLaunchContext::launch]
/// This exposes the same methods as [`NodeBuilder`] but with the launch context already configured,
/// See [`WithLaunchContext::launch`]
pub struct WithLaunchContext<Builder> {
builder: Builder,
task_executor: TaskExecutor,
@@ -269,7 +270,7 @@ where
///
/// This bootstraps the node internals, creates all the components with the given [Node]
///
/// Returns a [NodeHandle] that can be used to interact with the node.
/// Returns a [`NodeHandle`] that can be used to interact with the node.
pub async fn launch_node<N>(
self,
node: N,
@@ -378,11 +379,11 @@ where
}
}
/// Installs an ExEx (Execution Extension) in the node.
/// Installs an `ExEx` (Execution Extension) in the node.
///
/// # Note
///
/// The ExEx ID must be unique.
/// The `ExEx` ID must be unique.
pub fn install_exex<F, R, E>(self, exex_id: impl Into<String>, exex: F) -> Self
where
F: FnOnce(ExExContext<NodeAdapter<RethFullAdapter<DB, T>, CB::Components>>) -> R
@@ -433,7 +434,7 @@ pub struct BuilderContext<Node: FullNodeTypes> {
}
impl<Node: FullNodeTypes> BuilderContext<Node> {
/// Create a new instance of [BuilderContext]
/// Create a new instance of [`BuilderContext`]
pub const fn new(
head: Head,
provider: Node::Provider,
@@ -505,7 +506,7 @@ impl<Node: FullNodeTypes> BuilderContext<Node> {
)
}
/// Creates the [NetworkBuilder] for the node.
/// Creates the [`NetworkBuilder`] for the node.
pub async fn network_builder(&self) -> eyre::Result<NetworkBuilder<Node::Provider, (), ()>> {
self.config
.build_network(
@@ -520,8 +521,8 @@ impl<Node: FullNodeTypes> BuilderContext<Node> {
/// Convenience function to start the network.
///
/// Spawns the configured network and associated tasks and returns the [NetworkHandle] connected
/// to that network.
/// Spawns the configured network and associated tasks and returns the [`NetworkHandle`]
/// connected to that network.
pub fn start_network<Pool>(
&self,
builder: NetworkBuilder<Node::Provider, (), ()>,

View File

@@ -197,11 +197,11 @@ impl<T: FullNodeTypes, CB: NodeComponentsBuilder<T>> NodeBuilderWithComponents<T
self
}
/// Installs an ExEx (Execution Extension) in the node.
/// Installs an `ExEx` (Execution Extension) in the node.
///
/// # Note
///
/// The ExEx ID must be unique.
/// The `ExEx` ID must be unique.
pub fn install_exex<F, R, E>(mut self, exex_id: impl Into<String>, exex: F) -> Self
where
F: FnOnce(ExExContext<NodeAdapter<T, CB::Components>>) -> R + Send + 'static,
@@ -230,10 +230,10 @@ impl<T: FullNodeTypes, CB: NodeComponentsBuilder<T>> NodeBuilderWithComponents<T
/// Additional node extensions.
pub(crate) struct NodeAddOns<Node: FullNodeComponents> {
/// Additional NodeHooks that are called at specific points in the node's launch lifecycle.
/// Additional `NodeHooks` that are called at specific points in the node's launch lifecycle.
pub(crate) hooks: NodeHooks<Node>,
/// Additional RPC hooks.
pub(crate) rpc: RpcHooks<Node>,
/// The ExExs (execution extensions) of the node.
/// The `ExExs` (execution extensions) of the node.
pub(crate) exexs: Vec<(String, Box<dyn BoxedLaunchExEx<Node>>)>,
}

View File

@@ -1,4 +1,4 @@
//! A generic [NodeComponentsBuilder]
//! A generic [`NodeComponentsBuilder`]
use crate::{
components::{
@@ -115,7 +115,7 @@ where
{
/// Configures the pool builder.
///
/// This accepts a [PoolBuilder] instance that will be used to create the node's transaction
/// This accepts a [`PoolBuilder`] instance that will be used to create the node's transaction
/// pool.
pub fn pool<PB>(
self,
@@ -149,7 +149,7 @@ where
{
/// Configures the network builder.
///
/// This accepts a [NetworkBuilder] instance that will be used to create the node's network
/// This accepts a [`NetworkBuilder`] instance that will be used to create the node's network
/// stack.
pub fn network<NB>(
self,
@@ -176,7 +176,7 @@ where
/// Configures the payload builder.
///
/// This accepts a [PayloadServiceBuilder] instance that will be used to create the node's
/// This accepts a [`PayloadServiceBuilder`] instance that will be used to create the node's
/// payload builder service.
pub fn payload<PB>(
self,
@@ -203,8 +203,8 @@ where
/// Configures the executor builder.
///
/// This accepts a [ExecutorBuilder] instance that will be used to create the node's components
/// for execution.
/// This accepts a [`ExecutorBuilder`] instance that will be used to create the node's
/// components for execution.
pub fn executor<EB>(
self,
executor_builder: EB,
@@ -271,9 +271,9 @@ impl Default for ComponentsBuilder<(), (), (), (), ()> {
/// 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].
/// [`NodeComponents`].
///
/// The [ComponentsBuilder] is a generic, general purpose implementation of this trait that can be
/// 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.

View File

@@ -9,7 +9,7 @@ use std::future::Future;
pub trait PayloadServiceBuilder<Node: FullNodeTypes, Pool: TransactionPool>: Send {
/// Spawns the payload service and returns the handle to it.
///
/// The [BuilderContext] is provided to allow access to the node's configuration.
/// The [`BuilderContext`] is provided to allow access to the node's configuration.
fn spawn_payload_service(
self,
ctx: &BuilderContext<Node>,

View File

@@ -4,11 +4,11 @@ use reth_exex::ExExContext;
use reth_node_api::FullNodeComponents;
use std::future::Future;
/// A trait for launching an ExEx.
/// A trait for launching an `ExEx`.
trait LaunchExEx<Node: FullNodeComponents>: Send {
/// Launches the ExEx.
/// Launches the `ExEx`.
///
/// The ExEx should be able to run independently and emit events on the channels provided in
/// The `ExEx` should be able to run independently and emit events on the channels provided in
/// the [`ExExContext`].
fn launch(
self,
@@ -18,15 +18,15 @@ trait LaunchExEx<Node: FullNodeComponents>: Send {
type BoxExEx = BoxFuture<'static, eyre::Result<()>>;
/// A version of [LaunchExEx] that returns a boxed future. Makes the trait object-safe.
/// A version of [`LaunchExEx`] that returns a boxed future. Makes the trait object-safe.
pub(crate) trait BoxedLaunchExEx<Node: FullNodeComponents>: Send {
fn launch(self: Box<Self>, ctx: ExExContext<Node>)
-> BoxFuture<'static, eyre::Result<BoxExEx>>;
}
/// Implements [BoxedLaunchExEx] for any [LaunchExEx] that is [Send] and `'static`.
/// Implements [`BoxedLaunchExEx`] for any [`LaunchExEx`] that is [Send] and `'static`.
///
/// Returns a [BoxFuture] that resolves to a [BoxExEx].
/// Returns a [`BoxFuture`] that resolves to a [`BoxExEx`].
impl<E, Node> BoxedLaunchExEx<Node> for E
where
E: LaunchExEx<Node> + Send + 'static,
@@ -44,8 +44,8 @@ where
}
}
/// Implements `LaunchExEx` for any closure that takes an [ExExContext] and returns a future
/// resolving to an ExEx.
/// Implements `LaunchExEx` for any closure that takes an [`ExExContext`] and returns a future
/// resolving to an `ExEx`.
impl<Node, F, Fut, E> LaunchExEx<Node> for F
where
Node: FullNodeComponents,

View File

@@ -10,7 +10,7 @@ pub(crate) struct NodeHooks<Node: FullNodeComponents> {
}
impl<Node: FullNodeComponents> NodeHooks<Node> {
/// Creates a new, empty [NodeHooks] instance for the given node type.
/// Creates a new, empty [`NodeHooks`] instance for the given node type.
pub(crate) fn new() -> Self {
Self {
on_component_initialized: Box::<()>::default(),

View File

@@ -107,7 +107,7 @@ impl LaunchContext {
Ok(())
}
/// Convenience function to [Self::configure_globals]
/// Convenience function to [`Self::configure_globals`]
pub fn with_configured_globals(self) -> Self {
self.configure_globals();
self
@@ -141,7 +141,7 @@ impl LaunchContext {
}
}
/// A [LaunchContext] along with an additional value.
/// A [`LaunchContext`] along with an additional value.
///
/// This can be used to sequentially attach additional values to the type during the launch process.
///
@@ -239,22 +239,22 @@ impl<R> LaunchContextWith<Attached<WithConfigs, R>> {
self
}
/// Returns the attached [NodeConfig].
/// Returns the attached [`NodeConfig`].
pub const fn node_config(&self) -> &NodeConfig {
&self.left().config
}
/// Returns the attached [NodeConfig].
/// Returns the attached [`NodeConfig`].
pub fn node_config_mut(&mut self) -> &mut NodeConfig {
&mut self.left_mut().config
}
/// Returns the attached toml config [reth_config::Config].
/// Returns the attached toml config [`reth_config::Config`].
pub const fn toml_config(&self) -> &reth_config::Config {
&self.left().toml_config
}
/// Returns the attached toml config [reth_config::Config].
/// Returns the attached toml config [`reth_config::Config`].
pub fn toml_config_mut(&mut self) -> &mut reth_config::Config {
&mut self.left_mut().toml_config
}
@@ -279,17 +279,17 @@ impl<R> LaunchContextWith<Attached<WithConfigs, R>> {
self.node_config().dev.dev
}
/// Returns the configured [PruneConfig]
/// Returns the configured [`PruneConfig`]
pub fn prune_config(&self) -> Option<PruneConfig> {
self.toml_config().prune.clone().or_else(|| self.node_config().prune_config())
}
/// Returns the configured [PruneModes]
/// Returns the configured [`PruneModes`]
pub fn prune_modes(&self) -> Option<PruneModes> {
self.prune_config().map(|config| config.segments)
}
/// Returns an initialized [PrunerBuilder] based on the configured [PruneConfig]
/// Returns an initialized [`PrunerBuilder`] based on the configured [`PruneConfig`]
pub fn pruner_builder(&self) -> PrunerBuilder {
PrunerBuilder::new(self.prune_config().unwrap_or_default())
.prune_delete_limit(self.chain_spec().prune_delete_limit)
@@ -313,7 +313,7 @@ impl<R> LaunchContextWith<Attached<WithConfigs, R>> {
Ok(secret)
}
/// Returns the [MiningMode] intended for --dev mode.
/// Returns the [`MiningMode`] intended for --dev mode.
pub fn dev_mining_mode(&self, pending_transactions_listener: Receiver<B256>) -> MiningMode {
if let Some(interval) = self.node_config().dev.block_time {
MiningMode::interval(interval)
@@ -329,7 +329,7 @@ impl<DB> LaunchContextWith<Attached<WithConfigs, DB>>
where
DB: Database + Clone + 'static,
{
/// Returns the [ProviderFactory] for the attached storage after executing a consistent check
/// Returns the [`ProviderFactory`] for the attached storage after executing a consistent check
/// between the database and static files. **It may execute a pipeline unwind if it fails this
/// check.**
pub async fn create_provider_factory(&self) -> eyre::Result<ProviderFactory<DB>> {
@@ -397,7 +397,7 @@ where
Ok(factory)
}
/// Creates a new [ProviderFactory] and attaches it to the launch context.
/// Creates a new [`ProviderFactory`] and attaches it to the launch context.
pub async fn with_provider_factory(
self,
) -> eyre::Result<LaunchContextWith<Attached<WithConfigs, ProviderFactory<DB>>>> {
@@ -420,7 +420,7 @@ where
self.right().db_ref()
}
/// Returns the configured ProviderFactory.
/// Returns the configured `ProviderFactory`.
pub const fn provider_factory(&self) -> &ProviderFactory<DB> {
self.right()
}
@@ -430,7 +430,7 @@ where
self.right().static_file_provider()
}
/// Creates a new [StaticFileProducer] with the attached database.
/// Creates a new [`StaticFileProducer`] with the attached database.
pub fn static_file_producer(&self) -> StaticFileProducer<DB> {
StaticFileProducer::new(
self.provider_factory().clone(),
@@ -439,7 +439,7 @@ where
)
}
/// Convenience function to [Self::init_genesis]
/// Convenience function to [`Self::init_genesis`]
pub fn with_genesis(self) -> Result<Self, InitDatabaseError> {
init_genesis(self.provider_factory().clone())?;
Ok(self)
@@ -459,7 +459,7 @@ where
self.node_config().max_block(client, self.provider_factory().clone()).await
}
/// Convenience function to [Self::start_prometheus_endpoint]
/// Convenience function to [`Self::start_prometheus_endpoint`]
pub async fn with_prometheus(self) -> eyre::Result<Self> {
self.start_prometheus_endpoint().await?;
Ok(self)
@@ -538,7 +538,7 @@ impl<L, R> Attached<L, R> {
}
}
/// Helper container type to bundle the initial [NodeConfig] and the loaded settings from the
/// Helper container type to bundle the initial [`NodeConfig`] and the loaded settings from the
/// reth.toml config
#[derive(Debug, Clone)]
pub struct WithConfigs {

View File

@@ -48,7 +48,7 @@ pub use common::LaunchContext;
///
/// This is essentially the launch logic for a node.
///
/// See also [DefaultNodeLauncher] and [NodeBuilderWithComponents::launch_with]
/// See also [`DefaultNodeLauncher`] and [`NodeBuilderWithComponents::launch_with`]
pub trait LaunchNode<Target> {
/// The node type that is created.
type Node;

View File

@@ -19,14 +19,14 @@ use std::sync::Arc;
use crate::components::NodeComponentsBuilder;
pub use reth_node_api::{FullNodeTypes, NodeTypes};
/// A [crate::Node] is a [NodeTypes] that comes with preconfigured components.
/// A [`crate::Node`] is a [`NodeTypes`] that comes with preconfigured components.
///
/// This can be used to configure the builder with a preset of components.
pub trait Node<N: FullNodeTypes>: NodeTypes + Clone {
/// The type that builds the node's components.
type ComponentsBuilder: NodeComponentsBuilder<N>;
/// Returns a [NodeComponentsBuilder] for the node.
/// Returns a [`NodeComponentsBuilder`] for the node.
fn components_builder(self) -> Self::ComponentsBuilder;
}
@@ -58,36 +58,36 @@ pub struct FullNode<Node: FullNodeComponents> {
}
impl<Node: FullNodeComponents> FullNode<Node> {
/// Returns the [ChainSpec] of the node.
/// Returns the [`ChainSpec`] of the node.
pub fn chain_spec(&self) -> Arc<ChainSpec> {
self.provider.chain_spec()
}
/// Returns the [RpcServerHandle] to the started rpc server.
/// Returns the [`RpcServerHandle`] to the started rpc server.
pub const fn rpc_server_handle(&self) -> &RpcServerHandle {
&self.rpc_server_handles.rpc
}
/// Returns the [AuthServerHandle] to the started authenticated engine API server.
/// Returns the [`AuthServerHandle`] to the started authenticated engine API server.
pub const fn auth_server_handle(&self) -> &AuthServerHandle {
&self.rpc_server_handles.auth
}
/// Returns the [EngineApiClient] interface for the authenticated engine API.
/// Returns the [`EngineApiClient`] interface for the authenticated engine API.
///
/// This will send authenticated http requests to the node's auth server.
pub fn engine_http_client(&self) -> impl EngineApiClient<Node::Engine> {
self.auth_server_handle().http_client()
}
/// Returns the [EngineApiClient] interface for the authenticated engine API.
/// Returns the [`EngineApiClient`] interface for the authenticated engine API.
///
/// This will send authenticated ws requests to the node's auth server.
pub async fn engine_ws_client(&self) -> impl EngineApiClient<Node::Engine> {
self.auth_server_handle().ws_client().await
}
/// Returns the [EngineApiClient] interface for the authenticated engine API.
/// Returns the [`EngineApiClient`] interface for the authenticated engine API.
///
/// This will send not authenticated IPC requests to the node's auth server.
#[cfg(unix)]

View File

@@ -41,7 +41,7 @@ pub(crate) struct RpcHooks<Node: FullNodeComponents> {
}
impl<Node: FullNodeComponents> RpcHooks<Node> {
/// Creates a new, empty [RpcHooks] instance for the given node type.
/// Creates a new, empty [`RpcHooks`] instance for the given node type.
pub(crate) fn new() -> Self {
Self { on_rpc_started: Box::<()>::default(), extend_rpc_modules: Box::<()>::default() }
}
@@ -150,7 +150,7 @@ impl<Node: FullNodeComponents> ExtendRpcModules<Node> for () {
}
}
/// Helper wrapper type to encapsulate the [RethModuleRegistry] over components trait.
/// Helper wrapper type to encapsulate the [`RethModuleRegistry`] over components trait.
#[derive(Debug)]
pub struct RpcRegistry<Node: FullNodeComponents> {
pub(crate) registry: RethModuleRegistry<
@@ -190,11 +190,12 @@ impl<Node: FullNodeComponents> Clone for RpcRegistry<Node> {
}
}
/// Helper container to encapsulate [RethModuleRegistry], [TransportRpcModules] and [AuthRpcModule].
/// Helper container to encapsulate [`RethModuleRegistry`], [`TransportRpcModules`] and
/// [`AuthRpcModule`].
///
/// This can be used to access installed modules, or create commonly used handlers like
/// [reth_rpc::EthApi], and ultimately merge additional rpc handler into the configured transport
/// modules [TransportRpcModules] as well as configured authenticated methods [AuthRpcModule].
/// [`reth_rpc::EthApi`], and ultimately merge additional rpc handler into the configured transport
/// modules [`TransportRpcModules`] as well as configured authenticated methods [`AuthRpcModule`].
#[allow(missing_debug_implementations)]
pub struct RpcContext<'a, Node: FullNodeComponents> {
/// The node components.
@@ -205,12 +206,12 @@ pub struct RpcContext<'a, Node: FullNodeComponents> {
/// A Helper type the holds instances of the configured modules.
///
/// This provides easy access to rpc handlers, such as [RethModuleRegistry::eth_api].
/// This provides easy access to rpc handlers, such as [`RethModuleRegistry::eth_api`].
pub registry: &'a mut RpcRegistry<Node>,
/// Holds installed modules per transport type.
///
/// This can be used to merge additional modules into the configured transports (http, ipc,
/// ws). See [TransportRpcModules::merge_configured]
/// ws). See [`TransportRpcModules::merge_configured`]
pub modules: &'a mut TransportRpcModules,
/// Holds jwt authenticated rpc module.
///

View File

@@ -74,7 +74,7 @@ where
Ok(pipeline)
}
/// Builds the [Pipeline] with the given [ProviderFactory] and downloaders.
/// Builds the [Pipeline] with the given [`ProviderFactory`] and downloaders.
#[allow(clippy::too_many_arguments)]
pub async fn build_pipeline<DB, H, B, Executor>(
node_config: &NodeConfig,