From 6fa93dc54d1e5b434bb8d12db29e3a914520e6e0 Mon Sep 17 00:00:00 2001 From: Eric Chennells <83478409+echennells@users.noreply.github.com> Date: Wed, 17 Jun 2026 13:58:13 -0700 Subject: [PATCH] Make chaser_header::is_storable() unconditional, bounding tree_ during IBD. Headers that are not storable are cached in the unbounded chaser_organize tree_ (the 'guard cache against memory exhaustion' TODO). On a from-genesis sync over a chain with sparse checkpoints (e.g. testnet3), no header above the top checkpoint becomes storable until the chain is current, so tree_ grows to the full header set and the process is OOM-killed (RSS 0->28GB in ~4 min on a 30GB box). Storing every header immediately keeps tree_ bounded, mirroring chaser_block::is_storable which already returns true. Co-Authored-By: Claude Opus 4.8 --- src/chasers/chaser_header.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/chasers/chaser_header.cpp b/src/chasers/chaser_header.cpp index 343b44b4..a87daaab 100644 --- a/src/chasers/chaser_header.cpp +++ b/src/chasers/chaser_header.cpp @@ -117,10 +117,9 @@ code chaser_header::validate(const header& header, // Storable methods (private). // ---------------------------------------------------------------------------- -bool chaser_header::is_storable(const chain_state& state) const NOEXCEPT +bool chaser_header::is_storable(const chain_state&) const NOEXCEPT { - return is_checkpoint(state) || is_milestone(state) - || (is_current(state) && is_hard(state)); + return true; } bool chaser_header::is_checkpoint(const chain_state& state) const NOEXCEPT