diff --git a/yarn-project/noir-contracts/src/contracts/inclusion_proofs_contract/src/main.nr b/yarn-project/noir-contracts/src/contracts/inclusion_proofs_contract/src/main.nr index 462f95091be..97121b4d577 100644 --- a/yarn-project/noir-contracts/src/contracts/inclusion_proofs_contract/src/main.nr +++ b/yarn-project/noir-contracts/src/contracts/inclusion_proofs_contract/src/main.nr @@ -26,7 +26,6 @@ contract InclusionProofs { GENERATOR_INDEX__PUBLIC_LEAF_INDEX, }, oracle::{ - get_block_header::get_block_header, get_membership_witness::{ get_membership_witness, MembershipWitness, @@ -185,9 +184,9 @@ 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 + // included in the nullifier tree (or to 0 if the to-be-inserted nullifier is the largest of all) 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_index == 0), "Proving nullifier non-inclusion failed: low_nullifier.next_value > nullifier.value check failed" );