Skip to content

feat(engine): make the backfill threshold configurable - #116

Merged
maoueh merged 1 commit into
release/base-2.xfrom
feature/fix-base-reth-backfill-loop-so-full-pruning-can
Dec 4, 2026
Merged

maoueh merged 1 commit into
release/base-2.xfrom
feature/fix-base-reth-backfill-loop-so-full-pruning-can

Conversation

@maoueh

@maoueh maoueh commented Dec 3, 2026

Copy link
Copy Markdown
  • Backport of feat(engine): make the backfill threshold configurable paradigmxyz/reth#27329: adds --engine.backfill-threshold (env RETH_ENGINE_BACKFILL_THRESHOLD) / TreeConfig::backfill_run_threshold, replacing the hard-coded MIN_BLOCKS_FOR_PIPELINE_RUN = 32. Default stays 32, so non-Base chains are unchanged.
  • Values are clamped to 1024 and the block buffer limit grows to 2x the threshold (320 → 640), so a gap that fits the threshold is never evicted from the buffer.
  • Why: on 200ms-block chains (Base) a pipeline cycle with full pruning takes ~13s, which accumulates >32 blocks, so the engine re-enters backfill forever and the rollup stays in EL sync. Base can now raise the threshold via DefaultEngineValues::with_backfill_run_threshold.
  • Cherry-pick conflicts resolved against the fork's persistence-backpressure / state-masking changes; one upstream test adapted to the fork's DownloadRequest::BlockRange(hash, count) shape.
  • No Firehose tracer changes; the pipeline Prune stage is left as is (see discussion).

Backport of paradigmxyz#27329 (9b8e248): add --engine.backfill-threshold
(TreeConfig.backfill_run_threshold), clamped to 1024, growing the block buffer
to 2x the threshold. Lets short-block-time chains such as Base avoid
back-to-back pipeline runs.
@maoueh
maoueh force-pushed the feature/fix-base-reth-backfill-loop-so-full-pruning-can branch from 3188bc4 to d21b64b Compare December 3, 2026 18:52
@maoueh
maoueh merged commit 7d77405 into release/base-2.x Dec 4, 2026
2 of 4 checks passed
@maoueh
maoueh deleted the feature/fix-base-reth-backfill-loop-so-full-pruning-can branch December 4, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant