This is Cli tool for generation of aggregated proof for multiple inputs.
In this version, it supports circom circuit.
circom and snarkjs should be installed already.
You can check that by this command:
snarkjs --help
circom --help
cargo install --path ./rust
cd rust
You can give inputs by commands:
gkr-aggregator prove -c circuit.circom -i ./example/input1.json ./example/input2.json ./example/input3.json
You can get a message from cli:
Proving by groth16 can be done
You should prepare an appropriate ptau file.
snarkjs groth16 setup aggregated.r1cs pot.ptau c0.zkey
snarkjs zkey contribute c0.zkey c1.zkey --name=“mock” -v
Give random string for contribution, and then
snarkjs zkey beacon c1.zkey c.zkey 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f 10 -n="Final Beacon phase2"
gkr-aggregator mock-groth -z c.zkey
You can get proof.json
and public.json
.
Get input from input.json
, make d
in proof with it.
Parse r1cs file and convert it to GKRCircuit
. (Let's call this
Make proof d
and GKRCircuit
.
There are two circuit
- input (for
$C_i$ ) - proof
$\pi_{i - 1}$
Make integrated circuit
Use those inputs, make proof
Also there are two circuit snarkjs
.
Integrated circuit snarkjs
also.
So final proof