Skip to content

feat(node): add configurable backfill thresholds (ENG-1919)#84

Merged
prestwich merged 2 commits intomainfrom
samwise/eng-1919-backfill-thresholds
Feb 18, 2026
Merged

feat(node): add configurable backfill thresholds (ENG-1919)#84
prestwich merged 2 commits intomainfrom
samwise/eng-1919-backfill-thresholds

Conversation

@init4samwise
Copy link
Contributor

@init4samwise init4samwise commented Feb 18, 2026

Summary

Adds configurable backfill execution thresholds to avoid OOM issues during mainnet node sync.

Changes

Config (crates/node-config/src/core.rs):

  • Added BACKFILL_MAX_BLOCKS env var (default: 10,000 blocks)
  • Added backfill_max_blocks() accessor with sensible default

Node (crates/node/src/node.rs):

  • Import ExecutionStageThresholds from reth_stages_types
  • Call set_backfill_thresholds() after each set_with_head()

CI Fix (crates/node/Cargo.toml, crates/node/src/node.rs):

  • Added missing reth-stages-types dependency to Cargo.toml
  • Fixed set_backfill_thresholds to take &mut self (required by set_backfill_thresholds on notifications)
  • Fixed import ordering for reth_stages_types

Context

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

# Use default (10K blocks per batch)
./signet-node

# Custom value
BACKFILL_MAX_BLOCKS=5000 ./signet-node

Closes ENG-1919

@init4samwise init4samwise requested a review from a team as a code owner February 18, 2026 00:04
init4samwise and others added 2 commits February 18, 2026 08:11
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>
@prestwich prestwich force-pushed the samwise/eng-1919-backfill-thresholds branch from 464ed76 to 1ff3ba4 Compare February 18, 2026 13:11
@prestwich
Copy link
Member

cc @rswanson @rymcol this will add a new env var for configuring reth to not OOM

@prestwich prestwich merged commit a5e0386 into main Feb 18, 2026
6 checks passed
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.

2 participants

Comments