Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion barretenberg/acir_tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ crs
**/.yarn/*
!**/.yarn/releases
*.jsonl
bench-out
bench-out
internal_test_programs/*/target
9 changes: 5 additions & 4 deletions barretenberg/acir_tests/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@ function build {
cp -R ../../noir/noir-repo/test_programs/execution_success acir_tests
# Running these requires extra gluecode so they're skipped.
rm -rf acir_tests/{diamond_deps_0,workspace,workspace_default_member,regression_7323}
# Don't compile these until we generate their inputs
rm -rf acir_tests/{verify_honk_proof,double_verify_honk_proof,verify_rollup_honk_proof}

# COMPILE=2 only compiles the test.
denoise "parallel --joblog joblog.txt --line-buffered 'COMPILE=2 ./run_test.sh \$(basename {})' ::: ./acir_tests/*"

cp -R ../../noir/noir-repo/test_programs/execution_success/{verify_honk_proof,double_verify_honk_proof,verify_rollup_honk_proof} acir_tests
cp -R ./internal_test_programs/* acir_tests
echo "Regenerating verify_honk_proof, double_verify_honk_proof, verify_rollup_honk_proof recursive inputs."
local bb=$(realpath ../cpp/build/bin/bb)
cd ./acir_tests/assert_statement
Expand All @@ -90,7 +88,10 @@ function build {
done
cd ../..

denoise "parallel --joblog joblog.txt --line-buffered 'COMPILE=2 ./run_test.sh \$(basename {})' ::: ./acir_tests/{verify_honk_proof,double_verify_honk_proof,verify_rollup_honk_proof}"

local internal_tests=($(ls -d internal_test_programs/* | xargs -n1 basename))
local internal_tests_string=$(echo ${internal_tests[@]} | awk -v OFS="," '{$1=$1;print}')
denoise "parallel --joblog joblog.txt --line-buffered 'COMPILE=2 ./run_test.sh \$(basename {})' ::: ./acir_tests/{$internal_tests_string}"

cache_upload $tests_tar acir_tests
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "double_verify_honk_proof"
type = "bin"
authors = [""]

[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This circuit aggregates two Honk proof from `assert_statement`.
global SIZE_OF_PROOF_IF_LOGN_IS_28: u32 = 456;
global HONK_IDENTIFIER: u32 = 1;
fn main(
verification_key: [Field; 128],
// 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; SIZE_OF_PROOF_IF_LOGN_IS_28],
public_inputs: pub [Field; 1],
key_hash: Field,
// The second proof, currently set to be identical
proof_b: [Field; SIZE_OF_PROOF_IF_LOGN_IS_28],
) {
std::verify_proof_with_type(
verification_key,
proof,
public_inputs,
key_hash,
HONK_IDENTIFIER,
);
std::verify_proof_with_type(
verification_key,
proof_b,
public_inputs,
key_hash,
HONK_IDENTIFIER,
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "verify_honk_proof"
type = "bin"
authors = [""]

[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// This circuit aggregates a single Honk proof from `assert_statement`.
global SIZE_OF_PROOF_IF_LOGN_IS_28: u32 = 456;
global HONK_IDENTIFIER: u32 = 1;
fn main(
verification_key: [Field; 128],
// 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; SIZE_OF_PROOF_IF_LOGN_IS_28],
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_with_type(
verification_key,
proof,
public_inputs,
key_hash,
HONK_IDENTIFIER,
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "verify_rollup_honk_proof"
type = "bin"
authors = [""]

[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// This circuit aggregates a single Honk proof from `assert_statement`.
global SIZE_OF_PROOF_IF_LOGN_IS_28: u32 = 466 + 69;
global ROLLUP_HONK_IDENTIFIER: u32 = 5;
fn main(
verification_key: [Field; 139],
// 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; SIZE_OF_PROOF_IF_LOGN_IS_28],
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_with_type(
verification_key,
proof,
public_inputs,
key_hash,
ROLLUP_HONK_IDENTIFIER,
);
}
241 changes: 183 additions & 58 deletions noir/noir-repo.patch

Large diffs are not rendered by default.