Releases: txaty/go-merkletree
Releases · txaty/go-merkletree
v0.2.2
v0.2.1
v0.2.0
This release includes various refactors:
- Upgraded to Go 1.21, using the built-in min function;
- Upgraded dependencies;
- Upgraded GitHub Action pipelines, adding Codacy;
- Remove the global worker pool and add the worker pool to the MerkleTree struct. So now, each MerkleTree uses its dedicated worker pool;
- Change pool worker arguments to pointers to separate specific arguments, enhancing readability;
- Fixed minor formatting issues and typos;
- Added more comments;
- Updated README.
Refactor and add disable leaf hashing config
- Add
DisableLeafHashing
inConfig
, allowing users to use the byte values directly as the tree leaves without hashing procedures; MerkleTree.GenerateProof()
method is renamed toMerkleTree.Proof()
;- Refactor and bug fixes.
Add support for OpenZeppelin sort-pair verifcation
- If it is set to true, then the sibling hash pairs are first sorted in ascending order, and then concatenated.
- Otherwise, no change.
Refactor and performance improvement
- Use general arg struct and return type to improve goroutine pool performance,
- Order fields in structs for memory saving,
- Gool (goroutine pool) version upgrade.
Gool (goroutine pool) version upgrade
Refactor and upgrade gool (goroutine pool) version (#17) * Remove useless error checks in default hash functions. Signed-off-by: txaty <[email protected]> * Refactor and upgrade gool (goroutine pool) version. Signed-off-by: txaty <[email protected]>
Default Hash Function Change
Remove useless error checks in default hash functions (#16) Signed-off-by: txaty <[email protected]>
Bug fixes
Bug fixes, refactor, and add more unit tests (#12) * Update README. Signed-off-by: txaty <[email protected]> * Update README. Signed-off-by: txaty <[email protected]> * Add more unit tests. * Fix bugs. Signed-off-by: txaty <[email protected]>
Config modes and performance improvements
- In Config, there are three modes: ModeProofGen (default), ModeTreeBuild, ModeProofGenAndTreeBuild. ModeProofGen directly generates the proofs for all the blocks. ModeTreeBuild builds up and cache the Merkle Tree, this is useful when generating the proofs for only a few blocks.
- Performance improvement via goroutine pool. I implement a simple goroutine pool: gool (github.com/txaty/gool). It significantly improves the parallel algorithms' performance.