diff --git a/docs/tally-verify.md b/docs/tally-verify.md index 3e60f429c..f54bb2b26 100644 --- a/docs/tally-verify.md +++ b/docs/tally-verify.md @@ -53,9 +53,7 @@ WALLET_PRIVATE_KEY= Once you have the `tally.json` from the tally script, run: ``` -HARDHAT_NETWORK= yarn ts-node cli/finalize.ts \ - --clrfund - --tally-file +yarn hardhat clr-finalize --clrfund --tally-file --network ``` # How to verify the tally results @@ -65,7 +63,7 @@ Anyone can verify the tally results in the tally.json. From the clrfund contracts folder, run the following command to verify the result: ``` -HARDHAT_NETWORK= yarn ts-node cli/verify.ts -f -t +yarn hardhat verify-tally-file --tally-file --tally-address --network ``` # How to enable the leaderboard view @@ -78,7 +76,7 @@ After finalizing the round, enable the leaderboard view in the vue-app by export ```sh cd contracts -yarn hardhat export-round --output-dir ../vue-app/src/rounds --network --round-address --operator --start-block --ipfs +yarn hardhat clr-export-round --output-dir ../vue-app/src/rounds --network --round-address --operator --start-block --ipfs ``` 3) Build and deploy the app diff --git a/docs/trusted-setup.md b/docs/trusted-setup.md deleted file mode 100644 index 3c3be55f8..000000000 --- a/docs/trusted-setup.md +++ /dev/null @@ -1,107 +0,0 @@ -# Trusted Setup - -## How to verify the correctness of execution? - -### Verify using MACI CLI - -Clone the [MACI repo](https://github.com/appliedzkp/maci/) and switch to version v0.10.1: - -``` -git clone https://github.com/appliedzkp/maci.git -cd maci/ -git checkout v0.10.1 -``` - -Follow instructions in README.md to install necessary dependencies. - -### x32 Circuits - -Download [zkSNARK parameters](https://gateway.pinata.cloud/ipfs/QmWSxPBNYDtsK23KwYdMtcDaJg3gWS3LBsqMnENrVG6nmc) for 'x32' circuits into `circuits/params/` directory and rebuild the keys: - -``` -cd circuits -./scripts/buildSnarks32.sh -``` - -To recompile all the params (with Linux): - -``` -# install deps -sudo apt-get install build-essential libgmp-dev libsodium-dev nasm git - -# remove everything from the /params folder -rm -r circuits/params/* - -# recompile binaries (takes time: ~5min to ~10min) -cd circuits -./scripts/buildSnarks32.sh -``` - -Recompile the contracts: - -``` -cd ../contracts -npm run compileSol -``` - -Download the logs: - -``` -cd cli -node build/index.js fetchLogs \ - --eth-provider \ - --contract \ - --start-block \ - --num-blocks-per-request \ - --output logs -``` - -Generate proofs: - -``` -node build/index.js genProofs \ - --eth-provider \ - --contract \ - --privkey \ - --output proofs.json \ - --tally-file tally.json -``` - -Download the tally file and verify it: - -``` -cd ../cli -node build/index.js verify -t tally.json -``` - -### Verify using clrfund scripts - -Switch to `contracts` directory: - -``` -cd contracts/ -``` - -Download [zkSNARK parameters](https://gateway.pinata.cloud/ipfs/QmRzp3vkFPNHPpXiu7iKpPqVnZB97wq7gyih2mp6pa5bmD) for 'medium' circuits to `snark-params` directory. Example: - -``` -ipfs get --output snark-params QmRzp3vkFPNHPpXiu7iKpPqVnZB97wq7gyih2mp6pa5bmD -``` - -Or download [zkSNARK parameters](https://gateway.pinata.cloud/ipfs/QmWSxPBNYDtsK23KwYdMtcDaJg3gWS3LBsqMnENrVG6nmc) for 'x32' circuits to `snark-params` directory. Example: - -``` -ipfs get --output snark-params QmWSxPBNYDtsK23KwYdMtcDaJg3gWS3LBsqMnENrVG6nmc -``` - -Set the path to downloaded parameter files: - -``` -export NODE_CONFIG='{"snarkParamsPath": "../../../contracts/snark-params/"}' -``` - -Verify: - -``` -yarn ts-node scripts/verify.ts tally.json -```