#36039 psbt: classify missing Taproot script-path signatures as signer

full analysis

https://github.com/bitcoin/bitcoin/pull/36039 · btcpavao · +23/-3 in 3 files, 1 commits · labels: PSBT

Goal

  • Corrects PSBT analysis to recognize when Taproot script-path transactions are waiting for signatures
  • Prevents misleading wallet warnings that inputs are missing data when ready to sign

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.

Category: Wallet (#37 of 84)

P3 · bug fix

  • P3 because it fixes confusing wallet status messages during Taproot script-path signing
  • Improves the usability of Taproot multisig workflows without affecting transaction validity

This fixes a clear bug in PSBT analysis for Taproot script paths that causes confusing status messages in the wallet GUI ('Transaction is missing some information about inputs'). The issue does not cause fund loss or transaction failure, but resolving it improves the usability of Taproot multisig workflows.

Membership: Changes PSBT signing data handling in src/script/sign.cpp, directly resolving an issue where the wallet GUI displays incorrect input warnings for Taproot multisig PSBTs.

Factors: security/stability 0, bug 1, performance 0, user value 1, leverage 0

Reviewability: Ready

  • Ready to review with CI passing and feedback addressed in the latest push

The code is clean, CI passes, and the author resolved the single review comment in a force-push.

Author status: active; addressed reviewer feedback in the current push.

Resolved concerns:

  • achow101 noted that the initial patch incorrectly analyzed transactions involving MuSig; the author updated `SignMuSig2()` handling to avoid adding missing signatures for MuSig aggregate keys and added a test case.

Agreement: Neutral

  • Initial review caught incorrect analysis for transactions involving MuSig (achow101)
  • Author updated the patch to handle MuSig aggregates and awaits re-review

Neutral: achow101 flagged an issue with MuSig handling, which the author resolved in the latest push.

achow101 pointed out a bug in the first iteration. The author reproduced it, pushed a fix, and no further comments or ACKs have been posted since.

  • achow101 noted inline: 'This results in the analysis still being incorrect for transactions involving a musig.'
  • btcpavao force-pushed and confirmed: 'I updated the patch to distinguish when SignMuSig2() actually matched a MuSig2 aggregate, and only add missing_sigs for the non-MuSig case.'

Review verdicts (DrahtBot): 0

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

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

dossier JSON · extract JSON · model openrouter/google/gemini-3.8-flash, generated 2026-09-17T16:22, confidence high, input hash 1d6b308c8f370aaf