build-and-generate-proof
This command first generates a proving key and then directly generates the proof.
info
This is preferred over generate-proving-key
and generate-proof
, because the circuit is only parsed and built once instead of twice (For large circuits, this can take some time).
Example
co-noir build-and-generate-proof --witness test_vectors/poseidon/poseidon.gz.0.shared --circuit test_vectors/poseidon/poseidon.json --crs test_vectors/bn254_g1.dat --protocol REP3 --hasher KECCAK --config configs/party1.toml --out proof.0.proof --public-input public_input.json
Here, poseidon.gz.shared
is the share of the witness, poseidon.json
is the circuit file from Noir, bn254_g1.dat
is the file storing the prover CRS and party.toml
is the network configuration. As output, one creates the UltraHonk proof proof.proof
and the output of the circuit public_input.json
. The parameter --hasher POSEIDON
defines that Poseidon2 is used as the transcript hasher, the other implemented option would be Keccak256.
Reference
Builds the proving key and evaluates the prover algorithm for the specified circuit and witness share in MPC
Usage: co-noir build-and-generate-proof [OPTIONS]
Options:
--config <CONFIG> The path to the config file
--witness <WITNESS> The path to the witness share file
--circuit <CIRCUIT> The path to the circuit file, generated by Noir
--crs <CRS> The path to the prover crs file
--protocol <PROTOCOL> The MPC protocol to be used [possible values: REP3, SHAMIR]
--hasher <HASHER> The transcript hasher to be used [possible values: POSEIDON, KECCAK]
--out <OUT> The output file where the final proof is written to. If not passed, this party will not write the proof to a file
--public-input <PUBLIC_INPUT> The output JSON file where the public inputs are written to. If not passed, this party will not write the public inputs to a file
-t, --threshold <THRESHOLD> The threshold of tolerated colluding parties [default: 1]
--recursive Generate a recursive proof
-h, --help Print help (see more with '--help')