Georgios Konstantopoulos bb0f5429fc
feat: benchmarks (#3)
* add benchmark

* chore: add complex circuit

* feat: enable parallel / asm

* bench: use pre-calculated matrices/constraints

* chore: bump ethers-rs

* chore: fmt

* feat: add benches for differently sized circuits (#6)

* feat: update bench circuit

* feat: add benches for many sizes

* fix: adjust bench parameters

* fix: remove sym

* chore: fmt

* fix: point to correct commit of groth16

* fix: update function names to upstream

* fix: update function names to upstream

Co-authored-by: Kobi Gurkan <kobigurk@gmail.com>
2021-09-08 21:52:17 +03:00

21 lines
747 B
Bash
Executable File

MIN_NUM_VARIABLES=$1
MAX_NUM_VARIABLES=$2
MAX_NUM_CONSTRAINTS=$3
for i in `seq 10 19`; do wget https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_$i.ptau; done
./prepare.sh $MIN_NUM_VARIABLES $MAX_NUM_VARIABLES $MAX_NUM_CONSTRAINTS
for i in `seq $MIN_NUM_VARIABLES $MAX_NUM_VARIABLES`
do
for j in `seq $i $MAX_NUM_CONSTRAINTS`
do
NUM_VARIABLES=$(echo 10^$i | bc)
NUM_CONSTRAINTS=$(echo 10^$j | bc)
echo "**** START benchmarking $NUM_VARIABLES $NUM_CONSTRAINTS ****"
./prove.sh $NUM_VARIABLES $NUM_CONSTRAINTS
perf stat -r5 rapidsnark complex-circuit-$NUM_VARIABLES-$NUM_CONSTRAINTS.zkey witness.wtns proof.json public.json
echo "**** END benchmarking $NUM_VARIABLES $NUM_CONSTRAINTS ****"
done
done