Skip to content

Commit

Permalink
download ptau from amazon (hermez ceremony)
Browse files Browse the repository at this point in the history
  • Loading branch information
poma committed Dec 7, 2021
1 parent 3af3b5a commit da53d40
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 2 additions & 5 deletions scripts/buildCircuit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da53d40

Please sign in to comment.