fix: backport #21271 — handle bad note lengths on compute_note_hash_and_nullifier#21364
Merged
nchamo merged 2 commits intobackport-to-v4-stagingfrom Mar 14, 2026
Merged
Conversation
4ff264b to
2d467c9
Compare
1ef7474 to
7bbcb9f
Compare
nchamo
approved these changes
Mar 14, 2026
Collaborator
Author
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
alexghr
pushed a commit
that referenced
this pull request
Mar 17, 2026
BEGIN_COMMIT_OVERRIDE fix(aztec-nr): return Option from decode functions and fix event commitment capacity (backport #21264) (#21360) fix: backport #21271 — handle bad note lengths on compute_note_hash_and_nullifier (#21364) fix: not reusing tags of partially reverted txs (#20817) chore: revert accidental backport of #20817 (#21583) feat: Implement commit all and revert all for world state checkpoints (#21532) cherry-pick: fix: dependabot alerts (#21531) fix: dependabot alerts (backport #21531 to v4) (#21592) fix: backport #21443 — Don't update state if we failed to execute sufficient transactions (v4) (#21610) chore: Fix msgpack serialisation (#21612) END_COMMIT_OVERRIDE --------- Co-authored-by: Jan Beneš <janbenes1234@gmail.com> Co-authored-by: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Co-authored-by: Phil Windle <philip.windle@gmail.com> Co-authored-by: Santiago Palladino <santiago@aztecprotocol.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: ludamad <adam.domurad@gmail.com>
This was referenced Mar 14, 2026
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.
Returns
Option::none()instead of panicking when the packed note length doesn't match the expected value in_compute_note_hash_and_nullifier.Cherry-pick details
20d6c29c81fromnextnoir-projects/aztec-nr/aztec/src/messages/discovery/mod.nr(doc comment divergence between v4-next and next) — resolved by keeping v4-next's shorter doc comment style with the updated code example.Changes
aztec/src/macros/aztec.nr: Replaceassertwithif/elsereturningOption::none()+ warning log on length mismatchaztec/src/messages/discovery/mod.nr: Updated doc comment code examplenote_hash_and_nullifier_contractwith testsNargo.tomlworkspaceClaudeBox log: https://claudebox.work/s/d95ec8f1e0ee5a48?run=1