This repo contains the required code to compile and test the Vocdoni ZKSnark circuit to generate and verify a election census for anonymous voting.
It also contains the current version of the circuit (designed using Circom).
To use this repo, the following requirements must be installed:
-
Install dependencies
It installs required script dependencies. To get the full list of dependencies read the package.json and go.mod.
make install
-
Compile the circuit and generate artifacts
It compiles the circuit (read more here), calculates the witness and export it (read more here) and generates the zkey and export it (read more here). The resulting artifacts will be at
./artifacts/<environment>/<nlevels>/
, check the checksums of thedev
environment here.make compile
-
Test the proof generation and verification
It generates a valid set of circuit inputs, generates a zk-proof with them and verify that proof. All this steps use the result of circuit compilation, so they must be performed after executing the
make compile
command.make test