feat(node): add configurable backfill thresholds (ENG-1919)#84
Merged
feat(node): add configurable backfill thresholds (ENG-1919)#84
Conversation
Add BACKFILL_MAX_BLOCKS config option to control memory usage during sync. Default is 10,000 blocks per batch (reth's 500K default causes OOM on mainnet). Changes: - Add backfill_max_blocks field to SignetNodeConfig - Add accessor with 10K default - Configure ExecutionStageThresholds after set_with_head calls - Add set_backfill_thresholds helper method
The `reth_stages_types` crate was used but not declared as a dependency, and `set_backfill_thresholds` needed `&mut self` to mutate notifications. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
464ed76 to
1ff3ba4
Compare
Member
prestwich
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds configurable backfill execution thresholds to avoid OOM issues during mainnet node sync.
Changes
Config (
crates/node-config/src/core.rs):BACKFILL_MAX_BLOCKSenv var (default: 10,000 blocks)backfill_max_blocks()accessor with sensible defaultNode (
crates/node/src/node.rs):ExecutionStageThresholdsfromreth_stages_typesset_backfill_thresholds()after eachset_with_head()CI Fix (
crates/node/Cargo.toml,crates/node/src/node.rs):reth-stages-typesdependency toCargo.tomlset_backfill_thresholdsto take&mut self(required byset_backfill_thresholdson notifications)reth_stages_typesContext
Reth PR #22037 introduced configurable backfill thresholds. The default (500K blocks per batch) can cause OOM on memory-constrained nodes. This PR exposes the config so operators can tune it.
Usage
Closes ENG-1919