Skip to content

fix(aztec-nr): return Option from decode functions and fix event commitment capacity (backport #21264)#21360

Merged
nchamo merged 3 commits intobackport-to-v4-stagingfrom
claudebox/backport-21264-v4-next
Mar 14, 2026
Merged

fix(aztec-nr): return Option from decode functions and fix event commitment capacity (backport #21264)#21360
nchamo merged 3 commits intobackport-to-v4-stagingfrom
claudebox/backport-21264-v4-next

Conversation

@AztecBot
Copy link
Collaborator

@AztecBot AztecBot commented Mar 11, 2026

Summary

Backport of #21264 to backport-to-v4-staging.

  • Fix off-by-one capacity bug in compute_private_serialized_event_commitment (capacity 1 + MAX2 + MAX)
  • Change all decode functions to return Option instead of panicking on malformed input
  • Add warning logs for all decode failure paths in message discovery

Conflict resolution

Cherry-pick had conflicts in 4 files due to v4 vs next differences:

  • Kept storage_slot in partial note decode (v4 has 4 reserved fields vs 3 on next)
  • Used debug_log_format instead of aztecnr_warn_log_format! (macro not available on v4)
  • Kept v4's simpler process_message without custom message handling
  • Fixed private_events.nr auto-merged import of unavailable aztecnr_warn_log_format!

Test plan

  • nargo check passes (compilation verified)
  • All 16 decode-related tests pass
  • max_size_serialized_event_commitment test passes

ClaudeBox log: https://claudebox.work/s/55bed5a58275ba44?run=2

@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Mar 11, 2026
@AztecBot AztecBot changed the base branch from next to backport-to-v4-staging March 11, 2026 13:31
@AztecBot AztecBot force-pushed the claudebox/backport-21264-v4-next branch from 54525fa to e79b73d Compare March 11, 2026 13:35
@ludamad ludamad force-pushed the backport-to-v4-staging branch from 4ff264b to 2d467c9 Compare March 12, 2026 22:29
nchamo and others added 2 commits March 14, 2026 14:37
…ix event commitment capacity (#21264)

Cherry-pick of 7a485d1 with conflicts preserved for review.
Adapted PR #21264 changes for backport-to-v4-staging:
- Keep storage_slot in partial note decode (4 reserved fields vs 3 on next)
- Use debug_log_format instead of aztecnr_warn_log_format (not available on v4)
- Keep v4's simpler process_message without custom message handling
- Fix private_events.nr auto-merged import of unavailable aztecnr_warn_log_format
@AztecBot AztecBot force-pushed the claudebox/backport-21264-v4-next branch from e79b73d to 57ea78c Compare March 14, 2026 14:43
@nchamo nchamo marked this pull request as ready for review March 14, 2026 14:48
@nchamo nchamo requested a review from nventuro as a code owner March 14, 2026 14:48
@nchamo nchamo enabled auto-merge (squash) March 14, 2026 14:49
@nchamo nchamo merged commit f0f1a83 into backport-to-v4-staging Mar 14, 2026
9 checks passed
@nchamo nchamo deleted the claudebox/backport-21264-v4-next branch March 14, 2026 15:24
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>
alexghr added 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)
fix(p2p): fall back to maxTxsPerCheckpoint for per-block tx validation
(#21605)
chore: merge v4 into backport-to-v4-staging (#21618)
fix(revert): avm sim uses event loop again (#21138) (#21630)
fix(e2e): remove historic/finalized block checks from epochs_multiple
test (#21642)
fix: clamp finalized block to oldest available in world-state (#21643)
fix: skip handleChainFinalized when block is behind oldest available
(#21656)
chore: demote finalized block skip log to trace (#21661)
fix: off-by-1 in getBlockHashMembershipWitness archive snapshot
(backport #21648) (#21663)
fix: capture txs not available error reason in proposal handler (#21670)
chore: add L1 inclusion time to stg public (#21665)
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>
Co-authored-by: Alex Gherghisan <alexghr@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants