fix(pxe): verify private event commitment matches content#22638
Merged
nchamo merged 1 commit intomerge-train/fairiesfrom Apr 20, 2026
Merged
fix(pxe): verify private event commitment matches content#22638nchamo merged 1 commit intomerge-train/fairiesfrom
nchamo merged 1 commit intomerge-train/fairiesfrom
Conversation
AztecBot
pushed a commit
that referenced
this pull request
Apr 20, 2026
Collaborator
|
✅ Successfully backported to backport-to-v4-next-staging #22666. |
dipkakwani
pushed a commit
to dipkakwani/aztec-packages
that referenced
this pull request
Apr 22, 2026
BEGIN_COMMIT_OVERRIDE feat!: kv-store on SQLite-wasm over OPFS (AztecProtocol#22658) fix(pxe): verify private event commitment matches content (AztecProtocol#22638) fix(pxe): propagate calldata count from nested private oracles (AztecProtocol#22642) END_COMMIT_OVERRIDE
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.
Problem
EventService.validateAndStoreEventreceivedcontent,randomness,selector, andeventCommitmentas independent inputs. It verified thatsiloNullifier(contractAddress, eventCommitment)was present in the tx's nullifiers, but never recomputed the commitment from(randomness, selector, content). Unconstrained PXE-side contract code (e.g. a custom message handler, or a utility function that enqueues validation requests and then callsvalidate_and_store_enqueued_notes_and_eventsin the same call frame) could therefore bind arbitrary content to a legitimate tx nullifier, causing PXE to surface fabricated event data throughgetPrivateEvents.The built-in private-event path already derives the commitment from content right before enqueueing (see
process_private_event_msginaztec-nr/aztec/src/messages/discovery/private_events.nr), so the happy path was safe. The gap was in contract-authored paths.Fix
computePrivateEventCommitmentto stdlib, mirroringcompute_private_serialized_event_commitmenton the Noir side.validateAndStoreEventrecomputes the commitment and warns + skips on mismatch.Fixes AztecProtocol/aztec-claude#164