psbt: set global_xpubs (at least for multisig descriptors) #27583

issue Sjors opened this issue on May 5, 2023
  1. Sjors commented at 1:16 PM on May 5, 2023: member

    Please describe the feature you'd like to see added.

    The walletcreatefundedpsbt, walletprocesspsbt and send* RPC, as well as the send dialog* in the GUI should populate the PSBT_GLOBAL_XPUB field (defined in BIP 174).

    At least when used in a multisig context, e.g. when spending from a multi() descriptor.

    The Ledger Bitcoin app enforces this as of version 2.1.1., see https://github.com/bitcoin-core/HWI/issues/671

    * = when used with an external signer

    Is your feature related to a problem, if so please describe it.

    Multisig funds (P2WSH and P2SH-P2WSH) are trapped on a Ledger if you update it's Bitcoin app to 2.1.1, unless you use some additional tooling to set this field.

    Describe the solution you'd like

    No response

    Describe any alternatives you've considered

    No response

    Please leave any additional context

    No response

  2. Sjors added the label Feature on May 5, 2023
  3. BrandonOdiwuor commented at 1:25 PM on February 14, 2024: contributor

    What's the progress with this?

  4. BrandonOdiwuor commented at 1:25 PM on February 14, 2024: contributor

    @achow101 what do you think of this?

  5. willcl-ark assigned achow101 on Oct 21, 2025
  6. achow101 commented at 5:50 PM on October 27, 2025: member

    This is more reasonable to do now that legacy wallets are no longer supported.

  7. jeanpablojp commented at 11:15 AM on August 20, 2026: contributor

    I got here reading the PSBT code while doing a review, and went to check whether this still applies. From what I checked today, on a wsh(multi(2,...)) wallet whose descriptors already carry origin and extended key, walletcreatefundedpsbt, walletprocesspsbt and send all return an empty global_xpubs. The field already serializes, deserializes and merges when combining PSBTs, it's just that nothing populates it. @achow101, this is assigned to you, are you still planning to pick it up? If so, I'll leave it with you. If it's stalled, I can prepare a patch.

  8. Sjors commented at 11:29 AM on August 20, 2026: member

    @jeanpablojp I would not worry about assignment. Feel free to work on this.

    That said, I'm not sure if my initial motivation still matters, since Ledger uses BIP388 policies now. See also https://github.com/Sjors/bitcoin/pull/91.

  9. achow101 unassigned achow101 on Aug 20, 2026
  10. jeanpablojp commented at 11:14 PM on August 20, 2026: contributor

    @Sjors I went to check. For multisig, the policies are built by HWI from the PSBT's global xpubs, so the field still feeds that path. I saw in your bitcoin-core/HWI#794 that you add a registration path, and that you leave the Trezor out of it, with parse_multisig still reading psbt.xpub. Without registration the information has to come inside the PSBT, and Specter fills it in itself after getting the PSBT from Core. And even with registration everywhere, whoever signs with just the file, without a wallet loaded, has no policy and no registration to pass.

    If it makes any sense to go ahead, do we fill it always, or only when the descriptor is multisig?

  11. Sjors commented at 7:05 AM on August 21, 2026: member

    @jeanpablojp so it sounds like we still need global xpubs for at least Trezor?

  12. jeanpablojp commented at 11:49 AM on August 21, 2026: contributor

    @Sjors Yes, and from what I saw it's not only the Trezor, in your PR digitalbitbox.py, keepkey.py and ledger.py with the legacy app raise the same exception.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-09-04 08:52 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me