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

fix: handling low_nullifier.next_value equal to 0 #3562

Merged
merged 5 commits into from
Dec 5, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ contract InclusionProofs {
// 5.c) Prove that the low nullifier is pointing "over" the nullifier to prove that the nullifier is not
// included in the nullifier tree
assert(
full_field_greater_than(witness.leaf_data.next_value, nullifier),
full_field_greater_than(witness.leaf_data.next_value, nullifier) | (witness.leaf_data.next_value == 0),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For good measure, you should probably check both next_value and next_idx or just the index to follow what we are doing in the data here.

https://docs.aztec.network/concepts/advanced/data_structures/indexed_merkle_tree#non-membership-proof

"Proving nullifier non-inclusion failed: low_nullifier.next_value > nullifier.value check failed"
);

Expand Down