-
Notifications
You must be signed in to change notification settings - Fork 88
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
test: BMT proof verify tests and additional verify logic #721
Conversation
let (root, proof_set) = tree.prove(index as u64).expect("Unable to generate proof"); | ||
|
||
// When | ||
let verification = verify(&root, &data, &proof_set, index as u64, num_leaves as u64 + 1); |
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.
It would be nice to have random num_leaves
here as well
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.
Hmm, I made this change locally but proptest is reporting failures. I will need to dig into this.
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.
What failures do you have? Is that in cases when num_leaves
is more than the real number of leaves?
The change looks good=) Waiting for the updated test and I'm ready to approve |
Closes: #716
This PR:
binary::verify
function to check the proof index against the length of the proof set. The proof index tells us the minimum size of the tree's leaf set. The provided proof set along the leaf-root path must be compatible with the calculated path length.binary::verify
to ensure correctness of algorithmChecklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]