diff --git a/noir-projects/aztec-nr/aztec/src/note/note_and_hash.nr b/noir-projects/aztec-nr/aztec/src/note/note_and_hash.nr index 4221e880a40..b9b6e49c744 100644 --- a/noir-projects/aztec-nr/aztec/src/note/note_and_hash.nr +++ b/noir-projects/aztec-nr/aztec/src/note/note_and_hash.nr @@ -1,6 +1,9 @@ -use crate::note::note_interface::NoteInterface; - +/// When obtaining notes via `get_notes(...)` a note hash is computed for each note when constraining it (and a read +/// request is created and passed to kernels). This same note hash (called note_hash_for_read_request) is needed when +/// removing notes. Since computing this hash is expensive and since it is needed when removing a note we return it +/// from the `get_notes(...)` function. The purpose of this struct is to couple the note and the note hash and make it +/// easier to pass these values around. struct NoteAndHash { note: Note, - hash: Field, + hash: Field, // (note_hash_for_read_request) }