Skip to content

Commit 14d5b8b

Browse files
committed
cleanup after rebase
1 parent e68e3c1 commit 14d5b8b

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

noir-projects/aztec-nr/aztec/src/encrypted_logs/encrypted_note_emission.nr

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
use crate::{
22
context::PrivateContext, note::{note_emission::NoteEmission, note_interface::NoteInterface},
3-
keys::getters::{get_current_public_keys, get_ovsk_app},
3+
keys::{getters::{get_current_public_keys, get_ovsk_app}, public_keys::{OvpkM, IvpkM}},
44
encrypted_logs::payload::compute_encrypted_note_log, oracle::logs_traits::LensForEncryptedLog
55
};
6-
use dep::protocol_types::{
7-
hash::sha256_to_field, address::AztecAddress, point::Point, abis::note_hash::NoteHash,
8-
constants::MAX_NOTE_HASHES_PER_CALL
9-
};
6+
use dep::protocol_types::{hash::sha256_to_field, address::AztecAddress, abis::note_hash::NoteHash};
107

118
fn compute_raw_note_log<Note, let N: u32, let NB: u32, let M: u32>(
129
context: PrivateContext,
@@ -42,8 +39,8 @@ fn compute_raw_note_log<Note, let N: u32, let NB: u32, let M: u32>(
4239
unconstrained fn compute_raw_note_log_unconstrained<Note, let N: u32, let NB: u32, let M: u32>(
4340
context: PrivateContext,
4441
note: Note,
45-
ovpk: Point,
46-
ivpk: Point,
42+
ovpk: OvpkM,
43+
ivpk: IvpkM,
4744
recipient: AztecAddress
4845
) -> (u32, [u8; M], Field) where Note: NoteInterface<N, NB>, [Field; N]: LensForEncryptedLog<N, M> {
4946
let ovsk_app = get_ovsk_app(ovpk.hash());
@@ -76,7 +73,9 @@ pub fn encode_and_encrypt_note_unconstrained<Note, let N: u32, let NB: u32, let
7673
let ovpk = get_current_public_keys(context, ov).ovpk_m;
7774
let ivpk = get_current_public_keys(context, iv).ivpk_m;
7875

79-
let (note_hash_counter, encrypted_log, log_hash) = compute_raw_note_log_unconstrained(*context, e.note, ovpk, ivpk, iv);
76+
let (note_hash_counter, encrypted_log, log_hash) = unsafe {
77+
compute_raw_note_log_unconstrained(*context, e.note, ovpk, ivpk, iv)
78+
};
8079
context.emit_raw_note_log(note_hash_counter, encrypted_log, log_hash);
8180
}
8281
}
@@ -102,7 +101,9 @@ pub fn encode_and_encrypt_note_with_keys_unconstrained<Note, let N: u32, let NB:
102101
recipient: AztecAddress
103102
) -> fn[(&mut PrivateContext, OvpkM, IvpkM, AztecAddress)](NoteEmission<Note>) -> () where Note: NoteInterface<N, NB>, [Field; N]: LensForEncryptedLog<N, M> {
104103
| e: NoteEmission<Note> | {
105-
let (note_hash_counter, encrypted_log, log_hash) = compute_raw_note_log_unconstrained(*context, e.note, ovpk, ivpk, recipient);
104+
let (note_hash_counter, encrypted_log, log_hash) = unsafe {
105+
compute_raw_note_log_unconstrained(*context, e.note, ovpk, ivpk, recipient)
106+
};
106107
context.emit_raw_note_log(note_hash_counter, encrypted_log, log_hash);
107108
}
108109
}

0 commit comments

Comments
 (0)