arnaucube
arnaucube/circom-compatPublic Self-hosted repository
circom-compat/test-vectors/complex-circuit/build.sh
test-vectors/complex-circuit/build.shRaw
 1NUM_VARIABLES=$1
 2NUM_CONSTRAINTS=$2
 3PTAU_POWER=$(echo "l($NUM_CONSTRAINTS)/l(2)" | bc -l | xargs -I{} awk "BEGIN{printf(\"%.f\n\", {}+0.5)}")
 4
 5export NODE_OPTIONS=--max-old-space-size=8192
 6
 7echo "compiling"
 8circom -f complex-circuit-$NUM_VARIABLES-$NUM_CONSTRAINTS.circom --r1cs --wasm
 9
10echo "zkey"
11snarkjs zkey new complex-circuit-$NUM_VARIABLES-$NUM_CONSTRAINTS.r1cs powersOfTau28_hez_final_$PTAU_POWER.ptau complex-circuit-$NUM_VARIABLES-$NUM_CONSTRAINTS.zkey