Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 658 Bytes

README.md

File metadata and controls

24 lines (22 loc) · 658 Bytes

Subsenate

zkSnark based random subset voting.

How to run it?

  1. Install dependencies:
npm install
  1. Compile the circuit and run the setup
./node_modules/.bin/circom subsenate.circom --wasm --r1cs --sym
./node_modules/.bin/snarkjs setup -r subsenate.r1cs
  1. Generate inputs (either yourself or using the supplied generate test inputs script)
node generate-test-inputs.js
  1. Calculate the witness, create and verify the proof.
./node_modules/.bin/snarkjs calculatewitness --wasm subsenate.wasm --input input.json --witness witness.json
./node_modules/.bin/snarkjs proof
./node_modules/.bin/snarkjs verify