From 7049b1b470a5069a12002f6aeb19e7e58ef05554 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Wed, 30 Apr 2025 13:21:19 +0200 Subject: [PATCH] docs: clarify blocks for pipeline run (#16002) Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com> --- crates/engine/tree/src/tree/mod.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs index 3dcc7f25fe..7ef4bd71aa 100644 --- a/crates/engine/tree/src/tree/mod.rs +++ b/crates/engine/tree/src/tree/mod.rs @@ -84,11 +84,15 @@ pub use persistence_state::PersistenceState; pub use reth_engine_primitives::TreeConfig; use reth_evm::execute::BlockExecutionOutput; -/// The largest gap for which the tree will be used for sync. See docs for `pipeline_run_threshold` -/// for more information. +/// The largest gap for which the tree will be used to sync individual blocks by downloading them. /// -/// This is the default threshold, the distance to the head that the tree will be used for sync. -/// If the distance exceeds this threshold, the pipeline will be used for sync. +/// This is the default threshold, and represents the distance (gap) from the local head to a +/// new (canonical) block, e.g. the forkchoice head block. If the block distance from the local head +/// exceeds this threshold, the pipeline will be used to backfill the gap more efficiently. +/// +/// E.g.: Local head `block.number` is 100 and the forkchoice head `block.number` is 133 (more than +/// an epoch has slots), then this exceeds the threshold at which the pipeline should be used to +/// backfill this gap. pub(crate) const MIN_BLOCKS_FOR_PIPELINE_RUN: u64 = EPOCH_SLOTS; /// Keeps track of the state of the tree.