arnaucube
arnaucube/circom-compatPublic Self-hosted repository
circom-compat/test-vectors/complex-circuit/bench_all.sh
test-vectors/complex-circuit/bench_all.shRaw
 1MIN_NUM_VARIABLES=$1
 2MAX_NUM_VARIABLES=$2
 3MAX_NUM_CONSTRAINTS=$3
 4
 5for i in `seq 10 19`; do wget https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_$i.ptau; done
 6
 7./prepare.sh $MIN_NUM_VARIABLES $MAX_NUM_VARIABLES $MAX_NUM_CONSTRAINTS
 8
 9for i in `seq $MIN_NUM_VARIABLES $MAX_NUM_VARIABLES`
10do
11  for j in `seq $i $MAX_NUM_CONSTRAINTS`
12  do
13    NUM_VARIABLES=$(echo 10^$i | bc)
14    NUM_CONSTRAINTS=$(echo 10^$j | bc)
15    echo "**** START benchmarking $NUM_VARIABLES $NUM_CONSTRAINTS ****"
16    ./prove.sh $NUM_VARIABLES $NUM_CONSTRAINTS
17    perf stat -r5 rapidsnark complex-circuit-$NUM_VARIABLES-$NUM_CONSTRAINTS.zkey witness.wtns proof.json public.json
18    echo "**** END benchmarking $NUM_VARIABLES $NUM_CONSTRAINTS ****"
19  done
20done