Skip to content

Commit

Permalink
note and hash cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Aug 7, 2024
1 parent 0a724ce commit 18f44a3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions noir-projects/aztec-nr/aztec/src/note/note_and_hash.nr
Original file line number Diff line number Diff line change
@@ -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: Note,
hash: Field,
hash: Field, // (note_hash_for_read_request)
}

0 comments on commit 18f44a3

Please sign in to comment.