-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BIP 87: Hierarchy for Deterministic Multisig Wallets #1089
Conversation
…rivation Standard.mediawiki Multisig and singlesig support
Update local
[DRAFT] Modern Hierarchy for Deterministic Multisignature Wallets
This seems like a nice simplification. The key distinction here is that users are expected to store the wallet descriptors along with the seed. I don't know if this is flexible enough for wallets that need additional derivations, e.g. for nonces in schemes like https://medium.com/blockstream/musig-dn-schnorr-multisignatures-with-verifiably-deterministic-nonces-27424b5df9d6 It might be fine to just create another BIP when that becomes a problem, but then perhaps this BIP should get a more narrow scope. |
Thanks!
Yes, in a multisig setup, every user has to store every other cosigner's xpub anyway, so they might as well do so via the descriptor (since it provides this information in a standardized format, with the benefit of key origin information and error detection)
I understand the concept of MuSig-DN, but not its implementation details unfortunately. I didn't realize that the nonces would be a level in the BIP32 path? |
Ideally yes, but the current "BIP48" approach has the benefit of being able to recover using only the mnemonics and the threshold. This BIP would drop that ability. That's OK, but it's useful to point out the trade-off.
I don't know if that's the case. Perhaps they can be derived from the private key. I haven't read the blog in enough detail. |
Not ideally - necessary. You need the threshold # of mnemonics and all xpubs to recover funds. |
How is the descriptor |
That's hardware/software specific, and doesn't affect this BIP. Again, this is an ongoing debate/conversation Most hardware wallets and coordinators use a single parent descriptor, and expand it locally for change and receive addresses. Regardless, it doesn't affect this BIP/how co-signers generate keys. |
You can derive xpubs from the mnemonics if you use the BIP48 convention and stick to account 0. The threshold is trivial to remember or can be found with trial and error. You do need all of them, which is of course another disadvantage of that mechanism compared to just backing up descriptors. |
Of course, but then you've lost the entire purpose of multisig if you rely on this. If you set up an M-of-N wallet, and you store only the mnemonics, the moment you have only N-1 mnemonic, you've lost your funds. You need M mnemonics and N public keys (you don't know which M mnemonics you will use to restore, so you can't rely on deriving the xpubs). You might as well store this information as a standardized, single descriptor. Under BSMS every Signer (software or hardware) must be able to display this information to the user. Users should back this up just like they do the mnemonic. There's no reason generating the xprv should have anything to do with the script type |
…awiki Some minor fixes, address gap fixes, backup clarification
…awiki Fix formatting
In Musig-DN (and in RFC6979) you can derive nonces just from the private key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I've seen dev ML discussion of this, but searching isn't coming up with it. Can you link me?
|
||
==Motivation== | ||
|
||
With the increase of more user friendly (offline) multisignature wallets, and adoption of new technologies such as [https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md the descriptor language] and [https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki BIP-0174 (Partially Signed Bitcoin Transactions)], it is necessary to create a common derivation scheme that makes use of all new technologies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the descriptor language is wallet-specific - it should probably be made a BIP before relying on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a BIP could be very helpful, seeing how all wallets will likely (or should) be moving towards this direction. Are you saying a Descriptor-BIP is a blocker for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tagging @sipa , as I believe he is the author of the descriptor language
|
||
The structure proposed later in this paper solves these issues and is quite comprehensive. It allows for the handling of multiple accounts, external and internal chains per account, and millions of addresses per chain, in a multi-party, multisignature, hierarchical deterministic wallet regardless of the script type <ref>'''Why propose this structure only for multisignature wallets?''' Currently, single-sig wallets are able to restore funds using just the master private key data (in the format of BIP39 usually). Even if the user doesn't recall the derivation used, the wallet implementation can iterate through common schemes (BIP44/49/84). With this proposed hierarchy, the user would either have to now backup additional data (the descriptor), or the wallet would have to attempt all script types for every account level when restoring. Because of this, even though the descriptor language handles the signature type just like it does the script type, it is best to restrict this script-agnostic hierarchy to multisignature wallets only. Co-signers in multisignature wallets need to backup all other cosigner public keys anyway in order to restore, so the descriptor provides this information with the benefit of key origin information and error detection.</ref>. | ||
|
||
Any script that is supported by descriptors (and the specific wallet implementation) is compatible with this BIP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this to a Backward Compatibility section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
|
||
==Address Discovery== | ||
|
||
The multisig descriptors or descriptor template that is generated from the cosigners' combined key records should be used to generate and discover addresses. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to explicitly require the descriptor template to include key origin information since it is useful for the PSBT creator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Assigned BIP number 87, please rename file and update README |
…ets.mediawiki to bip-0087.mediawiki
CI is failing:
Suggest dropping "Modern", since that's relative to present time. (Note that will only get it down to 51 characters; an additional 7 still need to go) |
@luke-jr sorry, not sure what the issue is now |
@Sjors MuSig-DN needs a different kind of keys for nonce derivation (it doesn't even use the same secp256k1 for that). I think it's unlikely that those will be integrated into descriptors in common software - it's pretty complex unfortunately. MuSig2 is a lot simpler, but it relies on (actual) randomness or state in the signers. |
@Rspigler The colours were incorrect in your README. Fixed them for you. |
Thanks! |
Updates derivation paths for descriptors, by removing the redundant
script_type
currently in use.@luke-jr @harding @hugohn