Skip to content
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

Merkle tree leaf hashing is done on a larger buffer than necessary #74

Closed
kobigurk opened this issue May 7, 2020 · 1 comment
Closed
Labels
feature New feature or request

Comments

@kobigurk
Copy link
Contributor

kobigurk commented May 7, 2020

The buffer allocated to hash the leaf is larger than the leaf size in order to be able to use the hash_inner_node function: https://github.com/AleoHQ/snarkOS/blob/51b71c1cbd9eec0ccd95016a1b247ce0cd1f2375/algorithms/src/merkle_tree/merkle_tree.rs#L42

While this works for us now in POSW (since Pedersen is homomorphic and the 0s do not change the hash) and using Blake2s (since it works anyway on 512-bit chunks), we might want to change it so there's no confusion in the future.

@kobigurk kobigurk added the feature New feature or request label May 7, 2020
@howardwu
Copy link
Contributor

What's the status on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants