feat: merge-train/fairies - #25030
Merged
Merged
Conversation
AztecBot
requested review from
a team,
IlyasRidhuan,
LeilaWang,
MirandaWood,
charlielye and
nventuro
as code owners
July 28, 2026 14:47
nchamo
approved these changes
Jul 28, 2026
nchamo
enabled auto-merge
July 28, 2026 14:50
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 28, 2026
Fixes [F-832 ](https://linear.app/aztec-labs/issue/F-832/aztec-packages-aztec-nr-custom-message-handler-can-enqueue-an) Reduce `enqueue_note_for_validation` and `NoteValidationRequest` from `pub` to `pub(crate)`. These are only ever called by aztec-nr's own discovery paths, which run nonce discovery before enqueuing so every enqueued note's unique hash is guaranteed present in the tx effects. Addresses F-832 as API hygiene rather than a security boundary. Two distinct threat models: 1. F-832's actual threat: malicious sender vs honest contract. The honest author uses documented, pub APIs in good faith. A pub raw sink that looks like "the way to deliver a note from a handler" invites them to wire it up, and then any sender could brick others. Removing it from the pub surface means an honest author can't build the vulnerable pattern. 2. Malicious/broken contract author. Unpreventable: they can recompute the slot, push directly, or just panic in a handler. aztec-nr can't and does not need to stop this. The only people harmed are users who chose to run that bad contract, and the blast radius is that one contract's scope. Maybe we do not even deem this `pub(crate)` restriction worth it as I do not think custom message handlers have high demand at this point. But it felt easy enough to restrict the API here. If they ever do have large demand perhaps we should think through our APIs a bit further as to help custom message handlers avoid foot-guns. Once custom handlers become more heavily used we could consider APIs that at least push devs towards inclusion being checked or provide boilerplate for safe custom handlers
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.
BEGIN_COMMIT_OVERRIDE
refactor: split noir-projects into fnd/ and labs/ (#25007)
fix(aztec-nr): restrict raw note-enqueue sink to pub(crate) (#24974)
END_COMMIT_OVERRIDE