From c76c4a69cb15d0834e353363025e2214a2e386d5 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:36:07 +0000 Subject: [PATCH] git subrepo pull --force --branch=master noir/noir-repo subrepo: subdir: "noir/noir-repo" merged: "bdb2bc608e" upstream: origin: "https://github.com/noir-lang/noir" branch: "master" commit: "bdb2bc608e" git-subrepo: version: "0.4.6" origin: "???" commit: "???" --- noir/noir-repo/.gitrepo | 6 +- .../noir-repo/acvm-repo/brillig_vm/src/lib.rs | 108 ++++++++++-------- .../aztec_macros/src/transforms/functions.rs | 34 ++---- noir/noir-repo/examples/recursion/.gitignore | 2 - noir/noir-repo/examples/recursion/Nargo.toml | 2 - .../recursion/generate_recursive_proof.sh | 61 ---------- .../recursion/recurse_leaf/Nargo.toml | 7 -- .../recursion/recurse_leaf/src/main.nr | 20 ---- .../recursion/recurse_node/Nargo.toml | 7 -- .../recursion/recurse_node/src/main.nr | 17 --- .../examples/recursion/sum/Nargo.toml | 7 -- .../examples/recursion/sum/Prover.toml | 2 - .../examples/recursion/sum/src/main.nr | 4 - noir/noir-repo/examples/recursion/test.sh | 8 -- .../verify_honk_proof/Nargo.toml | 7 -- .../verify_honk_proof/Prover.toml | 4 - .../verify_honk_proof/src/main.nr | 21 ---- .../noir-repo/tooling/debugger/src/context.rs | 4 +- .../src/backend.ts | 5 +- 19 files changed, 78 insertions(+), 248 deletions(-) delete mode 100644 noir/noir-repo/examples/recursion/.gitignore delete mode 100644 noir/noir-repo/examples/recursion/Nargo.toml delete mode 100755 noir/noir-repo/examples/recursion/generate_recursive_proof.sh delete mode 100644 noir/noir-repo/examples/recursion/recurse_leaf/Nargo.toml delete mode 100644 noir/noir-repo/examples/recursion/recurse_leaf/src/main.nr delete mode 100644 noir/noir-repo/examples/recursion/recurse_node/Nargo.toml delete mode 100644 noir/noir-repo/examples/recursion/recurse_node/src/main.nr delete mode 100644 noir/noir-repo/examples/recursion/sum/Nargo.toml delete mode 100644 noir/noir-repo/examples/recursion/sum/Prover.toml delete mode 100644 noir/noir-repo/examples/recursion/sum/src/main.nr delete mode 100755 noir/noir-repo/examples/recursion/test.sh delete mode 100644 noir/noir-repo/test_programs/execution_success/verify_honk_proof/Nargo.toml delete mode 100644 noir/noir-repo/test_programs/execution_success/verify_honk_proof/Prover.toml delete mode 100644 noir/noir-repo/test_programs/execution_success/verify_honk_proof/src/main.nr diff --git a/noir/noir-repo/.gitrepo b/noir/noir-repo/.gitrepo index 2d3d9cccb48..8ffe6446266 100644 --- a/noir/noir-repo/.gitrepo +++ b/noir/noir-repo/.gitrepo @@ -5,8 +5,8 @@ ; [subrepo] remote = https://github.com/noir-lang/noir - branch = md/restrict-bitsize-to-u32 - commit = fae3be52223699ba7ccb0e1368db263ac2b091ed - parent = 9f5b11345dc5dd055442eaf7673227fe7cbaf262 + branch = master + commit = bdb2bc608ea8fd52d46545a38b68dd2558b28110 + parent = 5a10672830155bf03a210972c22c314a28086a0e method = merge cmdver = 0.4.6 diff --git a/noir/noir-repo/acvm-repo/brillig_vm/src/lib.rs b/noir/noir-repo/acvm-repo/brillig_vm/src/lib.rs index 1865f2df998..da9a34f1044 100644 --- a/noir/noir-repo/acvm-repo/brillig_vm/src/lib.rs +++ b/noir/noir-repo/acvm-repo/brillig_vm/src/lib.rs @@ -468,7 +468,7 @@ impl<'a, F: AcirField, B: BlackBoxFunctionSolver> VM<'a, F, B> { destination_value_types: &[HeapValueType], foreign_call_index: usize, ) -> Result<(), String> { - let values = &self.foreign_call_results[foreign_call_index].values; + let values = std::mem::take(&mut self.foreign_call_results[foreign_call_index].values); if destinations.len() != values.len() { return Err(format!( @@ -479,22 +479,13 @@ impl<'a, F: AcirField, B: BlackBoxFunctionSolver> VM<'a, F, B> { } for ((destination, value_type), output) in - destinations.iter().zip(destination_value_types).zip(values) + destinations.iter().zip(destination_value_types).zip(&values) { match (destination, value_type) { (ValueOrArray::MemoryAddress(value_index), HeapValueType::Simple(bit_size)) => { match output { ForeignCallParam::Single(value) => { - let memory_value = MemoryValue::new_checked(*value, *bit_size); - if let Some(memory_value) = memory_value { - self.memory.write(*value_index, memory_value); - } else { - return Err(format!( - "Foreign call result value {} does not fit in bit size {}", - value, - bit_size - )); - } + self.write_value_to_memory(*value_index, value, *bit_size)?; } _ => return Err(format!( "Function result size does not match brillig bytecode. Expected 1 result but got {output:?}") @@ -506,28 +497,12 @@ impl<'a, F: AcirField, B: BlackBoxFunctionSolver> VM<'a, F, B> { HeapValueType::Array { value_types, size: type_size }, ) if size == type_size => { if HeapValueType::all_simple(value_types) { - let bit_sizes_iterator = value_types.iter().map(|typ| match typ { - HeapValueType::Simple(bit_size) => *bit_size, - _ => unreachable!("Expected simple value type"), - }).cycle(); - match output { + match output { ForeignCallParam::Array(values) => { if values.len() != *size { return Err("Foreign call result array doesn't match expected size".to_string()); } - // Convert the destination pointer to a usize - let destination = self.memory.read_ref(*pointer_index); - // Write to our destination memory - let memory_values: Option> = values.iter().zip(bit_sizes_iterator).map( - |(value, bit_size)| MemoryValue::new_checked(*value, bit_size)).collect(); - if let Some(memory_values) = memory_values { - self.memory.write_slice(destination, &memory_values); - } else { - return Err(format!( - "Foreign call result values {:?} do not match expected bit sizes", - values, - )); - } + self.write_values_to_memory_slice(*pointer_index, values, value_types)?; } _ => { return Err("Function result size does not match brillig bytecode size".to_string()); @@ -542,26 +517,12 @@ impl<'a, F: AcirField, B: BlackBoxFunctionSolver> VM<'a, F, B> { HeapValueType::Vector { value_types }, ) => { if HeapValueType::all_simple(value_types) { - let bit_sizes_iterator = value_types.iter().map(|typ| match typ { - HeapValueType::Simple(bit_size) => *bit_size, - _ => unreachable!("Expected simple value type"), - }).cycle(); match output { ForeignCallParam::Array(values) => { // Set our size in the size address self.memory.write(*size_index, values.len().into()); - // Convert the destination pointer to a usize - let destination = self.memory.read_ref(*pointer_index); - // Write to our destination memory - let memory_values: Option> = values.iter().zip(bit_sizes_iterator).map(|(value, bit_size)| MemoryValue::new_checked(*value, bit_size)).collect(); - if let Some(memory_values) = memory_values { - self.memory.write_slice(destination, &memory_values); - }else{ - return Err(format!( - "Foreign call result values {:?} do not match expected bit sizes", - values, - )); - } + + self.write_values_to_memory_slice(*pointer_index, values, value_types)?; } _ => { return Err("Function result size does not match brillig bytecode size".to_string()); @@ -577,6 +538,61 @@ impl<'a, F: AcirField, B: BlackBoxFunctionSolver> VM<'a, F, B> { } } + let _ = + std::mem::replace(&mut self.foreign_call_results[foreign_call_index].values, values); + + Ok(()) + } + + fn write_value_to_memory( + &mut self, + destination: MemoryAddress, + value: &F, + value_bit_size: u32, + ) -> Result<(), String> { + let memory_value = MemoryValue::new_checked(*value, value_bit_size); + + if let Some(memory_value) = memory_value { + self.memory.write(destination, memory_value); + } else { + return Err(format!( + "Foreign call result value {} does not fit in bit size {}", + value, value_bit_size + )); + } + Ok(()) + } + + fn write_values_to_memory_slice( + &mut self, + pointer_index: MemoryAddress, + values: &[F], + value_types: &[HeapValueType], + ) -> Result<(), String> { + let bit_sizes_iterator = value_types + .iter() + .map(|typ| match typ { + HeapValueType::Simple(bit_size) => *bit_size, + _ => unreachable!("Expected simple value type"), + }) + .cycle(); + + // Convert the destination pointer to a usize + let destination = self.memory.read_ref(pointer_index); + // Write to our destination memory + let memory_values: Option> = values + .iter() + .zip(bit_sizes_iterator) + .map(|(value, bit_size)| MemoryValue::new_checked(*value, bit_size)) + .collect(); + if let Some(memory_values) = memory_values { + self.memory.write_slice(destination, &memory_values); + } else { + return Err(format!( + "Foreign call result values {:?} do not match expected bit sizes", + values, + )); + } Ok(()) } diff --git a/noir/noir-repo/aztec_macros/src/transforms/functions.rs b/noir/noir-repo/aztec_macros/src/transforms/functions.rs index 4d8b6ef7cdf..0fb13975fec 100644 --- a/noir/noir-repo/aztec_macros/src/transforms/functions.rs +++ b/noir/noir-repo/aztec_macros/src/transforms/functions.rs @@ -216,30 +216,12 @@ pub fn export_fn_abi( /// /// Inserts the following code at the beginning of an unconstrained function /// ```noir -/// let context = UnconstrainedContext::new(); -/// let storage = Storage::init(context); +/// let storage = Storage::init(Context::none()); /// ``` /// /// This will allow developers to access their contract' storage struct in unconstrained functions pub fn transform_unconstrained(func: &mut NoirFunction, storage_struct_name: String) { - // let context = UnconstrainedContext::new(); - let let_context = assignment( - "context", // Assigned to - call( - variable_path(chained_dep!( - "aztec", - "context", - "unconstrained_context", - "UnconstrainedContext", - "new" - )), - vec![], - ), - ); - - // We inject the statements at the beginning, in reverse order. func.def.body.statements.insert(0, abstract_storage(storage_struct_name, true)); - func.def.body.statements.insert(0, let_context); } /// Helper function that returns what the private context would look like in the ast @@ -615,7 +597,7 @@ fn abstract_return_values(func: &NoirFunction) -> Result>, /// ```noir /// #[aztec(private)] /// fn lol() { -/// let storage = Storage::init(&mut context); +/// let storage = Storage::init(context); /// } /// ``` /// @@ -623,18 +605,22 @@ fn abstract_return_values(func: &NoirFunction) -> Result>, /// ```noir /// #[aztec(public)] /// fn lol() { -/// let storage = Storage::init(&mut context); +/// let storage = Storage::init(context); /// } /// ``` /// /// For unconstrained functions: /// ```noir /// unconstrained fn lol() { -/// let storage = Storage::init(context); +/// let storage = Storage::init(()); /// } fn abstract_storage(storage_struct_name: String, unconstrained: bool) -> Statement { - let context_expr = - if unconstrained { variable("context") } else { mutable_reference("context") }; + let context_expr = if unconstrained { + // Note that the literal unit type (i.e. '()') is not the same as a tuple with zero elements + expression(ExpressionKind::Literal(Literal::Unit)) + } else { + mutable_reference("context") + }; assignment( "storage", // Assigned to diff --git a/noir/noir-repo/examples/recursion/.gitignore b/noir/noir-repo/examples/recursion/.gitignore deleted file mode 100644 index 12587094b0f..00000000000 --- a/noir/noir-repo/examples/recursion/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -recurse_leaf/Prover.toml -recurse_node/Prover.toml \ No newline at end of file diff --git a/noir/noir-repo/examples/recursion/Nargo.toml b/noir/noir-repo/examples/recursion/Nargo.toml deleted file mode 100644 index 7c7a8b1926f..00000000000 --- a/noir/noir-repo/examples/recursion/Nargo.toml +++ /dev/null @@ -1,2 +0,0 @@ -[workspace] -members = ["recurse_leaf", "recurse_node", "sum"] diff --git a/noir/noir-repo/examples/recursion/generate_recursive_proof.sh b/noir/noir-repo/examples/recursion/generate_recursive_proof.sh deleted file mode 100755 index 362512529d4..00000000000 --- a/noir/noir-repo/examples/recursion/generate_recursive_proof.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -set -eu - -BACKEND=${BACKEND:-bb} - -nargo execute sum_witness --package sum -$BACKEND prove -b ./target/sum.json -w ./target/sum_witness.gz -o ./target/sum_proof - -# Once we have generated our inner proof, we must use this to generate inputs to `recurse_leaf`` - -$BACKEND write_vk -b ./target/sum.json -o ./target/sum_key -$BACKEND vk_as_fields -k ./target/sum_key -o ./target/sum_vk_as_fields -VK_HASH=$(jq -r '.[0]' ./target/sum_vk_as_fields) -VK_AS_FIELDS=$(jq -r '.[1:]' ./target/sum_vk_as_fields) - -FULL_PROOF_AS_FIELDS="$($BACKEND proof_as_fields -p ./target/sum_proof -k ./target/sum_key -o -)" -# sum has 3 public inputs -PUBLIC_INPUTS=$(echo $FULL_PROOF_AS_FIELDS | jq -r '.[:3]') -PROOF_AS_FIELDS=$(echo $FULL_PROOF_AS_FIELDS | jq -r '.[3:]') - -RECURSE_LEAF_PROVER_TOML=./recurse_leaf/Prover.toml -echo "num = 2" > $RECURSE_LEAF_PROVER_TOML -echo "key_hash = \"$VK_HASH\"" >> $RECURSE_LEAF_PROVER_TOML -echo "verification_key = $VK_AS_FIELDS" >> $RECURSE_LEAF_PROVER_TOML -echo "proof = $PROOF_AS_FIELDS" >> $RECURSE_LEAF_PROVER_TOML -echo "public_inputs = $PUBLIC_INPUTS" >> $RECURSE_LEAF_PROVER_TOML - -# We can now execute and prove `recurse_leaf` - -nargo execute recurse_leaf_witness --package recurse_leaf -$BACKEND prove -b ./target/recurse_leaf.json -w ./target/recurse_leaf_witness.gz -o ./target/recurse_leaf_proof - -# Let's do a sanity check that the proof we've generated so far is valid. -$BACKEND write_vk -b ./target/recurse_leaf.json -o ./target/recurse_leaf_key -$BACKEND verify -p ./target/recurse_leaf_proof -k ./target/recurse_leaf_key - -# Now we generate the final `recurse_node` proof similarly to how we did for `recurse_leaf`. - -$BACKEND vk_as_fields -k ./target/recurse_leaf_key -o ./target/recurse_leaf_vk_as_fields -VK_HASH=$(jq -r '.[0]' ./target/recurse_leaf_vk_as_fields) -VK_AS_FIELDS=$(jq -r '.[1:]' ./target/recurse_leaf_vk_as_fields) - -FULL_PROOF_AS_FIELDS="$($BACKEND proof_as_fields -p ./target/recurse_leaf_proof -k ./target/recurse_leaf_key -o -)" -# recurse_leaf has 4 public inputs (excluding aggregation object) -PUBLIC_INPUTS=$(echo $FULL_PROOF_AS_FIELDS | jq -r '.[:4]') -PROOF_AS_FIELDS=$(echo $FULL_PROOF_AS_FIELDS | jq -r '.[4:]') - -RECURSE_NODE_PROVER_TOML=./recurse_node/Prover.toml -echo "key_hash = \"$VK_HASH\"" > $RECURSE_NODE_PROVER_TOML -echo "verification_key = $VK_AS_FIELDS" >> $RECURSE_NODE_PROVER_TOML -echo "proof = $PROOF_AS_FIELDS" >> $RECURSE_NODE_PROVER_TOML -echo "public_inputs = $PUBLIC_INPUTS" >> $RECURSE_NODE_PROVER_TOML - -# We can now execute and prove `recurse_node` - -nargo execute recurse_node_witness --package recurse_node -$BACKEND prove -b ./target/recurse_node.json -w ./target/recurse_node_witness.gz -o ./target/recurse_node_proof - -# We finally verify that the generated recursive proof is valid. -$BACKEND write_vk -b ./target/recurse_node.json -o ./target/recurse_node_key -$BACKEND verify -p ./target/recurse_node_proof -k ./target/recurse_node_key diff --git a/noir/noir-repo/examples/recursion/recurse_leaf/Nargo.toml b/noir/noir-repo/examples/recursion/recurse_leaf/Nargo.toml deleted file mode 100644 index 7af9cd74940..00000000000 --- a/noir/noir-repo/examples/recursion/recurse_leaf/Nargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "recurse_leaf" -type = "bin" -authors = [""] -compiler_version = ">=0.26.0" - -[dependencies] \ No newline at end of file diff --git a/noir/noir-repo/examples/recursion/recurse_leaf/src/main.nr b/noir/noir-repo/examples/recursion/recurse_leaf/src/main.nr deleted file mode 100644 index b6a2b49b219..00000000000 --- a/noir/noir-repo/examples/recursion/recurse_leaf/src/main.nr +++ /dev/null @@ -1,20 +0,0 @@ -use dep::std; - -#[recursive] -fn main( - verification_key: [Field; 114], - public_inputs: pub [Field; 3], - key_hash: Field, - proof: [Field; 93], - num: u64 -) -> pub u64 { - // verify sum so far was computed correctly - std::verify_proof( - verification_key.as_slice(), - proof.as_slice(), - public_inputs.as_slice(), - key_hash - ); - // Take output of previous proof and add another number to it. - public_inputs[2] as u64 + num -} \ No newline at end of file diff --git a/noir/noir-repo/examples/recursion/recurse_node/Nargo.toml b/noir/noir-repo/examples/recursion/recurse_node/Nargo.toml deleted file mode 100644 index db4b3b77693..00000000000 --- a/noir/noir-repo/examples/recursion/recurse_node/Nargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "recurse_node" -type = "bin" -authors = [""] -compiler_version = ">=0.26.0" - -[dependencies] \ No newline at end of file diff --git a/noir/noir-repo/examples/recursion/recurse_node/src/main.nr b/noir/noir-repo/examples/recursion/recurse_node/src/main.nr deleted file mode 100644 index 7c983dcf050..00000000000 --- a/noir/noir-repo/examples/recursion/recurse_node/src/main.nr +++ /dev/null @@ -1,17 +0,0 @@ -use dep::std; - -fn main( - verification_key: [Field; 114], - public_inputs: pub [Field; 4], - key_hash: Field, - proof: [Field; 109] -) -> pub u64 { - // verify sum was computed correctly - std::verify_proof( - verification_key.as_slice(), - proof.as_slice(), - public_inputs.as_slice(), - key_hash - ); - public_inputs[3] as u64 -} \ No newline at end of file diff --git a/noir/noir-repo/examples/recursion/sum/Nargo.toml b/noir/noir-repo/examples/recursion/sum/Nargo.toml deleted file mode 100644 index 7a5f1498c3e..00000000000 --- a/noir/noir-repo/examples/recursion/sum/Nargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "sum" -type = "bin" -authors = [""] -compiler_version = ">=0.26.0" - -[dependencies] \ No newline at end of file diff --git a/noir/noir-repo/examples/recursion/sum/Prover.toml b/noir/noir-repo/examples/recursion/sum/Prover.toml deleted file mode 100644 index eae66cb8593..00000000000 --- a/noir/noir-repo/examples/recursion/sum/Prover.toml +++ /dev/null @@ -1,2 +0,0 @@ -a = 1 -b = 2 \ No newline at end of file diff --git a/noir/noir-repo/examples/recursion/sum/src/main.nr b/noir/noir-repo/examples/recursion/sum/src/main.nr deleted file mode 100644 index 722d941d57d..00000000000 --- a/noir/noir-repo/examples/recursion/sum/src/main.nr +++ /dev/null @@ -1,4 +0,0 @@ -#[recursive] -fn main(a: pub u64, b: pub u64) -> pub u64 { - a + b -} \ No newline at end of file diff --git a/noir/noir-repo/examples/recursion/test.sh b/noir/noir-repo/examples/recursion/test.sh deleted file mode 100755 index 1e9eca35cab..00000000000 --- a/noir/noir-repo/examples/recursion/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -eu - -# This file is used for Noir CI and is not required. - -BACKEND=${BACKEND:-bb} - -./generate_recursive_proof.sh \ No newline at end of file diff --git a/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Nargo.toml b/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Nargo.toml deleted file mode 100644 index 1cb4e38f47f..00000000000 --- a/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Nargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "verify_honk_proof" -type = "bin" -authors = [""] -compiler_version = ">=0.29.0" - -[dependencies] \ No newline at end of file diff --git a/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Prover.toml b/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Prover.toml deleted file mode 100644 index 1ebc77c5a5f..00000000000 --- a/noir/noir-repo/test_programs/execution_success/verify_honk_proof/Prover.toml +++ /dev/null @@ -1,4 +0,0 @@ -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/noir/noir-repo/test_programs/execution_success/verify_honk_proof/src/main.nr b/noir/noir-repo/test_programs/execution_success/verify_honk_proof/src/main.nr deleted file mode 100644 index d25fd804ce4..00000000000 --- a/noir/noir-repo/test_programs/execution_success/verify_honk_proof/src/main.nr +++ /dev/null @@ -1,21 +0,0 @@ -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/noir/noir-repo/tooling/debugger/src/context.rs b/noir/noir-repo/tooling/debugger/src/context.rs index 2f0f1c5bcfb..9dc5c758c6f 100644 --- a/noir/noir-repo/tooling/debugger/src/context.rs +++ b/noir/noir-repo/tooling/debugger/src/context.rs @@ -296,7 +296,7 @@ impl<'a, B: BlackBoxFunctionSolver> DebugContext<'a, B> { self.handle_foreign_call(foreign_call) } Err(err) => DebugCommandResult::Error(NargoError::ExecutionError( - // TODO: debugger does not handle multiple acir calls + // TODO: debugger does not not handle multiple acir calls ExecutionError::SolvingError(err, None), )), } @@ -340,7 +340,7 @@ impl<'a, B: BlackBoxFunctionSolver> DebugContext<'a, B> { } } ACVMStatus::Failure(error) => DebugCommandResult::Error(NargoError::ExecutionError( - // TODO: debugger does not handle multiple acir calls + // TODO: debugger does not not handle multiple acir calls ExecutionError::SolvingError(error, None), )), ACVMStatus::RequiresForeignCall(_) => { diff --git a/noir/noir-repo/tooling/noir_js_backend_barretenberg/src/backend.ts b/noir/noir-repo/tooling/noir_js_backend_barretenberg/src/backend.ts index ce2c2712491..d07681dd8c1 100644 --- a/noir/noir-repo/tooling/noir_js_backend_barretenberg/src/backend.ts +++ b/noir/noir-repo/tooling/noir_js_backend_barretenberg/src/backend.ts @@ -45,10 +45,7 @@ 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, - /*honkRecursion=*/ false, // TODO(https://github.com/AztecProtocol/barretenberg/issues/1013): Remove this flag - ); + const [_exact, _total, subgroupSize] = await api.acirGetCircuitSizes(this.acirUncompressedBytecode); const crs = await Crs.new(subgroupSize + 1); await api.commonInitSlabAllocator(subgroupSize); await api.srsInitSrs(new RawBuffer(crs.getG1Data()), crs.numPoints, new RawBuffer(crs.getG2Data()));