Expand description
Staged syncing primitives for reth.
This crate contains the syncing primitives Pipeline
and Stage
, as well as all stages
that reth uses to sync.
A pipeline can be configured using Pipeline::builder()
.
For ease of use, this crate also exposes a set of StageSet
s, which are collections of stages
that perform specific functions during sync. Stage sets can be customized; it is possible to
add, disable and replace stages in the set.
§Examples
// Create a pipeline that can fully sync
Pipeline::<MockNodeTypesWithDB>::builder()
.with_tip_sender(tip_tx)
.add_stages(DefaultStages::new(
provider_factory.clone(),
tip_rx,
consensus,
headers_downloader,
bodies_downloader,
executor_provider,
StageConfig::default(),
PruneModes::default(),
))
.build(provider_factory, static_file_producer);
§Feature Flags
test-utils
: Export utilities for testing
Modules§
- A re-export of common structs and traits.
- Built-in
StageSet
s. - Implementations of stages.
- test_
utils test-utils
Structs§
- Saves the progress of AccountHashing stage.
- Saves the block range. Usually, it’s used to check the validity of some stage checkpoint across multiple executions.
- Saves the progress of abstract stage iterating over or downloading entities.
- Stage execution input, see
Stage::execute
. - The output of a stage execution.
- Saves the progress of Execution stage.
- The thresholds at which the execution stage writes state changes to the database.
- Saves the progress of Headers stage.
- Saves the progress of Index History stages.
- Saves the progress of Merkle stage.
- Metrics routine that listens to new metric events on the
events_rx
receiver. Upon receiving new event, related metrics are updated. - A staged sync pipeline.
- Builds a
Pipeline
. - Pipeline stages progress.
- Saves the progress of a stage.
- Helper to create and configure a
StageSet
. - Saves the progress of StorageHashing stage.
- Stage unwind input, see
Stage::unwind
. - The output of a stage unwinding.
Enums§
- Represents the specific error type within a block error.
- Determines the control flow during pipeline execution.
- Collection of metric events.
- A pipeline execution error.
- An event emitted by a Pipeline.
- Direction and target block for pipeline operations.
- A stage execution error.
- Stage IDs for all known stages.
- Stage-specific checkpoint metrics.
Traits§
- A stage is a segmented part of the syncing process of the node.
- Stage trait extension.
- Combines multiple
Stage
s into a single unit.
Type Aliases§
- Alias type for metric producers to use.
- The future that returns the owned pipeline and the result of the pipeline run. See
Pipeline::run_as_fut
. - The pipeline type itself with the result of
Pipeline::run_as_fut