feat: Client IVC API#10217
Conversation
057414e to
361da96
Compare
Changes to circuit sizes
🧾 Summary (100% most significant diffs)
Full diff report 👇
|
maramihali
left a comment
There was a problem hiding this comment.
Nice work, left some small request for clarification/docs and a question.
| "node": ">=18" | ||
| } | ||
| } No newline at end of file | ||
| } |
There was a problem hiding this comment.
extra lines in the two json files could be removed
There was a problem hiding this comment.
The formatter added those for me, not sure why--maybe formatting config has changed since the last time those files changed?
| * @param precomputed_vk | ||
| */ | ||
| void ClientIVC::accumulate(ClientCircuit& circuit, | ||
| const bool _one_circuit, |
There was a problem hiding this comment.
will you add a comment explaining the point of this boolean?
| // proof | ||
| if (!initialized) { | ||
| OinkProver<Flavor> oink_prover{ proving_key }; | ||
| if (_one_circuit) { |
There was a problem hiding this comment.
would be helpful to begin with a comment saying this is handling the edge case where there's a single circuit in the IVC schme
There was a problem hiding this comment.
Committed in next PR 7de211c#diff-57571567d685a0f68a791ab06cdf88e4cc63f497549b9119e3d99c0bacf14a04R157
|
|
||
| namespace bb { | ||
|
|
||
| acir_format::WitnessVector get_witness(std::string const& witness_path) |
There was a problem hiding this comment.
it would be great to have docs for each of this getter but not part of the focus of this PR.
| return content; | ||
| } | ||
|
|
||
| class ClientIVCAPI : public API { |
There was a problem hiding this comment.
it would be great overall if this class had a bit more documentation
|
|
||
| std::vector<AcirProgram> folding_stack; | ||
|
|
||
| // TODO(https://github.com/AztecProtocol/barretenberg/issues/1162): Efficiently unify ACIR stack parsing |
There was a problem hiding this comment.
nit: we should uniformly either use - or _ in input type
There was a problem hiding this comment.
I think I did achieve this, but I see that some of the comments about deprecation weren't updated to refer to the _ version of things. I suspect this is what you're referring to?
| return verified; | ||
| }; | ||
|
|
||
| void gates([[maybe_unused]] const API::Flags& flags, |
There was a problem hiding this comment.
or actually I guess they are not client ivc related but as a next step we should create an ultra honk api class as well?
| const std::filesystem::path& output_dir) override | ||
| { | ||
| if (!flags.output_type || *flags.output_type != "fields_msgpack") { | ||
| throw_or_abort("No output_type or output_type not supported"); |
There was a problem hiding this comment.
why do flags need to be dereferenced?
There was a problem hiding this comment.
That's one way of accessing the value in a std::optional when the optional actually does contain a value.
There was a problem hiding this comment.
In any case, this validation is going to be replaced with the more robust functionality in https://github.com/CLIUtils/CLI11
one_circuitto CIVC to encode whether the MH part of the CIVC proof should be a hiding circuit (which takes a folding proof) or a proof for the single circuit.