diff --git a/workflow/README.md b/workflow/README.md index 321e8b4..ac2b623 100644 --- a/workflow/README.md +++ b/workflow/README.md @@ -72,16 +72,13 @@ Build the Nim cli proof input generator: ### Powers of tau setup -Either download a ready-to-use "powers of tau" setup file (section 7), or generate one -youself using `snarkjs` (sections 1..7), see the README here: +To fetch the ptau file, you have next few options: -Size `2^21` (file size about 2GB) should be big enough: +1. Run the `ptau.sh` script inside the `workflow` folder. (You can modify the power of ptau inside `./params.sh` file on `PTAU_POWER` variable) - $ cd .. - $ mkdir -p ceremony - $ cd ceremony - $ wget https://storage.googleapis.com/zkevm/ptau/powersOfTau28_hez_final_21.ptau - $ cd ../workflow +2. Manually download a ready-to-use "powers of tau" setup file (section 7), or generate one + youself using `snarkjs` (sections 1..7), see the README here: + Size `2^21` (file size about 2GB) should be big enough: Note: generating this yourself will probably take quite a long time. diff --git a/workflow/params.sh b/workflow/params.sh index 94ac2c4..61720fa 100644 --- a/workflow/params.sh +++ b/workflow/params.sh @@ -13,3 +13,4 @@ NSLOTS=11 # number of slots in the dataset SLOTINDEX=3 # which slot we prove (0..NSLOTS-1) NCELLS=512 # number of cells in this slot +PTAU_POWER=21 \ No newline at end of file diff --git a/workflow/paths.sh b/workflow/paths.sh index c01e566..9832fe0 100644 --- a/workflow/paths.sh +++ b/workflow/paths.sh @@ -2,6 +2,8 @@ ORIG=`pwd` +source ./params.sh + NIMCLI_DIR="${ORIG}/../reference/nim/proof_input/" PTAU_DIR="${ORIG}/../ceremony" @@ -10,7 +12,7 @@ CIRCUIT_PRF_DIR="${CIRCUIT_ROOT}/codex/" CIRCUIT_POS_DIR="${CIRCUIT_ROOT}/poseidon2/" CIRCUIT_LIB_DIR="${CIRCUIT_ROOT}/lib/" -PTAU_FILE="powersOfTau28_hez_final_21.ptau" +PTAU_FILE="powersOfTau28_hez_final_${PTAU_POWER}.ptau" PTAU_PATH="${PTAU_DIR}/${PTAU_FILE}" CIRCUIT_MAIN="proof_main" diff --git a/workflow/ptau.sh b/workflow/ptau.sh new file mode 100644 index 0000000..614dd73 --- /dev/null +++ b/workflow/ptau.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +source ./paths.sh +source ./params.sh + +PTAU_URL=https://storage.googleapis.com/zkevm/ptau/powersOfTau28_hez_final_${PTAU_POWER}.ptau + +mkdir -p ${PTAU_DIR} + +if [ -f ${PTAU_PATH} ]; then + echo "${PTAU_FILE} download already Completed!" + exit 0 +else + echo "Downloading ${PTAU_FILE}" + curl ${PTAU_URL} --output ${PTAU_PATH} --progress-bar + echo "${PTAU_FILE} download Completed!" +fi \ No newline at end of file