Review report

bitcoin/bitcoin: PR #36395

1 suggestion

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · Repeated ECDSA checks do not verify cache population

The new ECDSA caching passes would still pass if successful signatures were never inserted, leaving their intended cache-hit coverage dependent on an unchecked assumption.

Location: src/test/script_tests.cpp:158 (head).

Details and suggested fix

Both caching passes in DoTest observe only VerifyScript's result and ScriptError. If the ECDSA Set(entry) call were removed, each miss would fall back to pubkey.Verify and preserve those results, so the second pass would silently stop exercising cache hits. The serialization test checks only entry computation, and the explicit Schnorr population assertions cover a separate insertion path. Close this existing coverage gap with one focused ECDSA test using a fresh cache rather than adding bookkeeping to every vector. Sign a fixed sighash with a KeyData key using CKey::Sign, compute its entry with ComputeEntryECDSA, and assert that Get(entry, false) is false initially and after successful verification with store=false, then true after successful verification with store=true.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.