Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions noir-projects/aztec-nr/aztec/src/oracle/aes128_decrypt.nr
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use crate::utils::array::assert_bounded_vec_trimmed;

#[oracle(aztec_utl_tryAes128Decrypt)]
unconstrained fn try_aes128_decrypt_oracle<let N: u32>(
ciphertext: BoundedVec<u8, N>,
Expand All @@ -21,10 +19,7 @@ pub unconstrained fn try_aes128_decrypt<let N: u32>(
iv: [u8; 16],
sym_key: [u8; 16],
) -> Option<BoundedVec<u8, N>> {
try_aes128_decrypt_oracle(ciphertext, iv, sym_key).map(|result: BoundedVec<u8, N>| {
assert_bounded_vec_trimmed(result);
result
})
try_aes128_decrypt_oracle(ciphertext, iv, sym_key)
}

mod test {
Expand Down
6 changes: 1 addition & 5 deletions noir-projects/aztec-nr/aztec/src/oracle/notes.nr
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::note::{HintedNote, note_interface::NoteType};
use crate::utils::array::assert_bounded_vec_trimmed;

use crate::protocol::{address::AztecAddress, traits::Packable};

Expand Down Expand Up @@ -143,7 +142,6 @@ where
MaxNotes,
<HintedNote<Note> as Packable>::N,
);
assert_bounded_vec_trimmed(packed_hinted_notes);

let mut notes = BoundedVec::<_, MaxNotes>::new();
for i in 0..packed_hinted_notes.len() {
Expand All @@ -170,9 +168,7 @@ where
// both a preprocessor and a filter.
let mut notes_array = [Option::none(); MaxNotes];
for i in 0..notes.len() {
if i < notes.len() {
notes_array[i] = Option::some(notes.get_unchecked(i));
}
notes_array[i] = Option::some(notes.get_unchecked(i));
}

notes_array
Expand Down
66 changes: 0 additions & 66 deletions noir-projects/aztec-nr/aztec/src/utils/array/assert_trimmed.nr

This file was deleted.

2 changes: 0 additions & 2 deletions noir-projects/aztec-nr/aztec/src/utils/array/mod.nr
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
pub mod append;
pub mod assert_trimmed;
pub mod collapse;
pub mod subarray;
pub mod subbvec;

pub use append::append;
pub(crate) use assert_trimmed::assert_bounded_vec_trimmed;
pub use collapse::collapse;
pub use subarray::subarray;
pub use subbvec::subbvec;
Loading