Comments (8)
@jprupp @wraithm what do you think?
from haskoin-core.
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?
from haskoin-core.
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.
from haskoin-core.
Special package
The special package would require a version of libsecp256k1
with the BIP340 stuff enabled. It would have bindings to the signing and verification logic under secp256k1_schnorrsig.h
. This entails duplicating some of the non-public code in haskell-secp256k1
, but I think that's ok. It would also expose an API for creating TxSignature
values for inclusion in P2TR witnesses and support for key-path and basic script path spends (CHECKSIG
and CHECKMULTISIG
).
Use flags
I think we can hide entire modules behind package flags. So if we were to go that route, we could have a flag --bip340
that would
- Make an additional module
Haskoin.Transaction.Taproot.Sign
available - Set a similar flag on
haskell-secp256k1
exposing thesecp256k1_schnorrsig.h
bindings
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.
from haskoin-core.
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 .
from haskoin-core.
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.
from haskoin-core.
@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.
from haskoin-core.
from haskoin-core.
Related Issues (20)
- Partially Signed Bitcoin Transactions (PSBT / BIP-174) HOT 1
- How can I contribute? HOT 5
- Add Script Validation Engine HOT 1
- What coins are we going to commit to support? HOT 3
- `bech32Encode` generates invalid output if the HRP contains upper case characters. HOT 2
- ED25519 Support? HOT 4
- SegWit transaction support HOT 2
- haskoin-core-0.9.8: No instance for (MonadFail PutM) for ghc-8.8 HOT 2
- haddock: src/Haskoin/Block/Common.hs:278:5: error: parse error on input ‘{’
- hackage documentation missing again HOT 2
- Network, undocumented HOT 2
- BIP-44, BIP-49 + BIP-84 (and ypub/zpub encodings) support HOT 10
- I think it would also make sense to make revisions on Hackage with `base16-bytestring >= 0.1.1.6 && < 1.0.0` for `haskoin-core` versions prior to this one (0.17.1) going back to 0.13. HOT 3
- No haddock on Hackage HOT 2
- Choice-free formatting via `ormolu` or `fourmolu` with default settings HOT 18
- Deprecate support for BCH HOT 1
- Question about protocol versions HOT 5
- Hackage distribution doesn't contain files to execute tests. HOT 1
- Remove cryptonite dependency HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haskoin-core.