Skip to content

Commit 4e27fe7

Browse files
committed
docs: add note on why events are serialized
Closes #11571 (as won't do)
1 parent 6dea251 commit 4e27fe7

File tree

1 file changed

+4
-0
lines changed
  • noir-projects/aztec-nr/aztec/src/messages/logs

1 file changed

+4
-0
lines changed

noir-projects/aztec-nr/aztec/src/messages/logs/event.nr

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ pub fn private_event_to_message_plaintext<Event>(
4242
where
4343
Event: EventInterface + Serialize,
4444
{
45+
// We use `Serialize` because we want for events to be processable by off-chain actors, e.g. block explorers,
46+
// wallets and apps, without having to rely on contract invocation. If we used `Packable` we'd need to call utility
47+
// functions in order to unpack events, which would introduce a level of complexity we don't currently think is
48+
// worth the savings in DA (for public events) and proving time (when encrypting private event messages).
4549
let serialized_event = event.serialize();
4650

4751
let mut msg_content = [0; PRIVATE_EVENT_RESERVED_FIELDS + <Event as Serialize>::N];

0 commit comments

Comments
 (0)