Skip to content

Commit

Permalink
last touches
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 27, 2025
1 parent e9a4768 commit 67d3d36
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions noir-projects/aztec-nr/aztec/src/note/note_getter/mod.nr
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ fn extract_property_value_from_selector<let N: u32>(
packed_note_content: [Field; N],
selector: PropertySelector,
) -> Field {
// Selectors use PropertySelectors in order to locate note properties inside the serialized note.
// This allows easier packing and custom (de)serialization schemas. A note property is located
// inside the serialized note using the index inside the array, a byte offset and a length.
// Selectors use PropertySelectors in order to locate note properties inside the packed note.
// This allows easier packing and custom (un)packing schemas. A note property is located
// inside the packed note using the index inside the array, a byte offset and a length.
let value: [u8; 32] = packed_note_content[selector.index].to_be_bytes();
let offset = selector.offset;
let length = selector.length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct EcdsaPublicKeyNote {
}

impl NoteInterface<ECDSA_PUBLIC_KEY_NOTE_LEN> for EcdsaPublicKeyNote {
// Cannot use the automatic packing since x and y don't fit. Serialize the note as 5 fields where:
// Cannot use the automatic packing since x and y don't fit. Pack the note as 5 fields where:
// [0] = x[0..31] (upper bound excluded)
// [1] = x[31]
// [2] = y[0..31]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use super::traits::{Deserialize, Packable, Serialize};
/// - `num_already_consumed`: The number of fields already processed in previous recursion calls.
/// - `to_replace`: The name of a specific field that should be replaced during deserialization.
/// - `ro_replace_with`: The value to replace the `to_replace` field with (e.g., `NoteHeader::empty()`).
/// - `should_unpack`: A boolean indicating whether the type should be unpacked (see description of `Packable`
/// and `Serialize` trait for more information about the difference between packing and serialization).
///
/// # Returns
/// A tuple containing:
Expand Down

0 comments on commit 67d3d36

Please sign in to comment.