From edbdc4d0e8c2e0939a4817c814b3f6fd44f5c201 Mon Sep 17 00:00:00 2001 From: Oleg Lomaka Date: Thu, 30 May 2024 11:22:09 -0400 Subject: [PATCH] measure time of proof/validate execution --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 065bf09..00c19e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,12 +62,12 @@ jobs: run: | set -x set -e - package/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json - package/bin/verifier testdata/verification_key.json public.json proof.json + time package/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json + time package/bin/verifier testdata/verification_key.json public.json proof.json # make a wrong public.json by decrementing the first element by 1 (value_0=$(jq '.[0]' public.json | tr -d '"') && value_0=$(echo "$value_0 - 1" | BC_LINE_LENGTH=100 bc) && jq --arg value_0 "$value_0" '.[0] = $value_0' public.json) > public_bad.json set +e - package/bin/verifier testdata/verification_key.json public_bad.json proof.json + time package/bin/verifier testdata/verification_key.json public_bad.json proof.json exit_code=$? set -e [ $exit_code -ne 0 ] @@ -174,12 +174,12 @@ jobs: run: | set -x set -e - package_macos_arm64/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json - package_macos_arm64/bin/verifier testdata/verification_key.json public.json proof.json + time package_macos_arm64/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json + time package_macos_arm64/bin/verifier testdata/verification_key.json public.json proof.json # make a wrong public.json by decrementing the first element by 1 (value_0=$(jq '.[0]' public.json | tr -d '"') && value_0=$(echo "$value_0 - 1" | BC_LINE_LENGTH=100 bc) && jq --arg value_0 "$value_0" '.[0] = $value_0' public.json) > public_bad.json set +e - package_macos_arm64/bin/verifier testdata/verification_key.json public_bad.json proof.json + time package_macos_arm64/bin/verifier testdata/verification_key.json public_bad.json proof.json exit_code=$? set -e [ $exit_code -ne 0 ] @@ -276,12 +276,12 @@ jobs: run: | set -x set -e - package_macos_x86_64/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json - package_macos_x86_64/bin/verifier testdata/verification_key.json public.json proof.json + time package_macos_x86_64/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json + time package_macos_x86_64/bin/verifier testdata/verification_key.json public.json proof.json # make a wrong public.json by decrementing the first element by 1 (value_0=$(jq '.[0]' public.json | tr -d '"') && value_0=$(echo "$value_0 - 1" | BC_LINE_LENGTH=100 bc) && jq --arg value_0 "$value_0" '.[0] = $value_0' public.json) > public_bad.json set +e - package_macos_x86_64/bin/verifier testdata/verification_key.json public_bad.json proof.json + time package_macos_x86_64/bin/verifier testdata/verification_key.json public_bad.json proof.json exit_code=$? set -e [ $exit_code -ne 0 ]