From 7c0d30ffd47b1ec49ce24bb0f764a0549d6e8d10 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Thu, 13 Jun 2024 15:09:41 +0000 Subject: [PATCH] feat: Sync from noir (https://github.com/AztecProtocol/aztec-packages/pull/6986) Automated pull of development from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE chore: avoid `bn254_blackbox_solver` polluting feature flags (https://github.com/noir-lang/noir/pull/5141) chore!: remove `distinct` keyword (https://github.com/noir-lang/noir/pull/5219) feat: Sync from aztec-packages (https://github.com/noir-lang/noir/pull/5222) chore: add some property tests to ACVM crates (https://github.com/noir-lang/noir/pull/5215) chore: inline `FieldElement.is_negative` and document (https://github.com/noir-lang/noir/pull/5214) chore!: remove `param_witnesses` and `return_witnesses` from ABI (https://github.com/noir-lang/noir/pull/5154) chore: move implementation of bitwise operations into `blackbox_solver` (https://github.com/noir-lang/noir/pull/5209) chore: remove stale comment (https://github.com/noir-lang/noir/pull/5179) chore: make `nargo` crate and debug info generic (https://github.com/noir-lang/noir/pull/5184) feat!: add session id to foreign call RPC requests (https://github.com/noir-lang/noir/pull/5205) chore(docs): fix incorrect docs github link in footer (https://github.com/noir-lang/noir/pull/5206) fix: error for allocate instructions in acir-gen (https://github.com/noir-lang/noir/pull/5200) feat: Implement println in the comptime interpreter (https://github.com/noir-lang/noir/pull/5197) chore(docs): Supplement Noir Debugger's dependency versions (https://github.com/noir-lang/noir/pull/5199) chore(docs): Update docs homepage (https://github.com/noir-lang/noir/pull/5198) chore: add more lints related to oracle calls (https://github.com/noir-lang/noir/pull/5193) feat: standardize pedersen functions to return `EmbeddedCurvePoint` (https://github.com/noir-lang/noir/pull/5190) END_COMMIT_OVERRIDE --------- Co-authored-by: Tom French Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com> Co-authored-by: Maxim Vezenov --- .aztec-sync-commit | 2 +- Cargo.lock | 1 + Cargo.toml | 8 +++ acvm-repo/acir_field/Cargo.toml | 6 +-- acvm-repo/acvm_js/build.sh | 2 +- acvm-repo/bn254_blackbox_solver/Cargo.toml | 14 ++--- .../src/embedded_curve_ops.rs | 3 +- acvm-repo/bn254_blackbox_solver/src/lib.rs | 5 +- .../src/pedersen/commitment.rs | 3 +- .../src/pedersen/hash.rs | 3 +- .../bn254_blackbox_solver/src/poseidon2.rs | 8 +-- .../bn254_blackbox_solver/src/schnorr/mod.rs | 3 +- aztec_macros/src/lib.rs | 4 +- ...e_note_hash_and_optionally_a_nullifier.rs} | 54 ++++++++++--------- aztec_macros/src/transforms/mod.rs | 2 +- aztec_macros/src/utils/errors.rs | 6 +-- compiler/integration-tests/package.json | 2 +- .../test/node/prove_and_verify.test.ts | 36 ++++++------- compiler/noirc_frontend/src/ast/mod.rs | 23 -------- .../src/hir/comptime/interpreter.rs | 20 ++++--- .../noirc_frontend/src/hir/comptime/scan.rs | 3 +- .../src/hir/resolution/errors.rs | 14 ----- compiler/noirc_frontend/src/hir_def/types.rs | 4 ++ compiler/noirc_frontend/src/lexer/token.rs | 3 -- .../noirc_frontend/src/noir_parser.lalrpop | 1 - compiler/noirc_frontend/src/parser/errors.rs | 2 - .../src/parser/parser/function.rs | 23 ++------ .../benchmarks/bench_sha256/Nargo.toml | 7 --- .../verify_honk_proof/Nargo.toml | 7 +++ .../verify_honk_proof/Prover.toml | 4 ++ .../verify_honk_proof/src/main.nr | 21 ++++++++ .../noir_js_backend_barretenberg/package.json | 2 +- .../src/backend.ts | 5 +- tooling/noirc_abi/src/lib.rs | 15 ------ .../noirc_abi_wasm/test/shared/abi_encode.ts | 2 - .../test/shared/array_as_field.ts | 2 - .../test/shared/decode_error.ts | 2 - .../test/shared/field_as_array.ts | 2 - tooling/noirc_abi_wasm/test/shared/structs.ts | 6 --- .../test/shared/uint_overflow.ts | 2 - yarn.lock | 13 +++-- 41 files changed, 154 insertions(+), 191 deletions(-) rename aztec_macros/src/transforms/{compute_note_hash_and_nullifier.rs => compute_note_hash_and_optionally_a_nullifier.rs} (80%) delete mode 100644 test_programs/benchmarks/bench_sha256/Nargo.toml create mode 100644 test_programs/execution_success/verify_honk_proof/Nargo.toml create mode 100644 test_programs/execution_success/verify_honk_proof/Prover.toml create mode 100644 test_programs/execution_success/verify_honk_proof/src/main.nr diff --git a/.aztec-sync-commit b/.aztec-sync-commit index 0bdea76121d..bdaabc69727 100644 --- a/.aztec-sync-commit +++ b/.aztec-sync-commit @@ -1 +1 @@ -86a33140f9a65e518003b3f4c60f97d132f85b89 +12af650f0d27c37dca06bb329bf76a5574534d78 diff --git a/Cargo.lock b/Cargo.lock index 3480a785d70..bd575d0dca2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -574,6 +574,7 @@ version = "0.46.0" dependencies = [ "acir", "acvm_blackbox_solver", + "ark-bn254", "ark-ec", "ark-ff", "ark-std", diff --git a/Cargo.toml b/Cargo.toml index 66a19bf7766..c08e9f9f38b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -77,6 +77,14 @@ noirc_abi = { path = "tooling/noirc_abi" } bb_abstraction_leaks = { path = "tooling/bb_abstraction_leaks" } acvm_cli = { path = "tooling/acvm_cli" } +# Arkworks +ark-bn254 = { version = "^0.4.0", default-features = false, features = ["curve"] } +ark-bls12-381 = { version = "^0.4.0", default-features = false, features = ["curve"] } +grumpkin = { version = "0.1.0", package = "noir_grumpkin", features = ["std"] } +ark-ec = { version = "^0.4.0", default-features = false } +ark-ff = { version = "^0.4.0", default-features = false } +ark-std = { version = "^0.4.0", default-features = false } + # Misc utils crates iter-extended = { path = "utils/iter-extended" } diff --git a/acvm-repo/acir_field/Cargo.toml b/acvm-repo/acir_field/Cargo.toml index 15d8aafffef..801935c90f9 100644 --- a/acvm-repo/acir_field/Cargo.toml +++ b/acvm-repo/acir_field/Cargo.toml @@ -17,9 +17,9 @@ hex.workspace = true num-bigint.workspace = true serde.workspace = true -ark-bn254 = { version = "^0.4.0", default-features = false, features = ["curve"] } -ark-bls12-381 = { version = "^0.4.0", optional = true, default-features = false, features = ["curve"] } -ark-ff = { version = "^0.4.0", default-features = false } +ark-bn254.workspace = true +ark-bls12-381 = { workspace = true, optional = true } +ark-ff.workspace = true cfg-if = "1.0.0" diff --git a/acvm-repo/acvm_js/build.sh b/acvm-repo/acvm_js/build.sh index 16fb26e55db..c07d2d8a4c1 100755 --- a/acvm-repo/acvm_js/build.sh +++ b/acvm-repo/acvm_js/build.sh @@ -25,7 +25,7 @@ function run_if_available { require_command jq require_command cargo require_command wasm-bindgen -require_command wasm-opt +#require_command wasm-opt self_path=$(dirname "$(readlink -f "$0")") pname=$(cargo read-manifest | jq -r '.name') diff --git a/acvm-repo/bn254_blackbox_solver/Cargo.toml b/acvm-repo/bn254_blackbox_solver/Cargo.toml index 132dddd50e5..37d40de71a9 100644 --- a/acvm-repo/bn254_blackbox_solver/Cargo.toml +++ b/acvm-repo/bn254_blackbox_solver/Cargo.toml @@ -18,14 +18,14 @@ acvm_blackbox_solver.workspace = true hex.workspace = true lazy_static = "1.4" -# BN254 fixed base scalar multiplication solver -grumpkin = { version = "0.1.0", package = "noir_grumpkin", features = ["std"] } -ark-ec = { version = "^0.4.0", default-features = false } -ark-ff = { version = "^0.4.0", default-features = false } +ark-bn254.workspace = true +grumpkin.workspace = true +ark-ec.workspace = true +ark-ff.workspace = true num-bigint.workspace = true [dev-dependencies] -ark-std = { version = "^0.4.0", default-features = false } +ark-std.workspace = true criterion = "0.5.0" pprof = { version = "0.12", features = [ "flamegraph", @@ -36,7 +36,3 @@ pprof = { version = "0.12", features = [ [[bench]] name = "criterion" harness = false - -[features] -default = ["bn254"] -bn254 = ["acir/bn254"] diff --git a/acvm-repo/bn254_blackbox_solver/src/embedded_curve_ops.rs b/acvm-repo/bn254_blackbox_solver/src/embedded_curve_ops.rs index 148accd8b23..35cc68051d7 100644 --- a/acvm-repo/bn254_blackbox_solver/src/embedded_curve_ops.rs +++ b/acvm-repo/bn254_blackbox_solver/src/embedded_curve_ops.rs @@ -3,8 +3,9 @@ use ark_ec::AffineRepr; use ark_ff::MontConfig; use num_bigint::BigUint; +use crate::FieldElement; +use acir::AcirField; use acir::BlackBoxFunc; -use acir::{AcirField, FieldElement}; use crate::BlackBoxResolutionError; diff --git a/acvm-repo/bn254_blackbox_solver/src/lib.rs b/acvm-repo/bn254_blackbox_solver/src/lib.rs index e3cea1153be..08e0fb66a6d 100644 --- a/acvm-repo/bn254_blackbox_solver/src/lib.rs +++ b/acvm-repo/bn254_blackbox_solver/src/lib.rs @@ -2,7 +2,6 @@ #![warn(clippy::semicolon_if_nothing_returned)] #![cfg_attr(not(test), warn(unused_crate_dependencies, unused_extern_crates))] -use acir::FieldElement; use acvm_blackbox_solver::{BlackBoxFunctionSolver, BlackBoxResolutionError}; mod embedded_curve_ops; @@ -15,6 +14,10 @@ use ark_ec::AffineRepr; pub use embedded_curve_ops::{embedded_curve_add, multi_scalar_mul}; pub use poseidon2::poseidon2_permutation; +// Temporary hack, this ensure that we always use a bn254 field here +// without polluting the feature flags of the `acir_field` crate. +type FieldElement = acir::acir_field::GenericFieldElement; + #[derive(Default)] pub struct Bn254BlackBoxSolver; diff --git a/acvm-repo/bn254_blackbox_solver/src/pedersen/commitment.rs b/acvm-repo/bn254_blackbox_solver/src/pedersen/commitment.rs index 5ff2c269d8c..03f03fcf5ab 100644 --- a/acvm-repo/bn254_blackbox_solver/src/pedersen/commitment.rs +++ b/acvm-repo/bn254_blackbox_solver/src/pedersen/commitment.rs @@ -27,12 +27,13 @@ pub(crate) fn commit_native_with_index( #[cfg(test)] mod test { - use acir::{AcirField, FieldElement}; + use acir::AcirField; use ark_ec::short_weierstrass::Affine; use ark_std::{One, Zero}; use grumpkin::Fq; use crate::pedersen::commitment::commit_native_with_index; + use crate::FieldElement; #[test] fn commitment() { diff --git a/acvm-repo/bn254_blackbox_solver/src/pedersen/hash.rs b/acvm-repo/bn254_blackbox_solver/src/pedersen/hash.rs index 5c637207491..152526a9943 100644 --- a/acvm-repo/bn254_blackbox_solver/src/pedersen/hash.rs +++ b/acvm-repo/bn254_blackbox_solver/src/pedersen/hash.rs @@ -30,8 +30,9 @@ fn length_generator() -> &'static Affine { pub(crate) mod test { use super::*; + use crate::FieldElement; - use acir::{AcirField, FieldElement}; + use acir::AcirField; use ark_std::One; use grumpkin::Fq; diff --git a/acvm-repo/bn254_blackbox_solver/src/poseidon2.rs b/acvm-repo/bn254_blackbox_solver/src/poseidon2.rs index 95c620aab0d..18ed0b1d8ab 100644 --- a/acvm-repo/bn254_blackbox_solver/src/poseidon2.rs +++ b/acvm-repo/bn254_blackbox_solver/src/poseidon2.rs @@ -1,7 +1,9 @@ -use acir::{AcirField, FieldElement}; +use acir::AcirField; use acvm_blackbox_solver::BlackBoxResolutionError; use lazy_static::lazy_static; +use crate::FieldElement; + pub fn poseidon2_permutation( inputs: &[FieldElement], len: u32, @@ -543,9 +545,9 @@ impl<'a> Poseidon2<'a> { #[cfg(test)] mod test { - use acir::{AcirField, FieldElement}; + use acir::AcirField; - use super::{field_from_hex, poseidon2_permutation}; + use super::{field_from_hex, poseidon2_permutation, FieldElement}; #[test] fn smoke_test() { diff --git a/acvm-repo/bn254_blackbox_solver/src/schnorr/mod.rs b/acvm-repo/bn254_blackbox_solver/src/schnorr/mod.rs index 62e515a0792..8e3a40803f8 100644 --- a/acvm-repo/bn254_blackbox_solver/src/schnorr/mod.rs +++ b/acvm-repo/bn254_blackbox_solver/src/schnorr/mod.rs @@ -65,9 +65,10 @@ fn schnorr_generate_challenge( #[cfg(test)] mod schnorr_tests { - use acir::{AcirField, FieldElement}; + use acir::AcirField; use super::verify_signature; + use crate::FieldElement; #[test] fn verifies_valid_signature() { diff --git a/aztec_macros/src/lib.rs b/aztec_macros/src/lib.rs index 2daf86dc643..a36b7b17d09 100644 --- a/aztec_macros/src/lib.rs +++ b/aztec_macros/src/lib.rs @@ -3,7 +3,7 @@ mod utils; use noirc_errors::Location; use transforms::{ - compute_note_hash_and_nullifier::inject_compute_note_hash_and_nullifier, + compute_note_hash_and_optionally_a_nullifier::inject_compute_note_hash_and_optionally_a_nullifier, contract_interface::{ generate_contract_interface, stub_function, update_fn_signatures_in_contract_interface, }, @@ -236,7 +236,7 @@ fn transform_hir( ) -> Result<(), (AztecMacroError, FileId)> { if has_aztec_dependency(crate_id, context) { transform_events(crate_id, context)?; - inject_compute_note_hash_and_nullifier(crate_id, context)?; + inject_compute_note_hash_and_optionally_a_nullifier(crate_id, context)?; assign_storage_slots(crate_id, context)?; inject_note_exports(crate_id, context)?; update_fn_signatures_in_contract_interface(crate_id, context) diff --git a/aztec_macros/src/transforms/compute_note_hash_and_nullifier.rs b/aztec_macros/src/transforms/compute_note_hash_and_optionally_a_nullifier.rs similarity index 80% rename from aztec_macros/src/transforms/compute_note_hash_and_nullifier.rs rename to aztec_macros/src/transforms/compute_note_hash_and_optionally_a_nullifier.rs index f624cde9969..30c0f63a2d4 100644 --- a/aztec_macros/src/transforms/compute_note_hash_and_nullifier.rs +++ b/aztec_macros/src/transforms/compute_note_hash_and_optionally_a_nullifier.rs @@ -14,16 +14,16 @@ use crate::utils::{ }, }; -// Check if "compute_note_hash_and_nullifier(AztecAddress,Field,Field,Field,[Field; N]) -> [Field; 4]" is defined -fn check_for_compute_note_hash_and_nullifier_definition( +// Check if "compute_note_hash_and_optionally_a_nullifier(AztecAddress,Field,Field,Field,bool,[Field; N]) -> [Field; 4]" is defined +fn check_for_compute_note_hash_and_optionally_a_nullifier_definition( crate_id: &CrateId, context: &HirContext, ) -> bool { collect_crate_functions(crate_id, context).iter().any(|funct_id| { let func_data = context.def_interner.function_meta(funct_id); let func_name = context.def_interner.function_name(funct_id); - func_name == "compute_note_hash_and_nullifier" - && func_data.parameters.len() == 5 + func_name == "compute_note_hash_and_optionally_a_nullifier" + && func_data.parameters.len() == 6 && func_data.parameters.0.first().is_some_and(| (_, typ, _) | match typ { Type::Struct(struct_typ, _) => struct_typ.borrow().name.0.contents == "AztecAddress", _ => false @@ -31,8 +31,9 @@ fn check_for_compute_note_hash_and_nullifier_definition( && func_data.parameters.0.get(1).is_some_and(|(_, typ, _)| typ.is_field()) && func_data.parameters.0.get(2).is_some_and(|(_, typ, _)| typ.is_field()) && func_data.parameters.0.get(3).is_some_and(|(_, typ, _)| typ.is_field()) - // checks if the 5th parameter is an array and contains only fields - && func_data.parameters.0.get(4).is_some_and(|(_, typ, _)| match typ { + && func_data.parameters.0.get(4).is_some_and(|(_, typ, _)| typ.is_bool()) + // checks if the 6th parameter is an array and contains only fields + && func_data.parameters.0.get(5).is_some_and(|(_, typ, _)| match typ { Type::Array(_, inner_type) => inner_type.to_owned().is_field(), _ => false }) @@ -49,16 +50,16 @@ fn check_for_compute_note_hash_and_nullifier_definition( }) } -pub fn inject_compute_note_hash_and_nullifier( +pub fn inject_compute_note_hash_and_optionally_a_nullifier( crate_id: &CrateId, context: &mut HirContext, ) -> Result<(), (AztecMacroError, FileId)> { if let Some((_, module_id, file_id)) = get_contract_module_data(context, crate_id) { - // If compute_note_hash_and_nullifier is already defined by the user, we skip auto-generation in order to provide an + // If compute_note_hash_and_optionally_a_nullifier is already defined by the user, we skip auto-generation in order to provide an // escape hatch for this mechanism. // TODO(#4647): improve this diagnosis and error messaging. if context.crate_graph.root_crate_id() != crate_id - || check_for_compute_note_hash_and_nullifier_definition(crate_id, context) + || check_for_compute_note_hash_and_optionally_a_nullifier_definition(crate_id, context) { return Ok(()); } @@ -69,14 +70,14 @@ pub fn inject_compute_note_hash_and_nullifier( let max_note_length_const = get_global_numberic_const(context, "MAX_NOTE_FIELDS_LENGTH") .map_err(|err| { ( - AztecMacroError::CouldNotImplementComputeNoteHashAndNullifier { + AztecMacroError::CouldNotImplementComputeNoteHashAndOptionallyANullifier { secondary_message: Some(err.primary_message), }, file_id, ) })?; - // In order to implement compute_note_hash_and_nullifier, we need to know all of the different note types the + // In order to implement compute_note_hash_and_optionally_a_nullifier, we need to know all of the different note types the // contract might use and their serialized lengths. These are the types that are marked as #[aztec(note)]. let mut notes_and_lengths = vec![]; @@ -89,7 +90,7 @@ pub fn inject_compute_note_hash_and_nullifier( ) .map_err(|_err| { ( - AztecMacroError::CouldNotImplementComputeNoteHashAndNullifier { + AztecMacroError::CouldNotImplementComputeNoteHashAndOptionallyANullifier { secondary_message: Some(format!( "Failed to get serialized length for note type {}", path @@ -102,7 +103,7 @@ pub fn inject_compute_note_hash_and_nullifier( if serialized_len > max_note_length_const { return Err(( - AztecMacroError::CouldNotImplementComputeNoteHashAndNullifier { + AztecMacroError::CouldNotImplementComputeNoteHashAndOptionallyANullifier { secondary_message: Some(format!( "Note type {} as {} fields, which is more than the maximum allowed length of {}.", path, @@ -120,11 +121,12 @@ pub fn inject_compute_note_hash_and_nullifier( let max_note_length: u128 = *notes_and_lengths.iter().map(|(_, serialized_len)| serialized_len).max().unwrap_or(&0); - let note_types = + let note_types: Vec = notes_and_lengths.iter().map(|(note_type, _)| note_type.clone()).collect::>(); - // We can now generate a version of compute_note_hash_and_nullifier tailored for the contract in this crate. - let func = generate_compute_note_hash_and_nullifier(¬e_types, max_note_length); + // We can now generate a version of compute_note_hash_and_optionally_a_nullifier tailored for the contract in this crate. + let func = + generate_compute_note_hash_and_optionally_a_nullifier(¬e_types, max_note_length); // And inject the newly created function into the contract. @@ -134,7 +136,7 @@ pub fn inject_compute_note_hash_and_nullifier( inject_fn(crate_id, context, func, location, module_id, file_id).map_err(|err| { ( - AztecMacroError::CouldNotImplementComputeNoteHashAndNullifier { + AztecMacroError::CouldNotImplementComputeNoteHashAndOptionallyANullifier { secondary_message: err.secondary_message, }, file_id, @@ -144,12 +146,12 @@ pub fn inject_compute_note_hash_and_nullifier( Ok(()) } -fn generate_compute_note_hash_and_nullifier( +fn generate_compute_note_hash_and_optionally_a_nullifier( note_types: &[String], max_note_length: u128, ) -> NoirFunction { let function_source = - generate_compute_note_hash_and_nullifier_source(note_types, max_note_length); + generate_compute_note_hash_and_optionally_a_nullifier_source(note_types, max_note_length); let (function_ast, errors) = parse_program(&function_source); if !errors.is_empty() { @@ -161,7 +163,7 @@ fn generate_compute_note_hash_and_nullifier( function_ast.functions.remove(0) } -fn generate_compute_note_hash_and_nullifier_source( +fn generate_compute_note_hash_and_optionally_a_nullifier_source( note_types: &[String], max_note_length: u128, ) -> String { @@ -173,12 +175,13 @@ fn generate_compute_note_hash_and_nullifier_source( // so we include a dummy version. format!( " - unconstrained fn compute_note_hash_and_nullifier( + unconstrained fn compute_note_hash_and_optionally_a_nullifier( contract_address: dep::aztec::protocol_types::address::AztecAddress, nonce: Field, storage_slot: Field, note_type_id: Field, - serialized_note: [Field; {}] + compute_nullifier: bool, + serialized_note: [Field; {}], ) -> pub [Field; 4] {{ assert(false, \"This contract does not use private notes\"); [0, 0, 0, 0] @@ -191,7 +194,7 @@ fn generate_compute_note_hash_and_nullifier_source( let if_statements: Vec = note_types.iter().map(|note_type| format!( "if (note_type_id == {0}::get_note_type_id()) {{ - dep::aztec::note::utils::compute_note_hash_and_nullifier({0}::deserialize_content, note_header, serialized_note) + dep::aztec::note::utils::compute_note_hash_and_optionally_a_nullifier({0}::deserialize_content, note_header, compute_nullifier, serialized_note) }}" , note_type)).collect(); @@ -204,12 +207,13 @@ fn generate_compute_note_hash_and_nullifier_source( format!( " - unconstrained fn compute_note_hash_and_nullifier( + unconstrained fn compute_note_hash_and_optionally_a_nullifier( contract_address: dep::aztec::protocol_types::address::AztecAddress, nonce: Field, storage_slot: Field, note_type_id: Field, - serialized_note: [Field; {}] + compute_nullifier: bool, + serialized_note: [Field; {}], ) -> pub [Field; 4] {{ let note_header = dep::aztec::prelude::NoteHeader::new(contract_address, nonce, storage_slot); diff --git a/aztec_macros/src/transforms/mod.rs b/aztec_macros/src/transforms/mod.rs index 2a6fef7647f..bd419bced6f 100644 --- a/aztec_macros/src/transforms/mod.rs +++ b/aztec_macros/src/transforms/mod.rs @@ -1,4 +1,4 @@ -pub mod compute_note_hash_and_nullifier; +pub mod compute_note_hash_and_optionally_a_nullifier; pub mod contract_interface; pub mod events; pub mod functions; diff --git a/aztec_macros/src/utils/errors.rs b/aztec_macros/src/utils/errors.rs index 51aea3d052f..852b5f1e57a 100644 --- a/aztec_macros/src/utils/errors.rs +++ b/aztec_macros/src/utils/errors.rs @@ -12,7 +12,7 @@ pub enum AztecMacroError { UnsupportedFunctionReturnType { span: Span, typ: ast::UnresolvedTypeData }, UnsupportedStorageType { span: Option, typ: ast::UnresolvedTypeData }, CouldNotAssignStorageSlots { secondary_message: Option }, - CouldNotImplementComputeNoteHashAndNullifier { secondary_message: Option }, + CouldNotImplementComputeNoteHashAndOptionallyANullifier { secondary_message: Option }, CouldNotImplementNoteInterface { span: Option, secondary_message: Option }, MultipleStorageDefinitions { span: Option }, CouldNotExportStorageLayout { span: Option, secondary_message: Option }, @@ -57,8 +57,8 @@ impl From for MacroError { secondary_message, span: None, }, - AztecMacroError::CouldNotImplementComputeNoteHashAndNullifier { secondary_message } => MacroError { - primary_message: "Could not implement compute_note_hash_and_nullifier automatically, please provide an implementation".to_string(), + AztecMacroError::CouldNotImplementComputeNoteHashAndOptionallyANullifier { secondary_message } => MacroError { + primary_message: "Could not implement compute_note_hash_and_optionally_a_nullifier automatically, please provide an implementation".to_string(), secondary_message, span: None, }, diff --git a/compiler/integration-tests/package.json b/compiler/integration-tests/package.json index b789f1f05ce..0638fffe547 100644 --- a/compiler/integration-tests/package.json +++ b/compiler/integration-tests/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "echo Integration Test build step", "test": "yarn test:browser && yarn test:node", - "test:node": "bash ./scripts/setup.sh && hardhat test test/node/**/*", + "test:node": "bash ./scripts/setup.sh && hardhat test test/node/prove_and_verify.test.ts && hardhat test test/node/smart_contract_verifier.test.ts && hardhat test test/node/onchain_recursive_verification.test.ts", "test:browser": "web-test-runner", "test:integration:browser": "web-test-runner test/browser/**/*.test.ts", "test:integration:browser:watch": "web-test-runner test/browser/**/*.test.ts --watch", diff --git a/compiler/integration-tests/test/node/prove_and_verify.test.ts b/compiler/integration-tests/test/node/prove_and_verify.test.ts index 15d39436a3b..699dcf5e918 100644 --- a/compiler/integration-tests/test/node/prove_and_verify.test.ts +++ b/compiler/integration-tests/test/node/prove_and_verify.test.ts @@ -8,6 +8,8 @@ import { CompiledCircuit } from '@noir-lang/types'; const assert_lt_program = assert_lt_json as CompiledCircuit; const fold_fibonacci_program = fold_fibonacci_json as CompiledCircuit; +const backend = new Backend(assert_lt_program); + it('end-to-end proof creation and verification (outer)', async () => { // Noir.Js part const inputs = { @@ -22,11 +24,10 @@ it('end-to-end proof creation and verification (outer)', async () => { // bb.js part // // Proof creation - const prover = new Backend(assert_lt_program); - const proof = await prover.generateProof(witness); + const proof = await backend.generateProof(witness); // Proof verification - const isValid = await prover.verifyProof(proof); + const isValid = await backend.verifyProof(proof); expect(isValid).to.be.true; }); @@ -42,10 +43,9 @@ it('end-to-end proof creation and verification (outer) -- Verifier API', async ( const { witness } = await program.execute(inputs); // Generate proof - const prover = new Backend(assert_lt_program); - const proof = await prover.generateProof(witness); + const proof = await backend.generateProof(witness); - const verificationKey = await prover.getVerificationKey(); + const verificationKey = await backend.getVerificationKey(); // Proof verification const verifier = new Verifier(); @@ -68,11 +68,10 @@ it('end-to-end proof creation and verification (inner)', async () => { // bb.js part // // Proof creation - const prover = new Backend(assert_lt_program); - const proof = await prover.generateProof(witness); + const proof = await backend.generateProof(witness); // Proof verification - const isValid = await prover.verifyProof(proof); + const isValid = await backend.verifyProof(proof); expect(isValid).to.be.true; }); @@ -88,9 +87,7 @@ it('end-to-end proving and verification with different instances', async () => { const { witness } = await program.execute(inputs); // bb.js part - const prover = new Backend(assert_lt_program); - - const proof = await prover.generateProof(witness); + const proof = await backend.generateProof(witness); const verifier = new Backend(assert_lt_program); const proof_is_valid = await verifier.verifyProof(proof); @@ -119,18 +116,17 @@ it('[BUG] -- bb.js null function or function signature mismatch (outer-inner) ', // // Proof creation // - const prover = new Backend(assert_lt_program); // Create a proof using both proving systems, the majority of the time // one would only use outer proofs. - const proofOuter = await prover.generateProof(witness); - const _proofInner = await prover.generateProof(witness); + const proofOuter = await backend.generateProof(witness); + const _proofInner = await backend.generateProof(witness); // Proof verification // - const isValidOuter = await prover.verifyProof(proofOuter); + const isValidOuter = await backend.verifyProof(proofOuter); expect(isValidOuter).to.be.true; // We can also try verifying an inner proof and it will fail. - const isValidInner = await prover.verifyProof(_proofInner); + const isValidInner = await backend.verifyProof(_proofInner); expect(isValidInner).to.be.true; }); @@ -147,10 +143,10 @@ it('end-to-end proof creation and verification for multiple ACIR circuits (inner // bb.js part // // Proof creation - const prover = new Backend(fold_fibonacci_program); - const proof = await prover.generateProof(witness); + const backend = new Backend(fold_fibonacci_program); + const proof = await backend.generateProof(witness); // Proof verification - const isValid = await prover.verifyProof(proof); + const isValid = await backend.verifyProof(proof); expect(isValid).to.be.true; }); diff --git a/compiler/noirc_frontend/src/ast/mod.rs b/compiler/noirc_frontend/src/ast/mod.rs index 39b23228967..bd2b45d9c48 100644 --- a/compiler/noirc_frontend/src/ast/mod.rs +++ b/compiler/noirc_frontend/src/ast/mod.rs @@ -390,26 +390,3 @@ impl std::fmt::Display for Visibility { } } } - -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] -/// Represents whether the return value should compromise of unique witness indices such that no -/// index occurs within the program's abi more than once. -/// -/// This is useful for application stacks that require an uniform abi across across multiple -/// circuits. When index duplication is allowed, the compiler may identify that a public input -/// reaches the output unaltered and is thus referenced directly, causing the input and output -/// witness indices to overlap. Similarly, repetitions of copied values in the output may be -/// optimized away. -pub enum Distinctness { - Distinct, - DuplicationAllowed, -} - -impl std::fmt::Display for Distinctness { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - Self::Distinct => write!(f, "distinct"), - Self::DuplicationAllowed => write!(f, "duplication-allowed"), - } - } -} diff --git a/compiler/noirc_frontend/src/hir/comptime/interpreter.rs b/compiler/noirc_frontend/src/hir/comptime/interpreter.rs index dd436144969..186eaa58c14 100644 --- a/compiler/noirc_frontend/src/hir/comptime/interpreter.rs +++ b/compiler/noirc_frontend/src/hir/comptime/interpreter.rs @@ -149,8 +149,8 @@ impl<'a> Interpreter<'a> { let mut scope = Vec::new(); if self.scopes.len() > 1 { scope = self.scopes.drain(1..).collect(); - self.push_scope(); } + self.push_scope(); (std::mem::take(&mut self.in_loop), scope) } @@ -205,10 +205,11 @@ impl<'a> Interpreter<'a> { } }, HirPattern::Struct(struct_type, pattern_fields, _) => { + self.push_scope(); self.type_check(typ, &argument, location)?; self.type_check(struct_type, &argument, location)?; - match argument { + let res = match argument { Value::Struct(fields, struct_type) if fields.len() == pattern_fields.len() => { for (field_name, field_pattern) in pattern_fields { let field = fields.get(&field_name.0.contents).ok_or_else(|| { @@ -234,7 +235,9 @@ impl<'a> Interpreter<'a> { value, location, }), - } + }; + self.pop_scope(); + res } } } @@ -316,7 +319,10 @@ impl<'a> Interpreter<'a> { match self.interner.expression(&id) { HirExpression::Ident(ident, _) => self.evaluate_ident(ident, id), HirExpression::Literal(literal) => self.evaluate_literal(literal, id), - HirExpression::Block(block) => self.evaluate_block(block), + HirExpression::Block(block) => { + dbg!("going to evaluate a block"); + self.evaluate_block(block) + } HirExpression::Prefix(prefix) => self.evaluate_prefix(prefix, id), HirExpression::Infix(infix) => self.evaluate_infix(infix, id), HirExpression::Index(index) => self.evaluate_index(index, id), @@ -353,13 +359,14 @@ impl<'a> Interpreter<'a> { } DefinitionKind::Local(_) => self.lookup(&ident), DefinitionKind::Global(global_id) => { - // Don't need to check let_.comptime, we can evaluate non-comptime globals too. // Avoid resetting the value if it is already known if let Ok(value) = self.lookup(&ident) { Ok(value) } else { let let_ = self.interner.get_global_let_statement(*global_id).unwrap(); - self.evaluate_let(let_)?; + if let_.comptime { + self.evaluate_let(let_.clone())?; + } self.lookup(&ident) } } @@ -1282,6 +1289,7 @@ impl<'a> Interpreter<'a> { Err(InterpreterError::Continue) => continue, Err(other) => return Err(other), } + self.pop_scope(); } diff --git a/compiler/noirc_frontend/src/hir/comptime/scan.rs b/compiler/noirc_frontend/src/hir/comptime/scan.rs index 02010b6886d..9e3b03ef525 100644 --- a/compiler/noirc_frontend/src/hir/comptime/scan.rs +++ b/compiler/noirc_frontend/src/hir/comptime/scan.rs @@ -53,13 +53,14 @@ impl<'interner> Interpreter<'interner> { /// Otherwise, scan through its expression for any comptime blocks to evaluate. pub fn scan_global(&mut self, global: GlobalId) -> IResult<()> { if let Some(let_) = self.interner.get_global_let_statement(global) { + // dbg!(let_.clone()); if let_.comptime { + dbg!("got here"); self.evaluate_let(let_)?; } else { self.scan_expression(let_.expression)?; } } - Ok(()) } diff --git a/compiler/noirc_frontend/src/hir/resolution/errors.rs b/compiler/noirc_frontend/src/hir/resolution/errors.rs index d6dd1c2cd54..06f6dda7142 100644 --- a/compiler/noirc_frontend/src/hir/resolution/errors.rs +++ b/compiler/noirc_frontend/src/hir/resolution/errors.rs @@ -40,8 +40,6 @@ pub enum ResolverError { UnnecessaryPub { ident: Ident, position: PubPosition }, #[error("Required 'pub', main function must return public value")] NecessaryPub { ident: Ident }, - #[error("'distinct' keyword can only be used with main method")] - DistinctNotAllowed { ident: Ident }, #[error("Missing expression for declared constant")] MissingRhsExpr { name: String, span: Span }, #[error("Expression invalid in an array length context")] @@ -220,18 +218,6 @@ impl<'a> From<&'a ResolverError> for Diagnostic { diag.add_note("The `pub` keyword is mandatory for the entry-point function return type because the verifier cannot retrieve private witness and thus the function will not be able to return a 'priv' value".to_owned()); diag } - ResolverError::DistinctNotAllowed { ident } => { - let name = &ident.0.contents; - - let mut diag = Diagnostic::simple_error( - format!("Invalid `distinct` keyword on return type of function {name}"), - "Invalid distinct on return type".to_string(), - ident.0.span(), - ); - - diag.add_note("The `distinct` keyword is only valid when used on the main function of a program, as its only purpose is to ensure that all witness indices that occur in the abi are unique".to_owned()); - diag - } ResolverError::MissingRhsExpr { name, span } => Diagnostic::simple_error( format!( "no expression specifying the value stored by the constant variable {name}" diff --git a/compiler/noirc_frontend/src/hir_def/types.rs b/compiler/noirc_frontend/src/hir_def/types.rs index ff8b11f3916..1357ea09f94 100644 --- a/compiler/noirc_frontend/src/hir_def/types.rs +++ b/compiler/noirc_frontend/src/hir_def/types.rs @@ -598,6 +598,10 @@ impl Type { matches!(self.follow_bindings(), Type::FieldElement) } + pub fn is_bool(&self) -> bool { + matches!(self.follow_bindings(), Type::Bool) + } + pub fn is_signed(&self) -> bool { matches!(self.follow_bindings(), Type::Integer(Signedness::Signed, _)) } diff --git a/compiler/noirc_frontend/src/lexer/token.rs b/compiler/noirc_frontend/src/lexer/token.rs index 950697c2536..d8555b4fbf7 100644 --- a/compiler/noirc_frontend/src/lexer/token.rs +++ b/compiler/noirc_frontend/src/lexer/token.rs @@ -839,7 +839,6 @@ pub enum Keyword { Contract, Crate, Dep, - Distinct, Else, Field, Fn, @@ -884,7 +883,6 @@ impl fmt::Display for Keyword { Keyword::Contract => write!(f, "contract"), Keyword::Crate => write!(f, "crate"), Keyword::Dep => write!(f, "dep"), - Keyword::Distinct => write!(f, "distinct"), Keyword::Else => write!(f, "else"), Keyword::Field => write!(f, "Field"), Keyword::Fn => write!(f, "fn"), @@ -932,7 +930,6 @@ impl Keyword { "contract" => Keyword::Contract, "crate" => Keyword::Crate, "dep" => Keyword::Dep, - "distinct" => Keyword::Distinct, "else" => Keyword::Else, "Field" => Keyword::Field, "fn" => Keyword::Fn, diff --git a/compiler/noirc_frontend/src/noir_parser.lalrpop b/compiler/noirc_frontend/src/noir_parser.lalrpop index 9acb5ef8b58..c6cb788a5a4 100644 --- a/compiler/noirc_frontend/src/noir_parser.lalrpop +++ b/compiler/noirc_frontend/src/noir_parser.lalrpop @@ -67,7 +67,6 @@ extern { "contract" => BorrowedToken::Keyword(noir_token::Keyword::Contract), "crate" => BorrowedToken::Keyword(noir_token::Keyword::Crate), "dep" => BorrowedToken::Keyword(noir_token::Keyword::Dep), - "distinct" => BorrowedToken::Keyword(noir_token::Keyword::Distinct), "else" => BorrowedToken::Keyword(noir_token::Keyword::Else), "Field" => BorrowedToken::Keyword(noir_token::Keyword::Field), "fn" => BorrowedToken::Keyword(noir_token::Keyword::Fn), diff --git a/compiler/noirc_frontend/src/parser/errors.rs b/compiler/noirc_frontend/src/parser/errors.rs index 9f9a8200954..af3d4caa145 100644 --- a/compiler/noirc_frontend/src/parser/errors.rs +++ b/compiler/noirc_frontend/src/parser/errors.rs @@ -30,8 +30,6 @@ pub enum ParserErrorReason { TraitImplFunctionModifiers, #[error("comptime keyword is deprecated")] ComptimeDeprecated, - #[error("distinct keyword is deprecated. The `distinct` behavior is now the default.")] - DistinctDeprecated, #[error("{0} are experimental and aren't fully supported yet")] ExperimentalFeature(&'static str), #[error( diff --git a/compiler/noirc_frontend/src/parser/parser/function.rs b/compiler/noirc_frontend/src/parser/parser/function.rs index 40180a9f9ac..4db5637f6a7 100644 --- a/compiler/noirc_frontend/src/parser/parser/function.rs +++ b/compiler/noirc_frontend/src/parser/parser/function.rs @@ -4,16 +4,12 @@ use super::{ parameter_name_recovery, parameter_recovery, parenthesized, parse_type, pattern, self_parameter, where_clause, NoirParser, }; +use crate::ast::{ + FunctionDefinition, FunctionReturnType, Ident, ItemVisibility, NoirFunction, Param, Visibility, +}; use crate::parser::labels::ParsingRuleLabel; use crate::parser::spanned; use crate::token::{Keyword, Token}; -use crate::{ - ast::{ - FunctionDefinition, FunctionReturnType, Ident, ItemVisibility, NoirFunction, Param, - Visibility, - }, - parser::{ParserError, ParserErrorReason}, -}; use chumsky::prelude::*; @@ -95,20 +91,9 @@ pub(super) fn generics() -> impl NoirParser> { .map(|opt| opt.unwrap_or_default()) } -#[deprecated = "Distinct keyword is now deprecated. Remove this function after the 0.30.0 release"] -fn optional_distinctness() -> impl NoirParser { - keyword(Keyword::Distinct).or_not().validate(|opt, span, emit| { - if opt.is_some() { - emit(ParserError::with_reason(ParserErrorReason::DistinctDeprecated, span)); - } - opt.is_some() - }) -} - pub(super) fn function_return_type() -> impl NoirParser<(Visibility, FunctionReturnType)> { #[allow(deprecated)] just(Token::Arrow) - .ignore_then(optional_distinctness()) .ignore_then(optional_visibility()) .then(spanned(parse_type())) .or_not() @@ -224,8 +209,6 @@ mod test { // A leading plus is not allowed. "fn func_name(f: Field, y : T) where T: + SomeTrait {}", "fn func_name(f: Field, y : T) where T: TraitX + {}", - // `distinct` is deprecated - "fn main(x: pub u8, y: pub u8) -> distinct pub [u8; 2] { [x, y] }", ], ); } diff --git a/test_programs/benchmarks/bench_sha256/Nargo.toml b/test_programs/benchmarks/bench_sha256/Nargo.toml deleted file mode 100644 index 488b94ca858..00000000000 --- a/test_programs/benchmarks/bench_sha256/Nargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "bench_sha256" -version = "0.1.0" -type = "bin" -authors = [""] - -[dependencies] diff --git a/test_programs/execution_success/verify_honk_proof/Nargo.toml b/test_programs/execution_success/verify_honk_proof/Nargo.toml new file mode 100644 index 00000000000..d298dabb560 --- /dev/null +++ b/test_programs/execution_success/verify_honk_proof/Nargo.toml @@ -0,0 +1,7 @@ +[package] +name = "verify_honk_proof" +type = "bin" +authors = [""] +compiler_version = ">=0.30.0" + +[dependencies] \ No newline at end of file diff --git a/test_programs/execution_success/verify_honk_proof/Prover.toml b/test_programs/execution_success/verify_honk_proof/Prover.toml new file mode 100644 index 00000000000..1ebc77c5a5f --- /dev/null +++ b/test_programs/execution_success/verify_honk_proof/Prover.toml @@ -0,0 +1,4 @@ +key_hash = "0x096129b1c6e108252fc5c829c4cc9b7e8f0d1fd9f29c2532b563d6396645e08f" +proof = ["0x0000000000000000000000000000000000000000000000000000000000000020","0x0000000000000000000000000000000000000000000000000000000000000011","0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000042ab5d6d1986846cf","0x00000000000000000000000000000000000000000000000b75c020998797da78","0x0000000000000000000000000000000000000000000000005a107acb64952eca","0x000000000000000000000000000000000000000000000000000031e97a575e9d","0x00000000000000000000000000000000000000000000000b5666547acf8bd5a4","0x00000000000000000000000000000000000000000000000c410db10a01750aeb","0x00000000000000000000000000000000000000000000000d722669117f9758a4","0x000000000000000000000000000000000000000000000000000178cbf4206471","0x000000000000000000000000000000000000000000000000e91b8a11e7842c38","0x000000000000000000000000000000000000000000000007fd51009034b3357f","0x000000000000000000000000000000000000000000000009889939f81e9c7402","0x0000000000000000000000000000000000000000000000000000f94656a2ca48","0x000000000000000000000000000000000000000000000006fb128b46c1ddb67f","0x0000000000000000000000000000000000000000000000093fe27776f50224bd","0x000000000000000000000000000000000000000000000004a0c80c0da527a081","0x0000000000000000000000000000000000000000000000000001b52c2020d746","0x0000000000000000000000000000005a9bae947e1e91af9e4033d8d6aa6ed632","0x000000000000000000000000000000000025e485e013446d4ac7981c88ba6ecc","0x000000000000000000000000000000ff1e0496e30ab24a63b32b2d1120b76e62","0x00000000000000000000000000000000001afe0a8a685d7cd85d1010e55d9d7c","0x000000000000000000000000000000b0804efd6573805f991458295f510a2004","0x00000000000000000000000000000000000c81a178016e2fe18605022d5a8b0e","0x000000000000000000000000000000eba51e76eb1cfff60a53a0092a3c3dea47","0x000000000000000000000000000000000022e7466247b533282f5936ac4e6c15","0x00000000000000000000000000000071b1d76edf770edff98f00ff4deec264cd","0x00000000000000000000000000000000001e48128e68794d8861fcbb2986a383","0x000000000000000000000000000000d3a2af4915ae6d86b097adc377fafda2d4","0x000000000000000000000000000000000006359de9ca452dab3a4f1f8d9c9d98","0x00000000000000000000000000000044d7ca77b464f03aa44f6f8d49a0d3ada5","0x00000000000000000000000000000000002a36959f550517d82d0af666bcd7dc","0x0000000000000000000000000000000566b28c19f0b1732b95e0381bc5d6dbdd","0x00000000000000000000000000000000002511360b7a8c6a823559f0ac9eb02b","0x000000000000000000000000000000f968b227a358a305607f3efc933823d288","0x00000000000000000000000000000000000eaf8adb390375a76d95e918b65e08","0x000000000000000000000000000000bb34b4b447aae56f5e24f81c3acd6d547f","0x00000000000000000000000000000000002175d012746260ebcfe339a91a81e1","0x00000000000000000000000000000058035b1ed115023f42bf4ee93d2dc29dcb","0x00000000000000000000000000000000002de4b004225be4e68938b0db546287","0x0000000000000000000000000000003d18d72585ef033ab3663d1944abb2054a","0x0000000000000000000000000000000000149a1974c0c2b5f0639970cda1af83","0x000000000000000000000000000000bb1eb2b1fc10b55295ed6c1ae54e8a40da","0x000000000000000000000000000000000026da80059472ac8c64e437d6fe6134","0x000000000000000000000000000000d1f101b72ee710423ca44548910676a4fe","0x00000000000000000000000000000000000323378ad6b5aec67af99e522095a0","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000000","0x2622384e4b4688a3ad115007c1c09de1a141aeca06c31925898cf746038a5897","0x2f743e893a3880004db1ff3492279d89c025b9815f16e129d15f7a3687b6f833","0x03e05487307f18e3afb90cc524e56809e478039d317a3757433bfc8e06a32b73","0x099ba7011747dd2d8b5ac03ed02b93c9803d51899677409931d5b1571c3041b5","0x189ef108e334c5173619eac1067b99526a5cc6e47cbffaa3c117f0c3eb8bebd4","0x0b5f77b69ac2955ecc44a73e18b2ea8403224cf769657d53acc9a5d302d0b86e","0x1b81353a160e985e8a1fb09d3a3827fe68d03585757530dcec1b8038ac829a21","0x175e75cef1b974011de38e6e631f42bffd4dcb6fad6680930388cffaa60d940e","0x1631945a2aa39032cfa8cf379d18a983d4b5a487adab67252c6514b35bc88095","0x181b639e465a6f9842c5d75f6f5b855a065f498595146df3bd2b9c0ef66042a1","0x0c6e5af7add3e12f610c13d8066896d08882a7c50cfe33676fda8a75e250e9b9","0x28f94cd060c45a2e6b423831302deb456d0964879db5008a2be0957a2c749e2a","0x1c81fb20cea508580aa962e5b4736a43382816e7abac7e478e6c080cf896798d","0x23dea53784aa14dcf7e1cce5ee480796e67b2dd69a8e20c5c09558001640edfa","0x149c2548f8b0d96fefecab53e31aa3902341c903fa0ef863ef64610315de993b","0x16ad81b3129ccebe1682d14b726bc9b86acd0f0be8c304594ce5a87e756add27","0x2c1ef938516edccc0cd1d4d812644d72b6ead3c85e1c8500fc54e77e5652b23f","0x0eecb7fba3395b21197cb24bb9b733b1985d81f35a1ee944714ffd781a7bd136","0x06e2a96ecf1e8419198eca10133954f3560102467f40a234cf071d23c6cf411a","0x1e6bfa2adcbdc50313408ef28a77b76dd915fa372c093c4484ba662695a3eadc","0x28ccaf4d4759c1f4bb49429b961a59cdefbc445017ffa807e90c54b27e1ee657","0x22803d537311e757a146ae7a2fc396d42d67f27e73efca82e3e324dc493da4de","0x196255f687cede05f326204bfaead7a54f8d48b67ce8522cb8af6a7fffaffcb6","0x147ea42988386b944f006be242ccc6b099fadd7f450955d252768667bbaee4f9","0x1f9ccb05e508b1d08c79c11acbc0677fdc18d5d40827e2e1eaae60fee51b940f","0x28ea76870d22eea72821da25f9b7a89341347afcd6c077387986a82dc8afa833","0x0e6ef82d3e5a318a9c6233dffbb00d130599f4ac979a89b034ce9d930b11165a","0x2e97fa9299a218c982504199ada3278270b9cb566bf46fe1ecc1d151e06b8745","0x1a41ac9b1032ac24c11720407c253a866e9c75a4ec233f15f968b206ea1e5d0e","0x0b31b541bb044c1bc2428c2a57ba29438f620050d1628389ff1fa90c494d7c58","0x050fec8d69f182768a9b34eca8c3f4695dad8bc20a10904090cfe18777d44d25","0x069283ac40daaafff76c3679f54a0aa773c8d71152fbb9c3219906113fc4f683","0x25c3ec4e8b90214aafe3b5416abf11a98bd34b8acb449df8424f159ddf858bc1","0x1a3884f3a922d0da758cb7ed9a5ddc3c3c2132dde8d913753fa3e6b766be5697","0x222d05a0fce0565bf9cc490f97bd4eff53858f2ca6afe9d91c5c8d7de8076f39","0x054698b045b439467a3067a8dc2b4d020b2bb44df3d98a19f9cfb04c9ee5ffd1","0x0e39d66cded0f3df40e04124e36c827bcaf15fbe9fb6e9bbc3af889f8bd1ebf0","0x145aea47dc97ec35ac67f135aac37f8bc6eaf149551a2f48901529d10e25c860","0x1894877b2769ae2c288738f8aa33acfc7ca9a7d1e26a76908ca2909bf25aa59a","0x27e8c702be67be467f052abd180464a468b7d5d5d8a4961e56e8561f7863c91a","0x0326d3e4607d54a30c7fa99d1609f386aeb8c8094cabd7397246074f634dcec8","0x17eb8f62b5ba2dad391e3f81d3a6b9d03ff723a7d6a4d77b98b18ddd0debf4fd","0x1a5d3e8a27c1f69d6e4558b3c89cd9347c62182ce90fb6e34392bc4e7b7c178c","0x2293034bed3d33d5ad0d150f64d493c9be554f640103621f9ae56034a7323d84","0x13d75ffbb9d2ceb2daa6d42f3618d4ea9775befa1cf5f9df141dfebf794abc35","0x2ec339c42fbb2d50221ec907779e72be3eab2960d110a90d36cc6c0afcf5857e","0x15e9c913fa84a2657571831d5d7a90f6534ca67a1617b4063fa5bf09f46cd7a2","0x10f56fbe9fefd59d2acd49fa641fedcfb65d96d54cf47207e2c8ab34f22bbabe","0x117fa3859a400040ebe8dee4a60ddcb04484ff5cfb5294c6530354c3c8cb35f3","0x123260b824df2f8bbe6a351ba2fa94c61aa754741eb198b768a699b2d1cc2b6f","0x1e51d9a653adc6b67287d35bb60584261f57363177c6b54a56dbd39834d851ba","0x18a9b2e2fce77bdb5e41215e2caeb7e77e946dbb2f381c8e7974709e03a6c216","0x2b2640870195a40e374cfa834e37ad9a5e17cb687bd2119a63ac02c3769b0f1e","0x2da73263fef362dfc79dd1066fd7ec294b765e2533f3ac4320e8d1540f2639a8","0x0cc9f299e5291bb1bc0951ce510a634c418af9f9802a291fe6d951768c0a1b2d","0x02a940acb788df42cc9219531776d45465be19087fc3f523fe92df771e5efc10","0x2d5976cc5540e761824bdacf69a2dddabe104fdbb235985ae9080b488f642fa9","0x284c18d1574d2cb7b4ee45b3ff30176eff2ab9c7b7f60cd8a87cef599379244d","0x12a38d659bf38da09af8f445505baa16bcb036d83173f6f45a7e46cac511e5a1","0x0852ef710b2396ba5b7fd69a95b336908d3a368262ec41e0d972564f784201a4","0x240c467a31ed3bb7c4cef09407750d2d89b3750e6cebb4aaa9d0f1f92be77249","0x04edf7595087745abc11fe7780afd4754c5013725653a4cec31f039b77e7b3c7","0x080d04b50ae3acd787f33f8f4a639a58677b5c04ef8a352fd4dd9236883f0e81","0x0cd745e7540fe230038f024ab1269177599ad94e8d8099a010eb7eebd3e41ec8","0x25e2394f90f5b3e3046b8876a6b3ef19a03ef9e9aeae4813fcb14907decc0393","0x03df12a6e39c606d70d3d470aff710d9daa86dece773a6f6f057725b57d6d115","0x0f744082aecf54f55db19dfbe56a81c17b3eb48417305c129beb6c97a22c705b","0x244a80d6d82e82fc416e8e4694deb4e08b81c32bb90cb2f96ff3f687298322d1","0x251eb4d8692f49523e3972096264ee770b295fb62a970fbfdd8aa1fff661ef50","0x0c4d9200120430618493a9151d632faa95c9ae842b7d97103a4afb3330cafbed","0x09e970a55dd7335db16a3823b6489c77cb7785f674cb7c924994ee121122e514","0x19e5bd1113959463be673ee72103bfe7559f423c632fbf9701ff099e165c429b","0x071eb2916ba30652a328c98353f69f239c41a4913c34931f18e91e5414b3270a","0x2a0cd2ebac904b7ebd82b6509dfcaf9ecf32175758c691d01f4fb32dad6371c4","0x1aa43a3009417d95904ebecd4189545e52ca7e9c7dfa3bde5f255ddefed5c754","0x29fd7a93212d60af81b810dad13a240bbbe16966a4977408b1d64c5d692b50b4","0x000000000000000000000000000000bef7cad70fa62891e6329cb7c17d0c5459","0x0000000000000000000000000000000000209177f2a04609421c1f23c04b454e","0x00000000000000000000000000000060dec389686170618e2490100f3fcf39e2","0x0000000000000000000000000000000000213368873145aad5f93798c31730af","0x000000000000000000000000000000c0f21a470488d9cbe53650d941c25cd569","0x000000000000000000000000000000000016d6f88e6b319553f5948886a6bd5e","0x000000000000000000000000000000d6dbb8a54a071e01c46d648c8c555ec352","0x0000000000000000000000000000000000130a7ce06ad74eb6c83f5565e2f821","0x00000000000000000000000000000058ca3aa788bd6ff37a5da3ecefdc896601","0x00000000000000000000000000000000001381bddcf8fb976cc52fee0d920598","0x00000000000000000000000000000082bdd94acd10edf22e09b1a42be500f8f8","0x00000000000000000000000000000000002f27815e28b2bc0699336893abdc0f","0x000000000000000000000000000000eb1d6973a54f8848f4c0630370d6181e49","0x000000000000000000000000000000000000129c1889d64ab66303bf17bfc864","0x000000000000000000000000000000155918aa9f6d352b847bf860a261266282","0x0000000000000000000000000000000000216e687d2f85a811f67573cbf311ba","0x0000000000000000000000000000002d2662f79a7ba21a95f44e67ed0b5abf3b","0x00000000000000000000000000000000001351870a81dc6edff235df110fe798","0x000000000000000000000000000000b113a55b86f59b21fe419ed8518dfddfc6","0x00000000000000000000000000000000002f26cd920f79b0d72a49897acc521c","0x0000000000000000000000000000002a4e1689c65dcae73ed1a33b03c611a7fe","0x00000000000000000000000000000000001c5093a8ae791c00fdd763c95800c5","0x0000000000000000000000000000006231d049ec3683c06ec6b00348e0669c61","0x0000000000000000000000000000000000237bfd7ec06c28f22ce84db9bb17ed","0x0000000000000000000000000000008afa7fa0842467bded20491950c3c1cde0","0x00000000000000000000000000000000000194ab5c71154605b8483cb40d00b8","0x00000000000000000000000000000066709af193591e93e8be3b833f63cb8597","0x000000000000000000000000000000000008ab9091bb9225b00ca0c011dff12f"] +public_inputs = ["0x0000000000000000000000000000000000000000000000000000000000000003"] +verification_key = ["0x0000000000000000000000000000000000000000000000000000000000000020","0x0000000000000000000000000000000000000000000000000000000000000011","0x0000000000000000000000000000000000000000000000000000000000000001","0x00000000000000000000000000000060e430ad1c23bfcf3514323aae3f206e84","0x00000000000000000000000000000000001b5c3ff4c2458d8f481b1c068f27ae","0x000000000000000000000000000000bb510ab2112def34980e4fc6998ad9dd16","0x00000000000000000000000000000000000576e7c105b43e061e13cb877fefe1","0x000000000000000000000000000000ced074785d11857b065d8199e6669a601c","0x00000000000000000000000000000000000053b48a4098c1c0ae268f273952f7","0x000000000000000000000000000000d1d4b26e941db8168cee8f6de548ae0fd8","0x00000000000000000000000000000000001a9adf5a6dadc3d948bb61dfd63f4c","0x0000000000000000000000000000009ce1faac6f8de6ebb18f1db17372c82ad5","0x00000000000000000000000000000000002002681bb417184b2df070a16a3858","0x000000000000000000000000000000161baa651a8092e0e84725594de5aba511","0x00000000000000000000000000000000000be0064399c2a1efff9eb0cdcb2223","0x0000000000000000000000000000008673be6fd1bdbe980a29d8c1ded54381e7","0x000000000000000000000000000000000008a5158a7d9648cf1d234524c9fa0c","0x0000000000000000000000000000002b4fce6e4b1c72062b296d49bca2aa4130","0x00000000000000000000000000000000002e45a9eff4b6769e55fb710cded44f","0x00000000000000000000000000000072b85bf733758b76bcf97333efb85a23e3","0x000000000000000000000000000000000017da0ea508994fc82862715e4b5592","0x00000000000000000000000000000094fa74695cf058dba8ff35aec95456c6c3","0x0000000000000000000000000000000000211acddb851061c24b8f159e832bd1","0x000000000000000000000000000000303b5e5c531384b9a792e11702ad3bcab0","0x00000000000000000000000000000000000d336dff51a60b8833d5d7f6d4314c","0x0000000000000000000000000000009f825dde88092070747180d581c342444a","0x0000000000000000000000000000000000237fbd6511a03cca8cac01b555fe01","0x0000000000000000000000000000007c313205159495df6d8de292079a4844ff","0x000000000000000000000000000000000018facdfc468530dd45e8f7a1d38ce9","0x0000000000000000000000000000000d1ce33446fc3dc4ab40ca38d92dac74e1","0x00000000000000000000000000000000000852d8e3e0e8f4435af3e94222688b","0x0000000000000000000000000000006c04ee19ec1dfec87ed47d6d04aa158de2","0x000000000000000000000000000000000013240f97a584b45184c8ec31319b5f","0x000000000000000000000000000000cefb5d240b07ceb4be26ea429b6dc9d9e0","0x00000000000000000000000000000000002dad22022121d689f57fb38ca21349","0x000000000000000000000000000000c9f189f2a91aeb664ce376d8b157ba98f8","0x00000000000000000000000000000000002531a51ad54f124d58094b219818d2","0x000000000000000000000000000000ef1e6db71809307f677677e62b4163f556","0x0000000000000000000000000000000000272da4396fb2a7ee0638b9140e523d","0x0000000000000000000000000000002e54c0244a7732c87bc4712a76dd8c83fb","0x000000000000000000000000000000000007db77b3e04b7eba9643da57cbbe4d","0x000000000000000000000000000000e0dfe1ddd7f74ae0d636c910c3e85830d8","0x00000000000000000000000000000000000466fa9b57ec4664abd1505b490862","0x0000000000000000000000000000009ee55ae8a32fe5384c79907067cc27192e","0x00000000000000000000000000000000000799d0e465cec07ecb5238c854e830","0x0000000000000000000000000000001d5910ad361e76e1c241247a823733c39f","0x00000000000000000000000000000000002b03f2ccf7507564da2e6678bef8fe","0x000000000000000000000000000000231147211b3c75e1f47d150e4bbd2fb22e","0x00000000000000000000000000000000000d19ee104a10d3c701cfd87473cbbe","0x0000000000000000000000000000006705f3f382637d00f698e2c5c94ed05ae9","0x00000000000000000000000000000000000b9c792da28bb60601dd7ce4b74e68","0x000000000000000000000000000000ac5acc8cc21e4ddb225c510670f80c80b3","0x00000000000000000000000000000000002da9d3fa57343e6998aba19429b9fa","0x0000000000000000000000000000004bacbf54b7c17a560df0af18b6d0d527be","0x00000000000000000000000000000000000faea33aeca2025b22c288964b21eb","0x000000000000000000000000000000492e756298d68d6e95de096055cc0336c3","0x00000000000000000000000000000000001a12a12f004859e5a3675c7315121b","0x000000000000000000000000000000893d521d512f30e6d32afbbc0cecd8ee00","0x00000000000000000000000000000000001674b3c1ef12c6da690631e0d86c04","0x000000000000000000000000000000aa6cb02a52e7a613873d4ac9b411349945","0x00000000000000000000000000000000001ecb1fe9c493add46751f9940f73e1","0x00000000000000000000000000000045b3d362ca82cba69fb2b9c733a5b8c351","0x000000000000000000000000000000000019a683586af466e331945b732d2f8c","0x000000000000000000000000000000fc79b052dfdfe67c0ecfc06b4267ffd694","0x00000000000000000000000000000000001336a70c396393038d5e9913744ac2","0x0000000000000000000000000000005450d29af1e9438e91cd33ddeb2548226e","0x000000000000000000000000000000000000993a602891cfd0e6f6ecf7404933","0x000000000000000000000000000000498efddab90a32e9b2db729ed6e9b40192","0x00000000000000000000000000000000002425efebe9628c63ca6fc28bdb5901","0x000000000000000000000000000000d8488157f875a21ab5f93f1c2b641f3de9","0x0000000000000000000000000000000000290f95ada3936604dc4b14df7504e3","0x0000000000000000000000000000005d6902187f3ed60dcce06fca211b40329a","0x00000000000000000000000000000000002b5870a6ba0b20aaa0178e5adfbc36","0x000000000000000000000000000000e5c2519171fa0e548fc3c4966ffc1ce570","0x00000000000000000000000000000000001cb8d8f4793b7debbdc429389dbf2d","0x000000000000000000000000000000a3ee22dd60456277b86c32a18982dcb185","0x00000000000000000000000000000000002493c99a3d068b03f8f2b8d28b57ce","0x000000000000000000000000000000f6c3731486320082c20ec71bbdc92196c1","0x00000000000000000000000000000000001ded39c4c8366469843cd63f09ecac","0x000000000000000000000000000000494997477ab161763e46601d95844837ef","0x00000000000000000000000000000000002e0cddbc5712d79b59cb3b41ebbcdd","0x000000000000000000000000000000426db4c64531d350750df62dbbc41a1bd9","0x0000000000000000000000000000000000303126892f664d8d505964d14315ec","0x00000000000000000000000000000076a6b2c6040c0c62bd59acfe3e3e125672","0x000000000000000000000000000000000000874a5ad262eecc6b565e0b085074","0x000000000000000000000000000000ef082fb517183c9c6841c2b8ef2ca1df04","0x0000000000000000000000000000000000127b2a745a1b74968c3edc18982b9b","0x000000000000000000000000000000c9efd4f8c3d56e1eb23d789a8f710d5be6","0x000000000000000000000000000000000015a18748490ff4c2b1871081954e86","0x000000000000000000000000000000a0011ef987dc016ab110eacd554a1d8bbf","0x00000000000000000000000000000000002097c84955059442a95df075833071","0x000000000000000000000000000000d38e9426ad3085b68b00a93c17897c2877","0x00000000000000000000000000000000002aecd48089890ea0798eb952c66824","0x00000000000000000000000000000078d8a9ce405ce559f441f2e71477ff3ddb","0x00000000000000000000000000000000001216bdb2f0d961bb8a7a23331d2150","0x0000000000000000000000000000000000000000000000000000000000000001","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000002","0x0000000000000000000000000000000000000000000000000000000000000000","0x000000000000000000000000000000ee40d90bea71fba7a412dd61fcf34e8ceb","0x0000000000000000000000000000000000140b0936c323fd2471155617b6af56","0x0000000000000000000000000000002b90071823185c5ff8e440fd3d73b6fefc","0x00000000000000000000000000000000002b6c10790a5f6631c87d652e059df4"] \ No newline at end of file diff --git a/test_programs/execution_success/verify_honk_proof/src/main.nr b/test_programs/execution_success/verify_honk_proof/src/main.nr new file mode 100644 index 00000000000..d25fd804ce4 --- /dev/null +++ b/test_programs/execution_success/verify_honk_proof/src/main.nr @@ -0,0 +1,21 @@ +use dep::std; + +// This circuit aggregates a single Honk proof from `assert_statement_recursive`. +fn main( + verification_key: [Field; 103], + // This is the proof without public inputs attached. + // + // This means: the size of this does not change with the number of public inputs. + proof: [Field; 153], + public_inputs: pub [Field; 1], + // This is currently not public. It is fine given that the vk is a part of the circuit definition. + // I believe we want to eventually make it public too though. + key_hash: Field +) { + std::verify_proof( + verification_key.as_slice(), + proof.as_slice(), + public_inputs.as_slice(), + key_hash + ); +} diff --git a/tooling/noir_js_backend_barretenberg/package.json b/tooling/noir_js_backend_barretenberg/package.json index af3011068bf..35fbd6f438b 100644 --- a/tooling/noir_js_backend_barretenberg/package.json +++ b/tooling/noir_js_backend_barretenberg/package.json @@ -41,7 +41,7 @@ "lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0" }, "dependencies": { - "@aztec/bb.js": "0.41.0", + "@aztec/bb.js": "portal:../../../../barretenberg/ts", "@noir-lang/types": "workspace:*", "fflate": "^0.8.0" }, diff --git a/tooling/noir_js_backend_barretenberg/src/backend.ts b/tooling/noir_js_backend_barretenberg/src/backend.ts index d07681dd8c1..ce2c2712491 100644 --- a/tooling/noir_js_backend_barretenberg/src/backend.ts +++ b/tooling/noir_js_backend_barretenberg/src/backend.ts @@ -45,7 +45,10 @@ export class BarretenbergVerifierBackend implements VerifierBackend { const { Barretenberg, RawBuffer, Crs } = await import('@aztec/bb.js'); const api = await Barretenberg.new(this.options); - const [_exact, _total, subgroupSize] = await api.acirGetCircuitSizes(this.acirUncompressedBytecode); + const [_exact, _total, subgroupSize] = await api.acirGetCircuitSizes( + this.acirUncompressedBytecode, + /*honkRecursion=*/ false, // TODO(https://github.com/AztecProtocol/barretenberg/issues/1013): Remove this flag + ); const crs = await Crs.new(subgroupSize + 1); await api.commonInitSlabAllocator(subgroupSize); await api.srsInitSrs(new RawBuffer(crs.getG1Data()), crs.numPoints, new RawBuffer(crs.getG2Data())); diff --git a/tooling/noirc_abi/src/lib.rs b/tooling/noirc_abi/src/lib.rs index 2abb28e2538..514fac2e73d 100644 --- a/tooling/noirc_abi/src/lib.rs +++ b/tooling/noirc_abi/src/lib.rs @@ -107,21 +107,6 @@ impl From<&Visibility> for AbiVisibility { } } -#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] -#[serde(rename_all = "lowercase")] -/// Represents whether the return value should compromise of unique witness indices such that no -/// index occurs within the program's abi more than once. -/// -/// This is useful for application stacks that require an uniform abi across across multiple -/// circuits. When index duplication is allowed, the compiler may identify that a public input -/// reaches the output unaltered and is thus referenced directly, causing the input and output -/// witness indices to overlap. Similarly, repetitions of copied values in the output may be -/// optimized away. -pub enum AbiDistinctness { - Distinct, - DuplicationAllowed, -} - #[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "lowercase")] pub enum Sign { diff --git a/tooling/noirc_abi_wasm/test/shared/abi_encode.ts b/tooling/noirc_abi_wasm/test/shared/abi_encode.ts index f4ab8175700..62eb7658f43 100644 --- a/tooling/noirc_abi_wasm/test/shared/abi_encode.ts +++ b/tooling/noirc_abi_wasm/test/shared/abi_encode.ts @@ -9,9 +9,7 @@ export const abi: Abi = { visibility: 'private', }, ], - param_witnesses: { foo: [{ start: 1, end: 2 }], bar: [{ start: 2, end: 4 }] }, return_type: null, - return_witnesses: [], error_types: {}, }; diff --git a/tooling/noirc_abi_wasm/test/shared/array_as_field.ts b/tooling/noirc_abi_wasm/test/shared/array_as_field.ts index 3698b913c66..8fecacf79f8 100644 --- a/tooling/noirc_abi_wasm/test/shared/array_as_field.ts +++ b/tooling/noirc_abi_wasm/test/shared/array_as_field.ts @@ -8,9 +8,7 @@ export const abi: Abi = { visibility: 'private', }, ], - param_witnesses: { foo: [{ start: 1, end: 3 }] }, return_type: null, - return_witnesses: [], error_types: {}, }; diff --git a/tooling/noirc_abi_wasm/test/shared/decode_error.ts b/tooling/noirc_abi_wasm/test/shared/decode_error.ts index 36eb18b5210..662e0acb416 100644 --- a/tooling/noirc_abi_wasm/test/shared/decode_error.ts +++ b/tooling/noirc_abi_wasm/test/shared/decode_error.ts @@ -15,9 +15,7 @@ export const abi: Abi = { visibility: 'private', }, ], - param_witnesses: { foo: [{ start: 1, end: 3 }] }, return_type: null, - return_witnesses: [], error_types: { [FAKE_FIELD_SELECTOR]: { error_kind: 'custom', diff --git a/tooling/noirc_abi_wasm/test/shared/field_as_array.ts b/tooling/noirc_abi_wasm/test/shared/field_as_array.ts index 4e3e2fd12a8..3610c51e6db 100644 --- a/tooling/noirc_abi_wasm/test/shared/field_as_array.ts +++ b/tooling/noirc_abi_wasm/test/shared/field_as_array.ts @@ -8,9 +8,7 @@ export const abi: Abi = { visibility: 'private', }, ], - param_witnesses: { foo: [{ start: 1, end: 3 }] }, return_type: null, - return_witnesses: [], error_types: {}, }; diff --git a/tooling/noirc_abi_wasm/test/shared/structs.ts b/tooling/noirc_abi_wasm/test/shared/structs.ts index ee666e40e87..6d098832b3a 100644 --- a/tooling/noirc_abi_wasm/test/shared/structs.ts +++ b/tooling/noirc_abi_wasm/test/shared/structs.ts @@ -47,13 +47,7 @@ export const abi: Abi = { visibility: 'private', }, ], - param_witnesses: { - struct_arg: [{ start: 1, end: 2 }], - struct_array_arg: [{ start: 2, end: 5 }], - nested_struct_arg: [{ start: 5, end: 6 }], - }, return_type: null, - return_witnesses: [], error_types: {}, }; diff --git a/tooling/noirc_abi_wasm/test/shared/uint_overflow.ts b/tooling/noirc_abi_wasm/test/shared/uint_overflow.ts index 82a3e3998ca..b7f1f221b48 100644 --- a/tooling/noirc_abi_wasm/test/shared/uint_overflow.ts +++ b/tooling/noirc_abi_wasm/test/shared/uint_overflow.ts @@ -8,9 +8,7 @@ export const abi: Abi = { visibility: 'private', }, ], - param_witnesses: { foo: [{ start: 1, end: 2 }] }, return_type: null, - return_witnesses: [], error_types: {}, }; diff --git a/yarn.lock b/yarn.lock index a947ec56aba..181b6b3b206 100644 --- a/yarn.lock +++ b/yarn.lock @@ -221,19 +221,18 @@ __metadata: languageName: node linkType: hard -"@aztec/bb.js@npm:0.41.0": - version: 0.41.0 - resolution: "@aztec/bb.js@npm:0.41.0" +"@aztec/bb.js@portal:../../../../barretenberg/ts::locator=%40noir-lang%2Fbackend_barretenberg%40workspace%3Atooling%2Fnoir_js_backend_barretenberg": + version: 0.0.0-use.local + resolution: "@aztec/bb.js@portal:../../../../barretenberg/ts::locator=%40noir-lang%2Fbackend_barretenberg%40workspace%3Atooling%2Fnoir_js_backend_barretenberg" dependencies: comlink: ^4.4.1 commander: ^10.0.1 debug: ^4.3.4 tslib: ^2.4.0 bin: - bb.js: dest/node/main.js - checksum: e5e0095eaff3de45726366726337b131bb6ff7cf2cb53be705572c7d6715dae4c948bf86a03cfad68bc98c0c2d83e64cbe3723cc72260c8dbfa262af8cb81f9b + bb.js: ./dest/node/main.js languageName: node - linkType: hard + linkType: soft "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.11, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.23.5, @babel/code-frame@npm:^7.8.3": version: 7.23.5 @@ -4396,7 +4395,7 @@ __metadata: version: 0.0.0-use.local resolution: "@noir-lang/backend_barretenberg@workspace:tooling/noir_js_backend_barretenberg" dependencies: - "@aztec/bb.js": 0.41.0 + "@aztec/bb.js": "portal:../../../../barretenberg/ts" "@noir-lang/types": "workspace:*" "@types/node": ^20.6.2 "@types/prettier": ^3