-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Reduce zero-padding and cache zero-hashes in MerkleTree #2415
Reduce zero-padding and cache zero-hashes in MerkleTree #2415
Conversation
Signed-off-by: ljedrz <ljedrz@gmail.com>
Note: I recommend that we finish https://github.com/AleoHQ/snarkVM/pull/2407, as some of the review comments there are applicable to this PR too. |
Converting to a draft until https://github.com/AleoHQ/snarkVM/pull/2407 is reviewed, as they have many common features, and there are already review comments in that one that I've locally applied to this PR. |
Signed-off-by: ljedrz <ljedrz@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from one nit (adding the ensure), LGTM. This comment applies here too.
I was also told equivalence tests have been run on the binary merkle tree just like they were for the k-ary.
Signed-off-by: ljedrz <ljedrz@gmail.com>
Signed-off-by: ljedrz <ljedrz@gmail.com>
@vicsn PR updated; let me know if you agree with the second change, as it would also apply to the k-ary Merkle tree PR 😁. Also, the equivalence tests still pass. |
This PR is the "plain" Merkle tree counterpart to https://github.com/AleoHQ/snarkVM/pull/2407.
While some of the
console/collections/merkle_tree
benchmark results are mixed, any regressions are small; however, I also ran a custom benchmark locally, and that one shows a clear improvement in extreme scenarios: