diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c8d9314..4ed858d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,6 @@ jobs: - run: yarn cache clean --all - run: yarn install --network-concurrency 1 - run: yarn lint - - run: yarn download - run: yarn build - run: yarn test - name: Telegram Failure Notification diff --git a/package.json b/package.json index c9c2896..d28f49d 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "compile": "npx hardhat compile && yarn compile:hasher", "build": "npm run circuit && npm run compile", "deploy": "npx hardhat run scripts/deploy.js --network optimism", - "download": "curl -L https://github.com/tornadocash/tornado-pool/releases/download/ptau-download/ptau15 --create-dirs -o artifacts/circuits/ptau15", "test": "npx hardhat test", "eslint": "eslint --ext .js --ignore-path .gitignore .", "prettier:check": "prettier --check . --config .prettierrc", diff --git a/scripts/buildCircuit.sh b/scripts/buildCircuit.sh index ca8a3b8..8664fd6 100755 --- a/scripts/buildCircuit.sh +++ b/scripts/buildCircuit.sh @@ -2,11 +2,8 @@ POWERS_OF_TAU=15 # circuit will support max 2^POWERS_OF_TAU constraints mkdir -p artifacts/circuits if [ ! -f artifacts/circuits/ptau$POWERS_OF_TAU ]; then - echo "Generating powers of tau file" - npx snarkjs powersoftau new bn128 $POWERS_OF_TAU artifacts/circuits/tmp_ptau$POWERS_OF_TAU - npx snarkjs powersoftau contribute artifacts/circuits/tmp_ptau$POWERS_OF_TAU artifacts/circuits/tmp2_ptau$POWERS_OF_TAU - npx snarkjs powersoftau prepare phase2 artifacts/circuits/tmp2_ptau$POWERS_OF_TAU artifacts/circuits/ptau$POWERS_OF_TAU - rm artifacts/circuits/tmp_ptau$POWERS_OF_TAU artifacts/circuits/tmp2_ptau$POWERS_OF_TAU + echo "Downloading powers of tau file" + curl -L https://hermez.s3-eu-west-1.amazonaws.com/powersOfTau28_hez_final_$POWERS_OF_TAU.ptau --create-dirs -o artifacts/circuits/ptau$POWERS_OF_TAU fi npx circom -v -r artifacts/circuits/transaction$1.r1cs -w artifacts/circuits/transaction$1.wasm -s artifacts/circuits/transaction$1.sym circuits/transaction$1.circom npx snarkjs groth16 setup artifacts/circuits/transaction$1.r1cs artifacts/circuits/ptau$POWERS_OF_TAU artifacts/circuits/tmp_transaction$1.zkey