From 6911fc2fc701bfbd7f075c5b0ee673087b265e77 Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 26 Sep 2024 08:14:15 +0000 Subject: [PATCH] fix --- .../aztec/src/encrypted_logs/encrypted_event_emission.nr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/noir-projects/aztec-nr/aztec/src/encrypted_logs/encrypted_event_emission.nr b/noir-projects/aztec-nr/aztec/src/encrypted_logs/encrypted_event_emission.nr index 76e3d5ce957..d73bd1a3a9d 100644 --- a/noir-projects/aztec-nr/aztec/src/encrypted_logs/encrypted_event_emission.nr +++ b/noir-projects/aztec-nr/aztec/src/encrypted_logs/encrypted_event_emission.nr @@ -13,7 +13,7 @@ unconstrained fn compute_unconstrained( ivpk: IvpkM, recipient: AztecAddress, event: Event -) -> ([u8; 416 + N], Field) where Event: EventInterface { +) -> ([u8; 416 + N * 32], Field) where Event: EventInterface { compute( contract_address, randomness, @@ -33,9 +33,9 @@ fn compute( ivpk: IvpkM, recipient: AztecAddress, event: Event -) -> ([u8; 416 + N], Field) where Event: EventInterface { +) -> ([u8; 416 + N * 32], Field) where Event: EventInterface { let plaintext = event.private_to_be_bytes(randomness); - let encrypted_log: [u8; 416 + N] = compute_encrypted_log(contract_address, ovsk_app, ovpk, ivpk, recipient, plaintext); + let encrypted_log: [u8; 416 + N * 32] = compute_encrypted_log(contract_address, ovsk_app, ovpk, ivpk, recipient, plaintext); let log_hash = sha256_to_field(encrypted_log); (encrypted_log, log_hash) } @@ -47,7 +47,7 @@ fn emit_with_keys( ovpk: OvpkM, ivpk: IvpkM, iv: AztecAddress, - inner_compute: fn(AztecAddress, Field, Field, OvpkM, IvpkM, AztecAddress, Event) -> ([u8; 416 + N], Field) + inner_compute: fn(AztecAddress, Field, Field, OvpkM, IvpkM, AztecAddress, Event) -> ([u8; 416 + N * 32], Field) ) where Event: EventInterface { let contract_address: AztecAddress = context.this_address(); let ovsk_app: Field = context.request_ovsk_app(ovpk.hash());