Current behaviour
With bip32derivs=false, walletprocesspsbt makes no MuSig2 nonce for a wallet whose descriptor derives after the aggregate, such as tr(musig(A,B)/<0;1>/*). It returns no error. Without nonces there are no partial signatures: after two rounds decodepsbt shows no musig2_pubnonces and no musig2_partial_sigs, and finalizepsbt returns "complete": false. With the default bip32derivs=true the same steps sign and the transaction is accepted.
The signer needs the derivation path from the aggregate key to the Taproot internal key. bip32derivs=false hides key origins from the signer, so SignMuSig2 skips the aggregate at if (agg_info.path.empty()) continue;.
Two cases sign fine with false: tr(musig(A/<0;1>/*,B/<0;1>/*)), where the aggregate is itself the internal key, and a PSBT that already carries the derivations, for example from walletcreatefundedpsbt or from another participant's bip32derivs=true call.
v31.1.0 behaves the same. #35370 adds a "strip" mode with the same problem: #35370#pullrequestreview-5391507690.
Expected behaviour
Either the PSBT signs and finalizes as with bip32derivs=true, or walletprocesspsbt returns an error.
Steps to reproduce
Regtest, master a829aeaac1.
- Create two blank descriptor wallets. Import
tr(musig(A,B)/<0;1>/*)into both as an active descriptor, each with its own key as xprv and the other as xpub. - Send to
getnewaddress "" bech32m(the same address in both wallets) and confirm. createpsbtspending that output.- In each wallet:
bitcoin-cli -named walletprocesspsbt psbt=<psbt> bip32derivs=false. combinepsbtthe two results and repeat step 4 on the combined PSBT.combinepsbtthe two new results, thendecodepsbtandfinalizepsbt.
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
master@a829aeaac1
Operating system and version
macOS 27.0.1
Made with my usual tools: a computer, the Internet and an LLM. The mistakes, as usual, are all mine.