bitcoin / bitcoin/bitcoin

Awesome multisig PR labyrinth guide

Open
#24,861 20 comments 20 reactions 0 assignees View on GitHub
Docs Tracking Issue Wallet
Dominant language
C++
Stars
90.2k
Forks
39.4k
Avg merge
3d 11h
Merged PRs (30d)
91

Description

@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](https://github.com/bitcoin/bitcoin/blob/master/doc/multisig-tutorial.md) 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?**

- Taproot support for external signers:
- [x] #22558 (PSBT fields)
- [x] #23578 (External signer support)
- [x] Timelock support for descriptors: this will be added along with full [MiniScript](https://bitcoin.sipa.be/miniscript/) support in #24148 & #24149 (@darosior).
- [ ] Ability to handle descriptors for which we have 1-of-N keys. Descriptor wallets currently expect the wallet to be either watch-only and have no keys, or to have all the keys.
- [x] #29130 makes it possible to create a wallet _with_ a seed, but without any descriptors.
- [ ] The user would grab an xpub from it (#22341,#32784) to construct a multisig descriptor and then import that.
- [x] #29130 added `gethdkeys`, helpful but doesn't support arbitrary derivation paths
- [ ] MuSig2 setup and signing support, which requires:
- [x] a BIP to specify new PSBT fields (tracked in #23326)
- [x] #31247
- [x] Bitcoin Core MuSig2 support: #29675
- [x] At least one other (hardware) wallet to support it
- [x] Ledger app added support in 2025
- [x] ColdCard added support in 2026
- [ ] HWI changes:
- [ ] https://github.com/bitcoin-core/HWI/pull/794
- [ ] more thorough (draft) re-implementation: https://github.com/Sjors/async-hwi/pull/2
- [ ] a simple Python setup wizard
* right now [Specter Desktop](https://github.com/cryptoadvance/specter-desktop) is by far the easiest way to setup a multisig wallet. But it's a huge dependency (including a bunch of NPM packages for their web interface). A simple Python script in contrib/ could call HWI to get a list of signers, ask what threshold to use, call `createwallet` to generate a blank wallet, fetch an xpub from it, and then call `importdescriptors`.
* the script could use [BIP 129 / BSMS](https://github.com/bitcoin/bips/blob/master/bip-0129.mediawiki) (perhaps initially without encryption)
* Specter doesn't set the external_signer wallet flag, so I have a trivial PR to do that manually: #21928 (up for grabs)
- [ ] a GUI setup wizard: once we have an established work flow, we would implement that in the GUI

**Misc**

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

- [x] https://github.com/bitcoin/bitcoin/pull/24313

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.

Contributor guide

Open the contributing guide

Research direction

Start with doc/multisig-tutorial.md, then trace the linked Bitcoin Core, HWI, and external repository pull requests listed in this issue. This is a broad roadmap rather than a single task, so no specific entry point, test, or completion criterion is defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
blockchain, cryptography
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.