git clone https://github.com/appliedzkp/maci.git
cd maci/
git checkout v0.9.4
Follow 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.sh
x32 Circuits
Download zkSNARK parameters for 'x32' circuits into circuits/params/ directory and rebuild the keys:
cd circuits
./scripts/buildSnarks32.sh
Recompile 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.