mirror of
https://github.com/tornadocash/tornado-nova
synced 2024-02-02 14:53:56 +01:00
download ptau from amazon (hermez ceremony)
This commit is contained in:
parent
3af3b5a3b5
commit
da53d40e8a
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -17,7 +17,6 @@ jobs:
|
|||||||
- run: yarn cache clean --all
|
- run: yarn cache clean --all
|
||||||
- run: yarn install --network-concurrency 1
|
- run: yarn install --network-concurrency 1
|
||||||
- run: yarn lint
|
- run: yarn lint
|
||||||
- run: yarn download
|
|
||||||
- run: yarn build
|
- run: yarn build
|
||||||
- run: yarn test
|
- run: yarn test
|
||||||
- name: Telegram Failure Notification
|
- name: Telegram Failure Notification
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
"compile": "npx hardhat compile && yarn compile:hasher",
|
"compile": "npx hardhat compile && yarn compile:hasher",
|
||||||
"build": "npm run circuit && npm run compile",
|
"build": "npm run circuit && npm run compile",
|
||||||
"deploy": "npx hardhat run scripts/deploy.js --network optimism",
|
"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",
|
"test": "npx hardhat test",
|
||||||
"eslint": "eslint --ext .js --ignore-path .gitignore .",
|
"eslint": "eslint --ext .js --ignore-path .gitignore .",
|
||||||
"prettier:check": "prettier --check . --config .prettierrc",
|
"prettier:check": "prettier --check . --config .prettierrc",
|
||||||
|
@ -2,11 +2,8 @@
|
|||||||
POWERS_OF_TAU=15 # circuit will support max 2^POWERS_OF_TAU constraints
|
POWERS_OF_TAU=15 # circuit will support max 2^POWERS_OF_TAU constraints
|
||||||
mkdir -p artifacts/circuits
|
mkdir -p artifacts/circuits
|
||||||
if [ ! -f artifacts/circuits/ptau$POWERS_OF_TAU ]; then
|
if [ ! -f artifacts/circuits/ptau$POWERS_OF_TAU ]; then
|
||||||
echo "Generating powers of tau file"
|
echo "Downloading powers of tau file"
|
||||||
npx snarkjs powersoftau new bn128 $POWERS_OF_TAU artifacts/circuits/tmp_ptau$POWERS_OF_TAU
|
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
|
||||||
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
|
|
||||||
fi
|
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 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
|
npx snarkjs groth16 setup artifacts/circuits/transaction$1.r1cs artifacts/circuits/ptau$POWERS_OF_TAU artifacts/circuits/tmp_transaction$1.zkey
|
||||||
|
Loading…
Reference in New Issue
Block a user