Skip to content

Awesome multisig PR labyrinth guide #24861

Open

Description

@Sjors

@ryanofsky recently suggested that I should write an overview of how the various pull requests spread over different repositories relate to some bigger picture view.

See the multisig tutorial for how things currently work.

I typically have the following future multisig wallet in mind to guide my thinking:

  1. a computer running Bitcoin Core holding one master key (key 1)
  2. one or more hardware wallets with additional keys, via HWI (keys 2 ... n)
  3. taproot keypath using n-of-n MuSig2
  4. a fallback with fewer keys after some time elapsed
  5. a GUI wizard to set this up (simple Python command line tool until then)

The descriptors for this could be hand crafted, but it would be nice to have:
6. Miniscript compiler that can generate this

What's Missing?

Misc

I have a PR that improves address display handling on the device:

Even better would be if we had a feature to ask the wallet for a signature to prove it has the private key (without passing that information to the outside world of course, see #24186). This requires BIP-322 support on our end (#24058), at least one hardware wallet to support it, and a new HWI signmessage command. Perhaps this can later be expanded to allow your device to prove that it (still) has the keys it needs as a co-signer.

Miniscript compilers currently doesn't support Taproot (e.g. to find the optimal tree structure), but I'm assuming you can still hand craft a leaf containing MiniScript.

Activity

  1. jonatack commented on Apr 15, 2022

    @jonatack
    Member

    Thanks @Sjors, this is very helpful.

  2. laanwj commented on Apr 15, 2022

    @laanwj
    Member

    Thanks! It's definitely good to have an umbrella issue here, how to get to the point where it's more or less easy to do multisig with bitcoin core.

  3. fanquake commented on Apr 17, 2022

    @fanquake
    Member

    we would just add support new commands in the external signer command interface

    Can you elaborate on your longer term plans for external signing / Boost Process.

    Process is currently relatively poorly maintained; bugs are remaining unfixed for multiple Boost releases, the code and issue tracking is confusingly spread across multiple repositories (which have different versions of the code), no recent "modernization" (i.e no option use std::filesystme over boost::filesystem, like other Boost modules, which is why we no-longer support external signing on Windows). It's inclusion in our project is also a downside to our Boost consolidation / removal, i.e #24742.

    If we continue to use it going forward, I think we need some sort of plan, addressing the above, rather than leaving it ignored while start accumulating workarounds in our own code to support it, and it's presence potentially blocks other goals.

    Happy to split this out into a separate issue for discussion.

  4. Sjors commented on Apr 18, 2022

    @Sjors
    MemberAuthor

    Can you elaborate on your longer term plans for external signing / Boost Process.

    Ideally replace it, but I have no idea with what. That hasn't changed since 2019. In the original PR #15382 (comment) Garzik pointed an alternative from a 2016 blog post. Interesting that repo does have some ongoing development: https://github.com/arun11299/cpp-subprocess

    It doesn't support Windows (well) at the moment, but that might be acceptable since we already (temporally) Windows support anyway.

    Happy to split this out into a separate issue for discussion.

    Indeed seems better to have a separate issue. Swapping out the implementation of RunCommandParseJSON should have no impact on the rest of the architecture.

  5. Rspigler commented on Apr 18, 2022

    @Rspigler
    Contributor

    I too had some concerns with one of the original PRs (#21935 (comment)) re: external signers. Revisiting this I think could be good. I typically build with ./configure --disable-external-signer

    That being said, my main goal is setting up (offline) multisig with Bitcoin Core, and I think it is many other people's goals to set up a wallet as you described in the OP - so thank you for setting up this umbrella issue Sjors! We are getting closer and closer to the final goal!

    I think some other PRs that could be good to add to the above tasklist would be:

    For Taproot support for external signers: (Besides the already linked #22558 in the OP):

    Additional Miniscript PRs:

    Descriptors

    The GUI probably should be built with the new QML based fork? (https://github.com/bitcoin-core/gui-qml) @jarolrod @hebasto @Bosch-0

    GUI:

    BIPs to be supported:

    I had set a $1,500 bounty for a GUI in Bitcoin Core that allows for the setting up of an (offline) multisignature wallet (here: #21071). Since then, there's been further work and standardization on this project. I am raising this bounty to $10,000, to be paid out in bitcoin. Payments will be made in part as individual tasklists are completed; to be divided up to developers who worked on the code and helped review it; at my discretion. This bounty update overrules and succeeds completely the original $1,500 bounty.

    Bounty_Signed.txt

    Also:

    Addition:

    • The GetExternalSigner changes that will be needed as discussed here

    Also, ultimately:

    So that threshold spends can be implemented privately

    Edit: Damn formatting

  6. Bosch-0 commented on Apr 20, 2022

    @Bosch-0

    Thanks for putting this together Sjors, mulitisg in core would be great.

    As @Rspigler mentioned, the QML project aims to be a more modern, user friendly version of the current GUI. Would be great for the GUI component of this effort was put towards the new QML framework. Imo putting a feature freeze on the widgets GUI and slowly moving towards QML as the project develops would prevent a lot of technical debt - something we don't have a lot of room for.

    Tagging others on the project for visibility @GBKS @promag @Mogashni.

    If you are looking ahead as to how an app like this would function, Nunchuk is a great example and imo easier to use than Specter. @hugohn

  7. Rspigler commented on May 2, 2022

    @Rspigler
    Contributor

    Also, ultimately:
    - [ ] BlockstreamResearch/secp256k1-zkp#138

    So that threshold spends can be implemented privately

    Placed in my original post here

  8. Rspigler commented on May 4, 2022

    @Rspigler
    Contributor

    @Sjors Can you update the title to show the bounty? Thanks.

  9. Bosch-0 commented on May 4, 2022

    @Bosch-0

    Should also add this to https://bitcoinbounties.org/ 👀

  10. Rspigler commented on May 4, 2022

    @Rspigler
    Contributor

    Submitted!

  11. Sjors commented on May 10, 2022

    @Sjors
    MemberAuthor

    Don't know about changing the title. I'll add a link to that site to the PR description once its added.

  12. Rspigler commented on Jun 28, 2022

    @Rspigler
    Contributor

    @Sjors #22558 can be checked off 🥳

  13. Sjors commented on Sep 28, 2023

    @Sjors
    MemberAuthor

    Slightly updated the PR description, mainly: point to #26728 which replaces an earlier attempt, drop mention of potential NthKey MuSig2 support, since I discontinued that app.

    Are any other wallets working on MuSig2?

  14. Sjors commented on Dec 6, 2024

    @Sjors
    MemberAuthor

    Main momentum on MuSig2 is in #31245, which also links to a demo Ledger app. This still requires a fair amount of skill and copy-pasting to setup and use.

  15. Sjors commented on Feb 21, 2025

    @Sjors
    MemberAuthor

    The action moved to #29675 (comment). First thing people should review is probably #31247.

  16. Sjors commented on May 19, 2025

    @Sjors
    MemberAuthor

    The MuSig2 party is now at #31244.

    Meanwhile it's still very tedious to setup a multisig wallet, MuSig2 or otherwise. Suggested review to make progress is #29136 which introduces a unused(KEY) descriptor.

    Building on that, I think we need a gethdkey (singular) RPC that can derive any xpub for an unused(KEY), in particular m/87'/0'/0'.
    After that we need to make the wallet a bit smarter when it imports a descriptor that contains an xpub for which it has the master key.

    The final piece is exportwatchonly introduced in #32489.

    With those ingredients you can somewhat practically setup a multisig wallet, e.g. between Alice with a Bitcoin Core hot wallet and Bob with a hardware wallet:

    • Bob doesn't create a wallet. Instead he gets his m/87'/0'/0' xpub using HWI's getxpub
    • Alice creates a blank wallet, calls addhdkey (which generates a random unused(KEY))
    • Alice calls gethdkey m/87h/0h/0h on the new wallet
    • Alice manually constructs the final descriptor (musig(Alice,Bob))
    • Alice imports this descriptor (optionally: the usused(KEY) disappears)
    • Alice then calls exportwatchonly and hands the wallet file to Bob
    • Bob calls listdescriptors on it to verify his xpub is there

    Perhaps the GUI can have a "my multisig xpub" button, which creates a unused(KEY) if needed, especially if we go for a design like this.

  17. rkrux commented on May 21, 2025

    @rkrux
    Contributor

    Alice calls getxpub m/87h/0h/0h on the new wallet

    Is this supposed to use the not yet present gethdkey RPC instead? Asking because afaik there is no getxpub in the core wallet.

  18. Sjors commented on May 21, 2025

    @Sjors
    MemberAuthor

    @rkrux yes, fixed. HWI has a getxpub command, but in Bitcoin Core it would probably be called gethdkey (since it might also fetch the extended private key).

  19. Sjors commented on Jun 20, 2025

    @Sjors
    MemberAuthor

    Opened a draft PR for derivehdkey: #32784

  20. Sjors commented on Aug 6, 2025

    @Sjors
    MemberAuthor

    I recently made quite a lot of progress in getting MuSig2 setups (with fallback branches) to work, mainly tested against Ledger which has BIP388 support.

    You can try for yourself with those branches for Bitcoin Core and HWI:

  21. added
    Tracking IssueTracks longer-running projects and releases. Gathers TODOs, issues, PRs, and status updates.
    on Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsTracking IssueTracks longer-running projects and releases. Gathers TODOs, issues, PRs, and status updates.Wallet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions