-
Notifications
You must be signed in to change notification settings - Fork 594
chore(aztec-nr): mark emit_event_in_public as #[inline_never] to shrink public dispatch #23161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nventuro
merged 1 commit into
merge-train/fairies
from
mv/inline-never-emit-event-in-public
May 13, 2026
+3
−2
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could just call the inner
emit_event_in_publicmethod withunsafe(we needemit_event_in_publicto beunconstrainedas#[inline_never]is an unconstrained-only attribute in Noir). I figured as this is onContractSelfPublicit was actually more accurate to have it be markedunconstrainedexplicitly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add this here, aren't we forcing all contracts to add a safety tag when emitting events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doc comments on this type state: "Core interface for interacting with aztec-nr contract features in public execution contexts." I was going off the assumption that
ContractSelfPublicwould only ever be used in the public runtime which is always unconstrained Noir. This looks to be the case for all our tests (which is what I would expect).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the fucntions themselves are not because it confuses people. It's a long-standing issue: Noir has two execution modes, but Aztec has three. It makes me profoundly unhappy. Developers are taught that unconstraed == scary, and so public functions being unconstrained seems odd. They're actually constrained, it's just that the constraining happens by the AVM.