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

What if the leaves has the same content? #24

Open
Shawn-Huang-Tron opened this issue Dec 6, 2022 · 1 comment
Open

What if the leaves has the same content? #24

Shawn-Huang-Tron opened this issue Dec 6, 2022 · 1 comment

Comments

@Shawn-Huang-Tron
Copy link

Hi, I have seen this two method:
https://github.com/cbergoon/merkletree/blob/master/merkle_tree.go#L115
https://github.com/cbergoon/merkletree/blob/master/merkle_tree.go#L265
What if we have same contents in two different leaves? Will it result in the wrong result?

@patrickmao93
Copy link

patrickmao93 commented Aug 14, 2023

second this... i think this lib needs another method for generating merkle proofs by specifying leaf index. Otherwise this lib is unusable for sparse merkle trees where many leaf nodes can be empty, and we cannot generate non-inclusion merkle paths

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

No branches or pull requests

2 participants