Closed dcousens closed 7 years ago
Yep, I like this idea.
ping @olalonde, maybe we could use your package at https://github.com/blockai/merkletree, it meets most (performance isn't as high) of the above requirements quite well.
My main concern is that it is written in ES6, which might still discriminate many of our users who are just trying to keep up with the minor release cycle.
@dcousens would be happy to collaborate. As a user of this library, you wouldn't really need to worry about it being written in ES6 as I compile it with babel before publishing to npm. I didn't really worry about performance when writing it but I'm sure it wouldn't be too hard to optimise.
Closing in favour of https://github.com/bitcoinjs/bitcoinjs-lib/pull/653
As per https://github.com/bitcoinjs/bitcoinjs-lib/pull/580, we should extract the merkle calculations to a 3rd party generic package which is agnostic of transactions, and simply operates on hashes.
This way it can be used for more than just bitcoin transactions. The only pre-requisites is that it should be using
Buffer
s, with extensive testing and it should probably be as concise as our own implementation. Performance should also be on par or better.I personally would like to use merkle trees in this way, so if I [or others] can't find something suitable, I'm up for implementing it under
bitcoinjs
org.Thoughts @jprichardson @fanatid ?