2023-11-28 18:50:11 +01:00

21 lines
543 B
Bash
Executable File

#!/bin/bash
# if [ -z ${ZKBENCH_WHICH} ]; then
# ZKBENCH_WHICH="hash_sponge_rate1"
# fi
ORIG=`pwd`
ROOT="${ORIG}/../../../../"
cd build
echo "circuit-specific ceremony..."
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