From 7de19f5856591203271836f07154abae13f5102b Mon Sep 17 00:00:00 2001 From: Aztec Bot <49558828+AztecBot@users.noreply.github.com> Date: Mon, 17 Jun 2024 13:31:28 -0400 Subject: [PATCH] feat: Sync from aztec-packages (#5242) Automated pull of Noir development from [aztec-packages](https://github.com/AztecProtocol/aztec-packages). BEGIN_COMMIT_OVERRIDE feat: Sync from noir (https://github.com/AztecProtocol/aztec-packages/pull/6986) feat: `pxe.addNullifiedNote(...)` (https://github.com/AztecProtocol/aztec-packages/pull/6948) 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 +- 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 ++++++------- .../src/hir/comptime/interpreter.rs | 15 ++++-- .../noirc_frontend/src/hir/comptime/scan.rs | 1 - compiler/noirc_frontend/src/hir_def/types.rs | 4 ++ .../benchmarks/bench_sha256/Nargo.toml | 7 --- .../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 - 17 files changed, 67 insertions(+), 82 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 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/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/hir/comptime/interpreter.rs b/compiler/noirc_frontend/src/hir/comptime/interpreter.rs index 8cb0db3ee55..3648881e501 100644 --- a/compiler/noirc_frontend/src/hir/comptime/interpreter.rs +++ b/compiler/noirc_frontend/src/hir/comptime/interpreter.rs @@ -154,8 +154,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) } @@ -210,10 +210,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(|| { @@ -239,7 +240,9 @@ impl<'a> Interpreter<'a> { value, location, }), - } + }; + self.pop_scope(); + res } } } @@ -358,13 +361,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) } } @@ -1296,6 +1300,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..f2e21e608ea 100644 --- a/compiler/noirc_frontend/src/hir/comptime/scan.rs +++ b/compiler/noirc_frontend/src/hir/comptime/scan.rs @@ -59,7 +59,6 @@ impl<'interner> Interpreter<'interner> { self.scan_expression(let_.expression)?; } } - Ok(()) } diff --git a/compiler/noirc_frontend/src/hir_def/types.rs b/compiler/noirc_frontend/src/hir_def/types.rs index f5c90b33c11..a90bd931496 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/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/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: {}, };