fix: handle bad note lengths on compute_note_hash_and_nullifier (backport #21271)#21363
Closed
AztecBot wants to merge 2 commits intobackport-to-v4-stagingfrom
Closed
fix: handle bad note lengths on compute_note_hash_and_nullifier (backport #21271)#21363AztecBot wants to merge 2 commits intobackport-to-v4-stagingfrom
AztecBot wants to merge 2 commits intobackport-to-v4-stagingfrom
Conversation
Resolved conflict in noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr - took incoming (PR) version which replaces the old docstring with updated documentation describing the new Option::none() behavior for bad note lengths.
Collaborator
|
Closing as duplicate — superseded by a newer attempt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of #21271 to v4-next.
Returns
Option::none()instead of panicking when the packed note length doesn't match the expected value in_compute_note_hash_and_nullifier.Conflict Resolution
The cherry-pick had a conflict in
noir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr— the v4-next branch had an older docstring forComputeNoteHashAndNullifierwhile the PR introduced a more detailed one. Resolved by taking the incoming (PR) version which documents the newOption::none()behavior for bad note lengths.Changes
noir-projects/aztec-nr/aztec/src/macros/aztec.nr: ReturnOption::none()with warning log instead of asserting on packed note length mismatchnoir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr: Updated docstring forComputeNoteHashAndNullifiernote_hash_and_nullifier_contractwith tests for bad length handlingTest plan
ClaudeBox log: https://claudebox.work/s/4bd6b5cf5928859c?run=1