Skip to content
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

Awesome multisig PR labyrinth guide #24861

Open
3 of 17 tasks
Sjors opened this issue Apr 15, 2022 · 13 comments
Open
3 of 17 tasks

Awesome multisig PR labyrinth guide #24861

Sjors opened this issue Apr 15, 2022 · 13 comments

Comments

@Sjors
Copy link
Member

Sjors commented Apr 15, 2022

@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.

@jonatack
Copy link
Member

Thanks @Sjors, this is very helpful.

@laanwj
Copy link
Member

laanwj commented Apr 15, 2022

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.

@fanquake
Copy link
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.

@Sjors
Copy link
Member Author

Sjors commented Apr 18, 2022

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.

@Rspigler
Copy link
Contributor

Rspigler commented Apr 18, 2022

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

@Bosch-0
Copy link

Bosch-0 commented Apr 20, 2022

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

@Rspigler
Copy link
Contributor

Rspigler commented May 2, 2022

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

So that threshold spends can be implemented privately

Placed in my original post here

@Rspigler
Copy link
Contributor

Rspigler commented May 4, 2022

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

@Bosch-0
Copy link

Bosch-0 commented May 4, 2022

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

@Rspigler
Copy link
Contributor

Rspigler commented May 4, 2022

Submitted!

@Sjors
Copy link
Member Author

Sjors commented May 10, 2022

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

@Rspigler
Copy link
Contributor

@Sjors #22558 can be checked off 🥳

@Sjors
Copy link
Member Author

Sjors commented Sep 28, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants