From f71424c83816686b5c8acd096e4e2950efc16b4e Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 13 Dec 2023 19:58:35 +0000 Subject: [PATCH] feat: run prove_then_verify_goblin in CI --- barretenberg/acir_tests/Dockerfile.bb | 2 ++ barretenberg/acir_tests/flows/prove_and_verify_goblin.sh | 8 ++++++++ barretenberg/cpp/src/barretenberg/bb/main.cpp | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 barretenberg/acir_tests/flows/prove_and_verify_goblin.sh diff --git a/barretenberg/acir_tests/Dockerfile.bb b/barretenberg/acir_tests/Dockerfile.bb index 7e211d62eca..fb9336d1e91 100644 --- a/barretenberg/acir_tests/Dockerfile.bb +++ b/barretenberg/acir_tests/Dockerfile.bb @@ -10,5 +10,7 @@ COPY . . # Run every acir test through native bb build prove_then_verify flow. # This ensures we test independent pk construction through real/garbage witness data paths. RUN FLOW=prove_then_verify ./run_acir_tests.sh +# Run goblin tests. This will eventually replace e.g. prove_then_verify, see (https://github.com/AztecProtocol/barretenberg/issues/811) +RUN FLOW=prove_and_verify_goblin ./run_acir_tests.sh # Run 1_mul through native bb build, all_cmds flow, to test all cli args. RUN VERBOSE=1 FLOW=all_cmds ./run_acir_tests.sh 1_mul \ No newline at end of file diff --git a/barretenberg/acir_tests/flows/prove_and_verify_goblin.sh b/barretenberg/acir_tests/flows/prove_and_verify_goblin.sh new file mode 100755 index 00000000000..6a75f7dcaea --- /dev/null +++ b/barretenberg/acir_tests/flows/prove_and_verify_goblin.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -eu + +VFLAG=${VERBOSE:+-v} + +# This is the fastest flow, because it only generates pk/vk once, gate count once, etc. +# It may not catch all class of bugs. +$BIN prove_and_verify_goblin $VFLAG -c $CRS_PATH -b ./target/acir.gz \ No newline at end of file diff --git a/barretenberg/cpp/src/barretenberg/bb/main.cpp b/barretenberg/cpp/src/barretenberg/bb/main.cpp index cdb29220124..5392833a6a8 100644 --- a/barretenberg/cpp/src/barretenberg/bb/main.cpp +++ b/barretenberg/cpp/src/barretenberg/bb/main.cpp @@ -453,8 +453,10 @@ int main(int argc, char* argv[]) acvm_info(output_path); return 0; } - if (command == "prove_and_verify") { + return proveAndVerify(bytecode_path, witness_path, recursive) ? 0 : 1; + } + if (command == "prove_and_verify_goblin") { return proveAndVerifyGoblin(bytecode_path, witness_path, recursive) ? 0 : 1; } if (command == "prove") {