clarify blockfilterindex cache allocation rationale
What changed, and why it matters
This commit only changes a code comment explaining why the blockfilterindex gets 5% of the total cache budget. It adds a note that a typical two-week offline gap produces a working set of about 200 kB, which fits comfortably within that 5% allocation. No code behavior, cache sizes, or logic are modified.
No action needed; this is a documentation-only comment clarification.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a single comment edit in src/node/caches.cpp inside CalculateCacheSizes. It expands the rationale for the 5% blockfilterindex allocation by mentioning the approximate working set size for a 2-week offline catch-up. There are no functional changes, no memory allocation changes, and no security-relevant code modifications.
Changed components
src/node/caches.cppInspect captured patch +3 / −1
diff --git a/src/node/caches.cpp b/src/node/caches.cpp
index d1a54b95..03c58648 100644
--- a/src/node/caches.cpp
+++ b/src/node/caches.cpp
@@ -62,7 +62,9 @@ CacheSizes CalculateCacheSizes(const ArgsManager& args, size_t n_indexes)
// - txindex (10%): serves getrawtransaction RPCs with mostly unique,
// non-repetitive lookups across the entire blockchain.
// - blockfilterindex (5%): serves BIP 157 light clients that repeatedly
- // query recent blocks, benefiting most from LevelDB cache.
+ // query recent blocks, benefiting from LevelDB cache, but the
+ // working set for a typical 2-week offline gap is ~200kiB, well within 5%
+ // of the total cache.
// - txospenderindex (5%): serves gettxspendingprevout RPCs with very
// specific, rarely repeated outpoint queries.
// - coinstatsindex: intentionally not included here, since usage pattern
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.