Provider refusals
write_verifier: Provider declined the request because of a cybersecurity restriction. Experiments remain incomplete; static verification can continue.
5 minor findings · 11 suggestions
Earlier concerns neither republished nor resolved: 1 major finding · 2 minor findings · 3 suggestions. See the Run archive for their assessments.
Findings
[minor] · PSBT completion skips transaction-level CISA verification
Externally supplied CISA final witnesses can make PSBT RPCs report complete=true and return transaction hex that CISA validation rejects, including a group with no final member.
Location: src/psbt.cpp:941 (head).
Details and suggested fix
PSBTInputSignedAndVerified calls only VerifyScript, which now accepts parsed aggregation elements and defers their group and signature checks to VerifyCISATransaction. For example, a single 32-byte half-aggregation member passes that per-input check despite having no final member. SignPSBTInput then returns early, FinalizeCISAInputs skips the finalized group, and extraction never performs the deferred check. This affects finalizepsbt, walletprocesspsbt, and descriptorprocesspsbt when final witnesses arrive from elsewhere; aggregates constructed by this node's finalizer have their signature material checked. Assemble the final transaction and run VerifyCISATransaction before reporting completion or extracting, with regression cases for a missing final member and a corrupted aggregate.
[minor] · Reserved full-aggregation nonces are consumed before group sighashes are settled
When the owning descriptor manager runs first, walletprocesspsbt can consume reserved full-aggregation nonces before resolving every member's sighash, leaving a session that requires a fresh nonce exchange.
Location: src/psbt.cpp:765 (head).
Details and suggested fix
For example, take two reserved-nonce fullagg inputs without sighash_type fields in a blank wallet with one owning cisa() descriptor, then call walletprocesspsbt with sighashtype="ALL". SignPSBTInput sets input 0 to ALL and immediately signs using input 1's still-absent field as DEFAULT. Processing input 1 subsequently changes its message to ALL. The resulting partials cannot aggregate, and retries retain the existing partial rather than replacing it. Alternatively, if input 1 already specifies ALL and the RPC uses its default sighash, input 0 consumes its nonce before input 1 returns SIGHASH_MISMATCH; the RPC throws without returning that partial.
Resolve and validate the whole group's effective sighashes and modes in an updater pass before any partial signing. Add reserved-nonce tests with non-default sighashes; the existing reserved-nonce tests use the default.
[minor] · descriptorprocesspsbt publishes an unusable fullagg nonce
With private cisa() descriptors, descriptorprocesspsbt returns a public nonce without retaining its secret in release builds; Debug/fuzz configurations would instead abort at the missing-store Assume.
Location: src/rpc/rawtransaction.cpp:2145 (head).
Details and suggested fix
The RPC advertises fullagg but constructs a request-local FlatSigningProvider whose cisa_secnonces is null. MakeCISANonce generates a nonce, calls SetCISASecNonce, and returns the public nonce even when storage returns without saving the secret. Subsequent requests construct fresh providers and cannot produce the corresponding partial signature. Once the nonce exists, the updater also refuses to change the input's mode, so participants must remove it and restart. The failed Assume aborts when ABORT_ON_FAILED_ASSUME or fuzzing enables that behavior. Although MuSig2 has an analogous null-store pattern, this PR newly offers this CISA workflow. Reject unsupported full-aggregation signing in this stateless RPC and test that case rather than returning a nonce the signer cannot use.
[minor] · finalizepsbt can finalize a half-aggregation group but report it incomplete
With no known current producer, a PSBT containing valid 65-byte cisa_halfagg_sig values but no sighash_type fields is finalized by finalizepsbt yet reported incomplete on its first call.
Location: src/psbt.cpp:877 (head).
Details and suggested fix
FinalizePSBT passes each absent field to SignPSBTInput, which selects SIGHASH_DEFAULT and returns SIGHASH_MISMATCH for the 65-byte signature. That permanently clears its completion result. FinalizeCISAInputs nevertheless accepts the absent-field case, derives the sighash from the signature's last byte, verifies the signatures, and writes the group's final witnesses. The RPC returns that finalized PSBT with complete=false; submitting it again succeeds through the finalized-input check. The in-tree signer avoids this state by writing the non-default sighash field. Make the paths agree, for example by rejecting the absent-field case in FinalizeCISAInputs as the earlier check already does.
[minor] · Invalid cisa_mode values fail after selected coins are locked
With lock_unspents=true, an invalid cisa_mode makes send, sendall, or walletcreatefundedpsbt fail after locking selected coins, which remain locked until lockunspent or a restart.
Location: src/wallet/rpc/spend.cpp:121 (head).
Details and suggested fix
The funding option check accepts any string for cisa_mode. ParseCISAMode rejects unknown values only in FinishTransaction or the later walletcreatefundedpsbt fill options. By then, funding or sendall has already called LockCoin(..., persist=false), with no rollback for the parser exception. A typo such as cisa_mode="half" therefore returns an error while leaving those coins unavailable for subsequent automatic selection. This adds another late-validation case alongside the existing psbt_version check. Parse the mode once before coin selection and pass the parsed value downstream.
Optional improvements
[suggestion] · Full-aggregation finalization repeats whole-group work for every partial
AggregateFullAggSigs performs quadratic shared work in the group size, including under cs_wallet during wallet PSBT finalization; this follows from operation counts, not measured timings.
Location: src/cisa.cpp:153 (head).
Details and suggested fix
Every call to FullAggGroup::VerifyPartialSig recomputes the group's nonce sum and group-dependent hashes through secp256k1_fullagg_partial_sig_verify. AggregateFullAggSigs repeats that work for every member. Compute the common nonce/session values and key/message hash prefix once, then reuse them while checking each share. This preserves the helper's documented per-share verification contract. Aggregate once and verify with VerifyFullAggSchnorr is another option only if the finalizer may accept individually invalid shares that cancel into a valid aggregate; that would be a contract decision, not an equivalent optimization.
[suggestion] · Invalid CISA groups require whole-group work before relay rejection
An untrusted peer can make the node verify an entire invalid aggregation group without owning its witness v2 UTXOs; the cost relative to existing relay worst cases remains unmeasured.
Location: src/validation.cpp:2130 (head).
Details and suggested fix
After ordinary admission prechecks, CheckInputScripts runs CISACheck before its per-input loop. A structurally valid half-aggregation group with valid curve coordinates and an incorrect canonical s reaches 2n-1 variable-base multiplications without requiring any private keys. Full aggregation likewise verifies the whole group and supplies no scratch space to secp256k1_ecmult_multi_var. Per-input validation instead stops at the first failing signature. With the current unconditional policy flag, this work is reachable wherever suitable witness v2 UTXOs exist. Benchmark maximum-standard-weight invalid groups against the existing keyless relay worst case, and consider an aggregated-input relay limit if the comparison shows excessive cost.
[suggestion] · A transaction's aggregate verification occupies one serial block-validation task
A large CISA transaction places all aggregate signature work in one check-queue task, preventing that work from using multiple script-check workers; its block-connection latency relative to Taproot has not been measured.
Location: src/validation.cpp:2126 (head).
Details and suggested fix
CheckInputScripts queues one CISACheck per transaction, while the marked inputs' per-input checks perform no signature verification. A miner-built block containing one large group therefore cannot distribute that group's signature work across the script-check workers as it can for separate Taproot inputs. Half aggregation performs individual variable-base multiplications, and full aggregation passes NULL scratch to secp256k1_ecmult_multi_var. Benchmark a maximum-weight single-group block against an equal-weight Taproot block. If the latency is significant, split verification into parallel partial sums or use scratch-backed multi-exponentiation.
[suggestion] · Fresh mempool admission repeats successful aggregate verification
When both admission passes enforce SCRIPT_VERIFY_WITNESS_V2 and miss the execution cache, a valid aggregate is verified twice instead of reusing its successful cryptographic result.
Location: src/validation.cpp:2127 (head).
Details and suggested fix
PolicyScriptChecks verifies the transaction first, then ConsensusScriptChecks reaches the same aggregate verifier through CheckInputsFromMempoolAndCache. The execution cache includes the flags in its key, and the policy pass does not store a full-script success. CISACheck calls the aggregate verification wrappers directly, without a signature-cache interface, so the second pass repeats the elliptic-curve work while cs_main and the mempool lock are held. Cache successful aggregate verification using the keys, messages, aggregate signature, and mode so both passes can reuse it without skipping their separate script checks. Execution-cache hits and an inactive CISA consensus deployment avoid the second aggregate verification; no timings were measured.
[suggestion] · Unused reservecisanonce reservations cannot be cancelled
Unused reservations accumulate until wallet unload, leaving authenticated callers no targeted way to release them without also discarding unrelated live MuSig2 and CISA sessions.
Location: src/wallet/rpc/spend.cpp:1684 (head).
Details and suggested fix
Each reservecisanonce call creates a fresh nonce and inserts a separate session keyed by the signing key and random public nonce, including repeated calls for the same output. A reservation remains unused when the participant chooses its opted-out fallback instead of the proposed full-aggregation spend. Add cancellation by public nonce that destroys the corresponding secret and makes subsequent use fail safely. Do not replace older reservations merely because they concern the same output, since their public nonces may already have been shared.
[suggestion] · Wallet-owned fullagg sends require another PSBT signing call
For wallet-owned witness v2 groups, send and sendall with cisa_mode="fullagg" deliberately stop at nonce generation and require another walletprocesspsbt call before the transaction can be broadcast.
Location: src/wallet/rpc/spend.cpp:123 (head).
Details and suggested fix
FinishTransaction performs one non-signing fill and one signing fill. The fullagg branch stops immediately after generating each new public nonce, so it cannot produce partial signatures in that pass even when the wallet owns the entire group. The functional test asserts this behavior for send and completes it with walletprocesspsbt. Consider a second signing pass once the nonces have been collected, allowing wallet-owned groups to finish while mixed groups remain incomplete when external material is missing. If the two-RPC contract is intentional, state that requirement directly in the send and sendall option help.
[suggestion] · CISA tests do not distinguish the activation boundary
The CISA tests cover only an already-active deployment, so they cannot distinguish correct activation gating from unconditional or off-by-one enforcement in GetBlockScriptFlags.
Location: src/kernel/chainparams.cpp:618 (head).
Details and suggested fix
feature_cisa.py inherits the cached-chain setup and uses regtest's ALWAYS_ACTIVE CISA deployment; its activation assertion only checks active=true. The unit harness passes SCRIPT_VERIFY_WITNESS_V2 directly. Add a delayed-deployment test that mines a witness v2 spend valid only under the old rules in the last preactivation block, rejects an equivalent spend in the first active block, and invalidates and reconsiders across that boundary. Submit the spends in explicitly constructed blocks, since the current mempool policy enables the witness-v2 checks independently of consensus activation.
[suggestion] · Validation-cache tests never exercise CISACheck
The ValidationCheck conversion retains fixtures without aggregated inputs, leaving the extra queued check and aggregate-failure caching untested.
Location: src/test/txvalidationcache_tests.cpp:152 (head).
Details and suggested fix
The cache fixture creates only legacy, witness v0, and Taproot outputs, and its helper expects exactly tx.vin.size() queued checks. Add a witness v2 aggregate fixture that caches success with SCRIPT_VERIFY_WITNESS_V2 disabled and requires rejection of the same invalid aggregate when it is enabled. Also execute an uncached queued run and assert tx.vin.size()+1 checks, then cache a valid aggregate and require rejection after mutating its final signature. These cases exercise the new transaction-level dispatch and cache boundary rather than only the per-input checks.
[suggestion] · The wrapped-Taproot test case now wraps a witness v2 script
In spends_witness_prog, the CISA insertion silently changes the existing P2SH-wrapped Taproot fixture to witness v2.
Location: src/test/transaction_tests.cpp:1341 (head).
Details and suggested fix
The new native CISA case leaves tx_create.vout[0].scriptPubKey set to a WitnessV2Cisa script. The following case labelled P2SH-wrapped P2TR copies that value into redeem_script without restoring witness v1, so it no longer exercises the fixture its label describes. Move the new native CISA case after the wrapped-Taproot case, preserving the existing wrapped-v1 input.
[suggestion] · feature_cisa.py does not guarantee queued validation coverage
On single-core runners, both nodes use -par=1, so feature_cisa.py loses the queued aggregate-verification coverage it claims for node 0.
Location: test/functional/feature_cisa.py:92 (head).
Details and suggested fix
extra_args overrides -par only for node 1. Node 0 inherits the framework setting min(2, os.cpu_count()), and the node computes worker_threads_num by subtracting one for the main thread. On a single-core runner neither node therefore has a script-check worker. Set node 0's arguments explicitly to -par=2 so the test consistently exercises queued checks as well as node 1's inline path, regardless of core count.
[suggestion] · CreateFullAggPartialSig overstates its nonce-invalidation guarantee
The CreateFullAggPartialSig comment promises unconditional nonce invalidation, but its caller relies on preflight failures preserving reservations for a corrected group.
Location: src/cisa.h:56 (head).
Details and suggested fix
Invalid keypairs, invalid groups, out-of-range signer indices, and failed session initialization return before secnonce.Invalidate(). Once secp256k1_fullagg_partial_sign is attempted, the wrapper invalidates the nonce regardless of signing success. CreateCISAFullAggPartialSig checks IsValid() to preserve a reservation after preflight failure, and the malformed-nonce test exercises that recovery. Describe both outcomes in cisa.h so the public contract matches the behavior callers already use.
Earlier concerns
Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.
- [major]: Witness-v2 spends are standard on networks where CISA is inactive (earlier report)
- [minor]: PSBT dialog reports no progress after adding CISA signatures (earlier report)
- [minor]: Qt's Taproot receive option can generate a CISA address (earlier report)
- [suggestion]: Intermediate commits activate CISA before aggregate checking is wired (earlier report)
- [suggestion]: CISA session conflicts are reported as different transactions (earlier report)
- [suggestion]: Destination fuzzing drops non-32-byte witness v2 programs (earlier report)