Coordinator
Coordinator manual
Coordinate using MACI CLI
Clone the MACI repo and switch to version v0.9.4:
git clone https://github.com/appliedzkp/maci.git
cd maci/
git checkout v0.9.4Follow instructions in README.md to install necessary dependencies.
Medium Circuits
Download zkSNARK parameters for 'medium' circuits into circuits/params/ directory and rebuild the keys:
cd circuits
./scripts/buildSnarksMedium.shx32 Circuits
Download zkSNARK parameters for 'x32' circuits into circuits/params/ directory and rebuild the keys:
cd circuits
./scripts/buildSnarks32.shRecompile the contracts:
Generate coordinator key
A single key can be used to coordinate multiple rounds.
Tally votes
Decrypt messages and tally the votes:
Coordinator private key must be in MACI key format (starts with macisk). Ethereum private key can be any private key that controls the necessary amount of ETH to pay for gas.
The genProofs command will create two files: proofs.json and tally.json. The proofs.json file will be needed to run the next command which submits proofs to MACI contract:
The process may take several hours. Results can be found in tally.json file, which must then be published via IPFS.
Finally, the CID of tally file must be submitted to FundingRound contract:
Coordinate using clrfund scripts
Generate coordinator key
A single key can be used to coordinate multiple rounds.
Tally votes
Install zkutil (see instructions in MACI readme).
Switch to contracts directory:
Download zkSNARK parameters for 'medium' circuits to snark-params directory. Example:
Set the path to downloaded parameter files and also the path to zkutil binary (if needed):
Decrypt messages and tally the votes:
Result will be saved to tally.json file, which must then be published via IPFS.
Last updated
Was this helpful?