/zk-franchise-proof-circuit

zk-Snarks circuit for franchise proof

Primary LanguageTypeScriptGNU Lesser General Public License v2.1LGPL-2.1

ZKSnark census circuit compiler & tester

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).

Usage

Requirments

To use this repo, the following requirements must be installed:

Available commands

  • 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 the dev 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