diff --git a/circuits/scripts/build_register_circuits.sh b/circuits/scripts/build_register_circuits.sh deleted file mode 100755 index 80ea0fa5..00000000 --- a/circuits/scripts/build_register_circuits.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -source "scripts/download_ptau.sh" - -build_circuit() { - local CIRCUIT_NAME=$1 - local CIRCUIT_TYPE=$2 - local START_TIME=$(date +%s) - - echo "compiling circuit: $CIRCUIT_NAME" - circom circuits/${CIRCUIT_TYPE}/instances/${CIRCUIT_NAME}.circom -l node_modules -l ./node_modules/@zk-kit/binary-merkle-root.circom/src -l ./node_modules/circomlib/circuits --r1cs --O1 --wasm -c --output build - - echo "building zkey" - yarn snarkjs groth16 setup build/${CIRCUIT_NAME}.r1cs build/powersOfTau28_hez_final_20.ptau build/${CIRCUIT_NAME}.zkey - - echo "building vkey" - yarn snarkjs zkey contribute build/${CIRCUIT_NAME}.zkey build/${CIRCUIT_NAME}_final.zkey -e="random text" - yarn snarkjs zkey export verificationkey build/${CIRCUIT_NAME}_final.zkey build/${CIRCUIT_NAME}_vkey.json - - yarn snarkjs zkey export solidityverifier build/${CIRCUIT_NAME}_final.zkey build/Verifier_${CIRCUIT_NAME}.sol - sed -i '' "s/Groth16Verifier/Verifier_${CIRCUIT_NAME}/g" build/Verifier_${CIRCUIT_NAME}.sol - cp build/Verifier_${CIRCUIT_NAME}.sol ../contracts/contracts/Verifier_${CIRCUIT_NAME}.sol - echo "copied Verifier_${CIRCUIT_NAME}.sol to contracts" - - echo "Build of $CIRCUIT_NAME completed in $(($(date +%s) - START_TIME)) seconds" - echo "Size of ${CIRCUIT_NAME}.r1cs: $(wc -c