download ptau from amazon (hermez ceremony)

This commit is contained in:
poma 2021-12-07 21:26:04 +03:00
parent 3af3b5a3b5
commit da53d40e8a
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
3 changed files with 2 additions and 7 deletions

View File

@ -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

View File

@ -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",

View File

@ -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