You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please describe the feature you'd like to see added.
Add successful PQC transaction-signature verification to the bounded signature cache.
Is your feature related to a problem, if so please describe it.
At 70fea84f5becfb57463247af09790df5ddd424f8, sigcache.h:72 overrides ECDSA/Schnorr verification only. interpreter.cpp:2001 sends PQC checks directly to the verifier. The policy and consensus admission passes therefore repeat successful PQC checks on an ordinary first admission without a full-script-cache hit. Production impact is unmeasured.
Describe the solution you'd like
Cache successful (sighash, public key, signature) checks under a distinct PQC domain with existing store/consume and memory-limit behavior. Preserve both passes, script semantics and validation-weight charges. Scope this to transaction signatures.
Describe any alternatives you've considered
Skipping an admission pass or sharing full-script entries across flags would remove existing validation distinctions and should not be part of this change.
Acceptance
Instrument actual admission to demonstrate cache reuse. Require cached/uncached equivalence for valid and invalid vectors, changed inputs, failed verification, eviction, cache consumption and memory limits. Failures are never cached. A primitive benchmark alone is insufficient.
Consensus implications
No intended validity change or activation. Implementation requires consensus-focused review of cache keys and behavioral equivalence before landing.
Please leave any additional context
Open/closed inventory search found no duplicate. #45/#46 cover wallet counters; #103/#108 header caching; #104/#107 build controls. Evidence is static source review; no node experiment or performance claim accompanies this request.
Delivered by #162, merged into 1.x.x as a6442d28f9017b9dd09406233b64d23113124eeb. Merges into a non-default branch do not fire closing keywords, so this is closed by hand.
Acceptance, mapped to the tests that prove each point:
Actual admission is instrumented and shows reuse: txvalidationcache_tests/pqc_policy_consensus_reuse drives the real ProcessTransaction and asserts the ordered cache events plus a backend verification counter (one miss and one verified insert in the policy pass, a hit in the consensus pass).
Cached and uncached outcomes are equal for valid and invalid vectors, including error codes and remaining validation weight: pqc_sigcache_tests/failures_never_populate and warm_cache_preserves_p2mr_errors_and_weight over the P2MR witness-vector corpus.
Changed inputs miss: key_components_and_domain (component swaps, first, middle and last byte flips, collisions attempted in the ECDSA and Schnorr domains).
Failed verification, and failures are never cached: failures_never_populate; at admission, a spend with one flipped signature bit is rejected on the first and on a repeated submission with one primitive verification each and no cache entry; the concurrent case shows an invalid tuple never hits.
Eviction and memory limits: shared_budget_and_eviction (shared bound with Schnorr entries, minimum allocation, evicted entries re-verify).
Cache consumption: store_consume_and_reclamation, plus zero backend verifications on warm store and warm consume hits.
Scope: data_signatures_bypass_the_cache shows OP_CHECKDATASIGPQC never consults or fills the cache.
A primitive benchmark alone is not the evidence: the admission test is; the benchmark times the two-pass pattern only.
Mutation evidence: inserting a failed verification, re-verifying on a hit and removing the verification each fail both pqc_sigcache_tests and pqc_policy_consensus_reuse.
Not covered: package admission, block-connection consumption end to end, and concurrency under the real script-check queue (the concurrent test uses plain threads at the checker seam). No consensus rule, validity or activation change.
Related review finding: #259 covers the cases this successful-transaction-signature cache does not: OP_CHECKDATASIGPQC bypasses the cache and failed verifications are never cached, so a replayable invalid data-signature witness can still force repeated full verifies.
Activity
kiwidream commentedon Sep 23, 2026
Delivered by #162, merged into
1.x.xasa6442d28f9017b9dd09406233b64d23113124eeb. Merges into a non-default branch do not fire closing keywords, so this is closed by hand.Acceptance, mapped to the tests that prove each point:
txvalidationcache_tests/pqc_policy_consensus_reusedrives the realProcessTransactionand asserts the ordered cache events plus a backend verification counter (one miss and one verified insert in the policy pass, a hit in the consensus pass).pqc_sigcache_tests/failures_never_populateandwarm_cache_preserves_p2mr_errors_and_weightover the P2MR witness-vector corpus.key_components_and_domain(component swaps, first, middle and last byte flips, collisions attempted in the ECDSA and Schnorr domains).failures_never_populate; at admission, a spend with one flipped signature bit is rejected on the first and on a repeated submission with one primitive verification each and no cache entry; the concurrent case shows an invalid tuple never hits.shared_budget_and_eviction(shared bound with Schnorr entries, minimum allocation, evicted entries re-verify).store_consume_and_reclamation, plus zero backend verifications on warm store and warm consume hits.data_signatures_bypass_the_cacheshows OP_CHECKDATASIGPQC never consults or fills the cache.Mutation evidence: inserting a failed verification, re-verifying on a hit and removing the verification each fail both
pqc_sigcache_testsandpqc_policy_consensus_reuse.Not covered: package admission, block-connection consumption end to end, and concurrency under the real script-check queue (the concurrent test uses plain threads at the checker seam). No consensus rule, validity or activation change.
djh58 commentedon Oct 29, 2026
Related review finding: #259 covers the cases this successful-transaction-signature cache does not: OP_CHECKDATASIGPQC bypasses the cache and failed verifications are never cached, so a replayable invalid data-signature witness can still force repeated full verifies.