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 --helpcircom --helpcargo install --path ./rustcd rustYou can give inputs by commands:
gkr-aggregator prove -c circuit.circom -i ./example/input1.json ./example/input2.json ./example/input3.jsonYou can get a message from cli:
Proving by groth16 can be doneYou should prepare an appropriate ptau file.
snarkjs groth16 setup aggregated.r1cs pot.ptau c0.zkey
snarkjs zkey contribute c0.zkey c1.zkey --name=“mock” -vGive 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.zkeyYou 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