From fa683c2655664f927fe50f4956078c23516949ce Mon Sep 17 00:00:00 2001 From: Sami Ahmed Date: Tue, 7 Jul 2026 22:33:26 -0700 Subject: [PATCH] fix(sigcache): update comment for new entry size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 2026-07-04 sigcache fix (239cf61, originally reverted, re-landed here) changed the cache entry from a 64-bit XOR-mix to a uint256 SHA256(sighash || sig || pubkey). Default capacity is 200,000 entries, so peak memory grew from ~1.6 MB to ~6.4 MB. The stale comment claimed 8 bytes per entry; correct that. No code change — comment only. Confirmed via Claude's 2026-07-07 review of the reverted commits that re-landing 239cf61 is safe (performance fix, no consensus change, SHA256 collision risk is cryptographically infeasible). --- src/script.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/script.cpp b/src/script.cpp index f8d27a1..2a2e006 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1260,8 +1260,9 @@ public: void Set(uint256 hash, const std::vector& vchSig, const std::vector& pubKey) { - // Increased default to 200,000 entries (~1.6MB at 8 bytes each). - // The old 50,000 limit was too small and caused frequent evictions. + // Default 200,000 entries (~6.4MB at 32 bytes each — entries are + // uint256 SHA256(sighash || sig || pubkey)). The old 50,000 limit + // was too small and caused frequent evictions. int64_t nMaxCacheSize = GetArg("-maxsigcachesize", 200000); if (nMaxCacheSize <= 0) return;