-
Notifications
You must be signed in to change notification settings - Fork 93
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
Signing support for P2TR outputs #405
Comments
What would the special package look like? I don't quite see the full vision for the second option. Could you flesh that out for me? |
I was thinking of the same question. How would that package work? Is it possible to hide the P2TR code behind a compile-time flag? As long as a shell script is provided that will run the tests with and without flags, using the appropriate Nix package, without extra hassle, such that anyone can run it. |
Special packageThe special package would require a version of Use flagsI think we can hide entire modules behind package flags. So if we were to go that route, we could have a flag
I think the best testing strategy would be to have one test script that runs all the tests against the Nix package. Since we are talking about adding bindings under a flag, testing with the flag indeed tests the base set of exports without the flag. |
I made a PoC sidecar package. It currently does not work, but should give you an idea of what the package would include. You can see it at https://github.com/GambolingPangolin/bitcoin-taproot . |
As an active user of the library (ergvein wallet) I consider the flag option optimal. Also, if there would be any tasks that I can help with, I am in. We want to add taproot support to the wallet. |
@NCrashed good to hear your thoughts. I'll go ahead and create some branches that put the signing code behind flags, so everyone can have a look at that. |
I also agree that the flag option is the most intuitive and straightforward
one for the user.
…On Tue, Nov 16, 2021, 07:21 Ian Shipman ***@***.***> wrote:
@NCrashed <https://github.com/NCrashed> good to hear your thoughts. I'll
go ahead and create some branches that put the signing code behind flags,
so everyone can have a look at that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#405 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALRLUODBO6BX5XT2BM5PL3UMJZHJANCNFSM5H3KJGVQ>
.
|
I would like to contribute P2TR signing functionality to the ecosystem. Ultimately this relies on algorithms that are part of
libsecp256k1
master, but behind a flag. Most Linux distributions ship a version oflibsecp256k1
without those algorithms. (The version innixpkgs-unstable
does ship BIP340 signing support.)There are three options as I see it.
haskell-secp256k1
and taproot signing support tohaskoin-core
. We would need to make sure that users are not surprised at link time if their version oflibsecp256k1
does not support BIP 34x. This means creating a flag in each package, so the user has to opt into BIP 34x.libsecp256k1
.libsecp256k1
. This would give us complete control over what C routines are available to our Haskell code. IIUChaskell-secp256k1
used to do this, but it was difficult and fragile in practice.I think the second option is the simplest and best. Once BIP340 support becomes widely available in
libsecp256k1
in OS repositories, we can move the code intohaskell-secp256k1
andhaskoin-core
.The text was updated successfully, but these errors were encountered: