Skip to content

Commit

Permalink
fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 24, 2024
1 parent f1c5581 commit 11596b6
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions noir-projects/aztec-nr/aztec/src/macros/notes/mod.nr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::note::{note_getter_options::PropertySelector, note_header::NoteHeader};
use crate::{note::{note_getter_options::PropertySelector, note_header::NoteHeader}, prelude::Point};
use protocol_types::meta::{flatten_to_fields, pack_from_fields};
use std::{
collections::umap::UHashMap,
hash::{BuildHasherDefault, poseidon2::Poseidon2Hasher, derive_generators},
hash::{BuildHasherDefault, derive_generators, poseidon2::Poseidon2Hasher},
meta::{typ::fresh_type_variable, type_of, unquote},
};

Expand Down Expand Up @@ -318,12 +318,17 @@ comptime fn generate_multi_scalar_mul(
let flattened_as_field = flattened_field[j];
let generator_index = start_generator_index + j;

let generators: [Point; 1] = derive_generators("aztec_nr_generators".as_bytes(), generator_index);
let generators: [Point; 1] =
derive_generators("aztec_nr_generators".as_bytes(), generator_index);
let generator_x = generators[0].x;
let generator_y = generators[1].y;

generators_list = generators_list.push_back(f"aztec::protocol_types::point::Point {{ x: {generator_x}, y: {generator_y}, is_infinite: false }}".quoted_contents());
scalars_list = scalars_list.push_back(quote { std::hash::from_field_unsafe($flattened_as_field) });
let generator_y = generators[0].y;

generators_list = generators_list.push_back(
f"aztec::protocol_types::point::Point {{ x: {generator_x}, y: {generator_y}, is_infinite: false }}"
.quoted_contents(),
);
scalars_list =
scalars_list.push_back(quote { std::hash::from_field_unsafe($flattened_as_field) });
}
args_list = args_list.push_back(quote { $field_name: $typ });
aux_vars_list = aux_vars_list.append(aux_vars);
Expand Down Expand Up @@ -615,7 +620,7 @@ comptime fn generate_finalization_payload(
comptime fn generate_partial_note_impl(
s: StructDefinition,
setup_payload_name: Quoted,
finalization_payload_name: Quoted
finalization_payload_name: Quoted,
) -> Quoted {
let name = s.name();
quote {
Expand Down

0 comments on commit 11596b6

Please sign in to comment.