WIP big redo with bitcoin-block and full tx, segwit and merkle handling#63
WIP big redo with bitcoin-block and full tx, segwit and merkle handling#63
Conversation
|
I had a soft look at it, it really looks promising. |
|
Thinking that maybe we should publish this new work as |
Yes I think that makes sense. Given that we change all of the underlying libraries, I think a clear cut makes things also easier for up-stream maintainers. Then it's clear signal "hey, you probably need a change a lot in your code if you want to use this library as intended" (we have a smoother upgrade path through the legacy API, but ideally people will just use the new API). |
|
ok, so a new repo name, should it just be |
|
I've pushed this as |
First commit switches old code to https://ghub.io/bitcoin-block from bitcoinjs and keeps existing tests.
Remainder are basically a rewrite. Don’t look too hard yet, it’s very much a WIP. I’m trying to use the https://github.com/mikeal/js-multiformats interface and it certainly simplifies things quite a lot.
Each of the fixtures have been updated with:
Proven working
bitcoin-blockandbitcoin-txcodecs for whole blocks and there’s an encode for blocks with no-witness data but you have to take a back-door to get to that, there’s not really a way to include that as part of the js-multiformats interface (and probably shouldn’t be, but it might be worth discussing at some point). I still need to do the merkle structures which will bebitcoin-txbut 64-bytes long blocks, plus an additional codec that will probably be namedbitcoin-witness-commitmentfor a 64-byte block.