#36039 psbt: classify missing Taproot script-path signatures as signer
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36039 psbt: classify missing Taproot script-path signatures as signer | Waiting on author | 0 | Strong | 12 + 11 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
This PR updates `CreateTaprootScriptSig()` in `src/script/sign.cpp` to record missing signatures in `sigdata.missing_sigs` when a Taproot script-path Schnorr signature is absent and not part of a MuSig2 aggregate. It also adds regression tests in `test/functional/rpc_psbt.py` and `test/functional/wallet_musig.py`.
Problem: When inspecting a PSBT spending via a Taproot script path (such as a 2-of-3 Taproot multisig), `AnalyzePSBT()` failed to detect missing signatures and classified the input's next role as `updater` instead of `signer`. In the wallet GUI, this surfaced as an inaccurate warning that the transaction was 'missing some information about inputs' even though the PSBT was complete and ready to sign.
Reviewability
Paused · Waiting on author
Open objections from achow101, fametrano with no author reply for 29 days; review would repeat what has been asked.
Waiting on (from the thread read):
- author: address achow101's restructure suggestion and fametrano's observations on key-path implications 2026-10-02
Agreement
Strong
substantive support, no open objection (fametrano)
Thread notes: fametrano tested the script-path fix, confirming it fixes the issue, and noted the side-effects on key-path signing and testing if achow101's restructure suggestion is implemented.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| achow101 (member) | objection, correctness | PSBT analysis is incorrect for transactions involving a musig | fixed · fix pushed · author updated the patch to distinguish MuSig aggregate matches and added a regression check | changed | yes | 2026-08-20: 'This results in the analysis still being incorrect for transactions involving a musig.' Status from: 2026-08-20: btcpavao: 'I updated the patch to distinguish when `SignMuSig2()` actually matched a MuSig2 aggregate, and only add `missing_sigs` ' |
| achow101 (member) | suggestion, approach | Avoid adding an output parameter by having SignMuSig2 update sigdata directly | open | answered | no | 2026-10-02: 'Adding an output parameter here is entirely unnecessary. `SignMuSig2` has access to `sigdata`, it can update the fields itself if no signature was made.' |
| fametrano (contributor) | suggestion, scope | If adopting achow101's restructure, consider key deduplication in make_keypath_sig and add a key-path test case to rpc_psbt.py | open | answered | no | 2026-10-03: 'And a key-path case in `rpc_psbt.py` would then belong in this PR, since its behaviour changes.' |
Support:
- fametrano (contributor) (2026-10-03) [both: analyzepsbt, SignMuSig2, make_keypath_sig, rpc_psbt.py]: confirmed that an unsigned script-path PSBT input moves from updater to signer with missing.signatures naming K and that a wallet holding only K successfully signs and finalizes it
Participants:
- achow101 (member, objection, 2 statements 2026-08-20 to 2026-10-02): objected to incorrect PSBT analysis for MuSig transactions; suggested updating sigdata directly inside SignMuSig2
- fametrano (contributor, support, 1 statements 2026-10-03 to 2026-10-03): tested script-path classification fix and noted key-path implications if SignMuSig2 is restructured
Files
11 lines under test/bench/ci.
- src/script/sign.cpp +12/-3
- test/functional/rpc_psbt.py +6/-0
- test/functional/wallet_musig.py +5/-0
Card
The short text the ranking pass compares across PRs.
This PR fixes a bug in Taproot script-path PSBT analysis where inputs missing Schnorr signatures were classified as needing an updater instead of a signer. This addresses issue #36035, where the wallet GUI reported that a Taproot multisig PSBT was missing information about inputs despite being ready to sign. The patch updates CreateTaprootScriptSig in src/script/sign.cpp to track missing signatures and adds regression coverage. achow101 caught a bug in the initial MuSig2 handling, which the author resolved in the current push; it now awaits review.
Data
thread read through 2026-10-03 (4 statements), head 641b52828a
labels: PSBT
Categories
Wallet
P3 · bug fix
Fixes incorrect role classification and misleading input-information warnings during PSBT analysis. `AnalyzePSBT()` failed to detect missing Taproot script-path signatures, classifying the next role as `updater` instead of `signer` and causing the wallet GUI to display an inaccurate warning that the transaction was 'missing some information about inputs'.
Membership: Labeled PSBT, modifies PSBT signing logic in `src/script/sign.cpp`, and directly affects wallet GUI role analysis and `wallet_musig` tests.
Factors: security/stability 0, bug 1, performance 0, user value 1, leverage 0