21 lines
543 B
Bash
Raw Normal View History

#!/bin/bash
2023-11-28 18:50:11 +01:00
# if [ -z ${ZKBENCH_WHICH} ]; then
# ZKBENCH_WHICH="hash_sponge_rate1"
# fi
2023-10-17 14:15:13 +02:00
ORIG=`pwd`
ROOT="${ORIG}/../../../../"
cd build
echo "circuit-specific ceremony..."
2023-11-28 18:50:11 +01:00
NAME="hash"
snarkjs groth16 setup ${NAME}.r1cs ${ROOT}/ceremony/ceremony.ptau ${NAME}_0000.zkey
echo "some_entropy" | snarkjs zkey contribute ${NAME}_0000.zkey ${NAME}_0001.zkey --name="1st Contributor Name"
rm ${NAME}_0000.zkey
mv ${NAME}_0001.zkey ${NAME}_prover.zkey
snarkjs zkey export verificationkey ${NAME}_prover.zkey ${NAME}_verification_key.json
cd $ORIG