feat: add compile-time size check for events and error code links#21024
Merged
nventuro merged 6 commits intomerge-train/fairiesfrom Mar 3, 2026
Merged
feat: add compile-time size check for events and error code links#21024nventuro merged 6 commits intomerge-train/fairiesfrom
nventuro merged 6 commits intomerge-train/fairiesfrom
Conversation
Add a static_assert to the #[event] macro that validates event serialized
length does not exceed MAX_EVENT_SERIALIZED_LEN, mirroring the existing
check in the #[note] macro. Add error code URLs to both the note and
event static_assert messages linking to docs.aztec.network/errors/{4,5},
with corresponding netlify redirects. Add an invalid_event compile
failure test.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
@nventuro The code in this PR was broken so I fixed it. The fixes I needed to do are in the last 3 commits. |
Collaborator
|
❌ Failed to cherry-pick to |
AztecBot
pushed a commit
that referenced
this pull request
Mar 3, 2026
…1024) This adds the static assert for packing length that we had in #[note] to future we may have information as to how to proceed (e.g. what to do with too-long events etc). --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: benesjan <janbenes1234@gmail.com>
This was referenced Mar 3, 2026
Closed
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 3, 2026
BEGIN_COMMIT_OVERRIDE feat: allow custom addresses to be prefunded with fee juice in local network (#21000) docs(claude): add Noir early return idiom to CLAUDE.md (#21021) feat: add compile-time size check for events and error code links (#21024) feat: use warn_log_format for discarded messages (#21053) END_COMMIT_OVERRIDE
johnathan79717
pushed a commit
that referenced
this pull request
Mar 4, 2026
…1024) This adds the static assert for packing length that we had in #[note] to #[event] as well, and also adds links to the docsite, where in the future we may have information as to how to proceed (e.g. what to do with too-long events etc). --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: benesjan <janbenes1234@gmail.com>
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.
This adds the static assert for packing length that we had in #[note] to #[event] as well, and also adds links to the docsite, where in the future we may have information as to how to proceed (e.g. what to do with too-long events etc).