wallet: Multi-sig flow with descriptor wallets #21278

issue laanwj openend this issue on February 23, 2021
  1. laanwj commented at 9:37 am on February 23, 2021: member

    It would be nice to have documentation on how to set up a basic M-of-N multisig between multiple people using descriptor wallets and PSBTs, as well as a signing flow.

    E.g. (borrowed some steps from @jonasschnelli)

    • First phase: generate and exchange xpubs:
      • Every participant generates an xpub: most straightforward is to create a new wallet, I guess, but how to get the xpub to share for a specific BIP32 path?
      • Maybe #21277 helps here but it might be putting the cart before the horse: do we want the default non-multisig descriptors at all here? I don’t think so.
      • Share it with the other participants.
    • Second phase: Every participant imports the following descriptors using importdescriptors:
      • Receiving (internal: false) addresses are wsh(sortedmulti(<M>,xpubA/0/*,xpubB/0/*,xpubC/0/*,…))
      • Change (internal: true) addresses are wsh(sortedmulti(<M>,xpubA/1/*,xpubB/1/*,xpubC/1/*,…))
    • Send funds to the resulting address (every participant should get the same addresses).
    • When making a sending transaction create one using walletcreatefundedpsbt (everyone can initiate this)
      • Send the resulting PSBT to other users
      • At least M users checks it with decodepsbt then (if ok) signs it with walletprocesspsbt
      • Collect the signed PSBTs with joinpsbts then broadcast the resulting transaction
  2. laanwj added the label Docs on Feb 23, 2021
  3. laanwj added the label Wallet on Feb 23, 2021
  4. Rspigler commented at 5:19 am on February 24, 2021: contributor

    For the setup (First and second phase in OP): there is a current discussion of a secure multisignature setup standard here: (https://github.com/nunchuk-io/bips/pull/1)

    I like how you wrote the xpubs/descriptors, compatible with the scheme proposed by @prusnak here: (https://github.com/bitcoin/bitcoin/issues/21197), which adds labels/groups, and hopefully also satisfies the people who wanted ranges in the descriptor. The latter seems to have been NACKed by @sipa (and I agree, this seems cleaner).

    I agree that PSBTs should be used. @hugohn ’s standard doesn’t currently cover that (sending/creating).

  5. synctext commented at 9:13 am on February 25, 2021: none

    documentation on how to set up a basic M-of-N multisig between multiple people using descriptor wallets and PSBTs, as well as a signing flow.

    +1. As part of our university research we are trying to integrate this into our Bitcoin multi-sig DAO. We have the bits and piece working. However, it currently only scales to 10-ish people, due to the need to include all public keys. Four students are currently trying to get Taproot to make it scale :+1:. https://github.com/Tribler/tribler/issues/5986 robot economy

  6. Rspigler commented at 9:11 pm on April 12, 2021: contributor

    There is now a proposed BIP standardizing a process for setting up multisignature wallets - https://github.com/bitcoin/bips/pull/1097 Also a proposed BIP for an updated hierarchy for cosigners in multisignature wallets - https://github.com/bitcoin/bips/pull/1089

    This would include descriptor wallets, PSBTs, and (hopefully) QR codes.

    Something that has also been discussed is possibly increasing the checksum in the descriptor language. See discussion here

    This would also be a significant/final part of my $1,500 bounty posted here - https://github.com/bitcoin/bitcoin/issues/21071

  7. Sjors commented at 7:39 pm on June 25, 2021: member
    #22341 introduces a getxpub RPC which should be useful for this
  8. laanwj referenced this in commit ff65b696f3 on Oct 18, 2021
  9. sidhujag referenced this in commit 8edbe15e47 on Oct 18, 2021
  10. MarcoFalke commented at 3:44 pm on October 18, 2021: member
    Anything left to do here?
  11. laanwj commented at 8:30 pm on November 15, 2021: member
    No, I think this is done. Thanks @mjdietzx.
  12. laanwj closed this on Nov 15, 2021

  13. MarcoFalke referenced this in commit 87ce2d646b on Dec 14, 2021
  14. sidhujag referenced this in commit b094bdfb15 on Dec 14, 2021
  15. DrahtBot locked this on Nov 15, 2022

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: 2024-12-22 06:12 UTC

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