-
Notifications
You must be signed in to change notification settings - Fork 95
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
The fuel_merkle::binary::verify
almost ignores the num_leaves
#716
Comments
Maybe we need to add this check as well |
I implemented the same check in After a while trying to identify any differences in code, I decided I would apply the same test case against the |
I think this may not be a "solvable" problem. From the perspective of the This means that a tree with For example, if you had four different trees:
they all have a height of 3. For proof index 0, they would all produce a proof set with the 3 entries. There's nothing in the proofs themselves that tell us the exact number of leaves in the original tree. The proof index implies the minimum size of the tree, but we still don't know the maximum. |
The test below returns
Ok
while it should fail.The test is added here.
The text was updated successfully, but these errors were encountered: