Skip to content

feat: move event size check from declaration to private emission#22168

Open
nventuro wants to merge 1 commit intomerge-train/fairiesfrom
nv/change-event-guard
Open

feat: move event size check from declaration to private emission#22168
nventuro wants to merge 1 commit intomerge-train/fairiesfrom
nv/change-event-guard

Conversation

@nventuro
Copy link
Copy Markdown
Contributor

The #[event] macro previously enforced MAX_EVENT_SERIALIZED_LEN at declaration time, blocking valid use cases like large public-only events. The size constraint only applies to private emission (due to encryption overhead), so the check now lives in encode_private_event_message instead. Adds a test contract and e2e test proving large events work when emitted publicly.

The `#[event]` macro previously enforced MAX_EVENT_SERIALIZED_LEN at
declaration time, blocking valid use cases like large public-only events.
The size constraint only applies to private emission (due to encryption
overhead), so the check now lives in `encode_private_event_message`
instead. Adds a test contract and e2e test proving large events work
when emitted publicly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant