|
| size_t | get_num_circuits () const |
| |
| Goblin & | get_goblin () override |
| |
| const Goblin & | get_goblin () const override |
| |
| | Chonk (size_t num_circuits) |
| |
| void | instantiate_stdlib_verification_queue (ClientCircuit &circuit, const std::vector< std::shared_ptr< RecursiveVKAndHash > > &input_keys={}) |
| | Instantiate a stdlib verification queue for use in the kernel completion logic.
|
| |
| std::tuple< std::optional< RecursiveVerifierAccumulator >, std::vector< PairingPoints >, StdlibFF > | recursive_verification_and_consistency_checks (ClientCircuit &circuit, const StdlibVerifierInputs &verifier_inputs, const std::optional< RecursiveVerifierAccumulator > &input_verifier_accumulator, const std::optional< StdlibFF > &running_hash, const std::shared_ptr< RecursiveTranscript > &accumulation_recursive_transcript) |
| | Orchestrate recursive verification, databus consistency checks, and merge verification for a single circuit.
|
| |
| void | complete_kernel_circuit_logic (ClientCircuit &circuit) |
| | Append logic to complete a kernel circuit.
|
| |
| void | accumulate (ClientCircuit &circuit, const std::shared_ptr< MegaVerificationKey > &precomputed_vk) override |
| | Perform prover work for accumulation (e.g. HN folding, merge proving)
|
| |
| ChonkProof | prove () |
| | Construct Chonk proof using the batched MegaZK + Translator protocol.
|
| |
| std::shared_ptr< MegaZKFlavor::VKAndHash > | get_hiding_kernel_vk_and_hash () const |
| | Get the hiding kernel verification key and hash for Chonk verification.
|
| |
| virtual | ~IVCBase ()=default |
| |
|
| void | update_native_verifier_accumulator (const VerifierInputs &queue_entry, const std::shared_ptr< Transcript > &verifier_transcript) |
| | Update native verifier accumulator. Useful for debugging.
|
| |
| void | debug_incoming_circuit (ClientCircuit &circuit, const std::shared_ptr< ProverInstance > &prover_instance, const std::shared_ptr< MegaVerificationKey > &precomputed_vk) |
| |
| FoldingResult | verify_folding (ClientCircuit &circuit, const StdlibVerifierInputs &verifier_inputs, const std::shared_ptr< RecursiveVerifierInstance > &verifier_instance, const std::shared_ptr< RecursiveTranscript > &accumulation_recursive_transcript) const |
| | Perform recursive folding verification for a single circuit in the IVC.
|
| |
| PublicInputsResult | process_public_inputs_and_consistency_checks (const StdlibVerifierInputs &verifier_inputs, std::vector< StdlibFF > &public_inputs, WitnessCommitments &witness_commitments, const std::optional< StdlibFF > &prev_accum_hash) |
| | Process public inputs from a verified circuit and perform databus consistency checks.
|
| |
| void | accumulate_hiding_kernel (ClientCircuit &circuit, const std::shared_ptr< MegaVerificationKey > &precomputed_vk) |
| | Build the hiding kernel's ZK proving key and verification key (proving is deferred to prove()).
|
| |
| void | accumulate_and_fold (ClientCircuit &circuit, const std::shared_ptr< MegaVerificationKey > &precomputed_vk, QUEUE_TYPE queue_type, std::shared_ptr< ProverInstance > prover_instance) |
| | Perform HyperNova folding for a circuit and produce the corresponding merge proof.
|
| |
| QUEUE_TYPE | get_queue_type () const |
| | Get queue type for the proof of a circuit about to be accumulated based on num circuits accumulated so far.
|
| |
The IVC scheme used by the aztec client for private function execution.
Combines HyperNova with Goblin to accumulate one circuit at a time with efficient EC group operations. It is assumed that the circuits being accumulated correspond alternatingly to an app and a kernel, as is the case in Aztec. Two recursive folding verifiers are appended to each kernel (except the first one) to verify the folding of a previous kernel and an app/function circuit. Due to this structure it is enforced that the total number of circuits being accumulated is even.
Definition at line 39 of file chonk.hpp.
Proof type determining recursive verification logic in kernel circuits.
This enum has dual semantics depending on context:
PROVER PERSPECTIVE (in accumulate): Type assigned to the circuit being accumulated. State machine transitions based on num_circuits_accumulated:
- OINK: First app (circuit 0) - no prior accumulator, just Oink verification
- HN: Apps 1..n-3, inner kernels, and reset kernels - full HyperNova folding verification
- HN_TAIL: Circuit n-3 (last kernel before tail)
- HN_FINAL: Circuit n-2 (tail kernel) - final folding + decider verification
- MEGA: Circuit n-1 (hiding kernel) - MegaZK proof, no folding
VERIFIER PERSPECTIVE (in complete_kernel_circuit_logic): Type of the proof being verified.
- If verifying OINK proof → this kernel is the init kernel (circuit 1)
- If verifying HN proof → this kernel is an inner/reset kernel
- If verifying HN_TAIL proof → this kernel IS the tail kernel (circuit n-2)
- If verifying HN_FINAL proof → this kernel IS the hiding kernel (circuit n-1)
See get_queue_type() for assignment logic and README.md::circuit-structure for overview.
| Enumerator |
|---|
| OINK | |
| HN | |
| HN_TAIL | |
| HN_FINAL | |
| MEGA | |
Definition at line 117 of file chonk.hpp.
Perform prover work for accumulation (e.g. HN folding, merge proving)
Execute prover work for accumulation (e.g. HN folding, merge proving)
- Parameters
-
| circuit | The incoming statement |
| precomputed_vk | The verification key of the incoming statement OR a mocked key whose metadata needs to be set using the proving key produced from circuit in order to pass some assertions in the Oink prover. |
| mock_vk | A boolean to say whether the precomputed vk should have its metadata set. |
Dispatches to accumulate_hiding_kernel (for MEGA/hiding kernel) or accumulate_and_fold (for all folding-based queue types). See chonk.hpp QUEUE_TYPE for the full state machine.
- Parameters
-
| circuit | The circuit to accumulate |
| precomputed_vk | Precomputed verification key for the circuit |
Implements bb::IVCBase.
Definition at line 573 of file chonk.cpp.
| void bb::Chonk::instantiate_stdlib_verification_queue |
( |
ClientCircuit & |
circuit, |
|
|
const std::vector< std::shared_ptr< RecursiveVKAndHash > > & |
input_keys = {} |
|
) |
| |
Instantiate a stdlib verification queue for use in the kernel completion logic.
Construct a stdlib proof/verification_key for each entry in the native verification queue. By default, both are constructed from their counterpart in the native queue. Alternatively, Stdlib verification keys can be provided directly as input to this method. (The later option is used, for example, when constructing recursive verifiers based on the verification key witnesses from an acir recursion constraint. This option is not provided for proofs since valid proof witnesses are in general not known at the time of acir constraint generation).
- Parameters
-
Definition at line 43 of file chonk.cpp.
Process public inputs from a verified circuit and perform databus consistency checks.
For kernel circuits: reconstructs KernelIO from public inputs, verifies that databus return data commitments match witness commitments, checks accumulator hash consistency, and returns the kernel's ECC op running hash. For app circuits: reconstructs AppIO from public inputs and extracts pairing points. In both cases, updates the bus depot with the appropriate return data commitment.
- Parameters
-
| verifier_inputs | {proof, vkey, type (Oink/HN)} A set of inputs for recursive verification |
| public_inputs | The public inputs extracted from the verifier instance that was folded into the running accumulator |
| witness_commitments | The witness commitments extracted from the verifier instance that was folded into the running accumulator |
| prev_accum_hash | The accumulator hash from the previous kernel |
Definition at line 147 of file chonk.cpp.
Construct Chonk proof using the batched MegaZK + Translator protocol.
Orchestrates the batched proving flow on a shared transcript:
- MegaZK Oink (pre-sumcheck commitments for the hiding kernel)
- Merge proof (fixed-location append of the final subtable from the hiding kernel)
- ECCVM proof (produces translation challenges v, x)
- IPA proof (separate transcript)
- Translator Oink + Joint sumcheck + Joint PCS
The joint sumcheck and PCS batch the MegaZK and translator circuits together, eliminating separate sumcheck/PCS phases and reducing proof size.
Definition at line 626 of file chonk.cpp.
Orchestrate recursive verification, databus consistency checks, and merge verification for a single circuit.
Delegates to three steps: (1) recursive folding verification via verify_folding, (2) public inputs processing and databus consistency checks via process_public_inputs_and_consistency_checks, and (3) merge recursive verification. Returns the output accumulator, aggregated pairing points, and merged table commitments.
- Parameters
-
| circuit | |
| verifier_inputs | {proof, vkey, type (Oink/HN)} A set of inputs for recursive verification |
| input_verifier_accumulator | The accumulator from the previous step of recursive verification |
| running_hash | Running hash of ECC-op column commitments from prior steps in this kernel. |
| accumulation_recursive_transcript | Transcript shared across recursive verification of the folding of K_{i-1} (kernel), A_{i,1} (app), .., A_{i, n} (app) |
Definition at line 230 of file chonk.cpp.