Skip to content

Commit

Permalink
measure time of proof/validate execution (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
olomix authored May 30, 2024
1 parent 1d90588 commit 13a2062
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down Expand Up @@ -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 ]
Expand Down Expand Up @@ -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 ]
Expand Down

0 comments on commit 13a2062

Please sign in to comment.