|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Executes the "Oink" phase of the Honk proving protocol: the initial rounds that commit to witness data, lookup/logderivative inverses, and the permutation grand product, producing the relation parameters (eta, beta, gamma, alpha) along the way. More...
#include <oink_prover.hpp>
Public Member Functions | |
| OinkProver (std::shared_ptr< ProverInstance > prover_instance, std::shared_ptr< HonkVK > honk_vk, const std::shared_ptr< typename Flavor::Transcript > &transcript) | |
| void | prove (bool emit_alpha=true) |
| Commit to witnesses, compute relation parameters, and prepare for Sumcheck. | |
| Proof | export_proof () |
| Export the Oink proof. | |
Static Public Member Functions | |
| static void | add_ram_rom_memory_records_to_wire_4 (ProverInstance &instance) |
| Add RAM/ROM memory records to the fourth wire polynomial. | |
| static void | compute_logderivative_inverses (ProverInstance &instance) |
| Compute the inverse polynomials used in the log derivative lookup relations. | |
| static void | compute_grand_product_polynomial (ProverInstance &instance) |
| Computes public_input_delta and the permutation grand product polynomial. | |
Private Types | |
| using | CommitmentKey = typename Flavor::CommitmentKey |
| using | HonkVK = typename Flavor::VerificationKey |
| using | ProverInstance = ProverInstance_< Flavor > |
| using | Transcript = typename Flavor::Transcript |
| using | FF = typename Flavor::FF |
| using | Proof = typename Transcript::Proof |
Private Member Functions | |
| void | send_vk_hash_and_public_inputs () |
| Hash the verification key and send public inputs to the transcript. | |
| void | commit_to_wires () |
| Commit to the wire polynomials (part of the witness), with the exception of the fourth wire, which is only committed to after adding memory records. For Mega, we also commit to the ECC op wires and DataBus columns. | |
| void | commit_to_lookup_counts_and_w4 () |
| Compute sorted witness-table accumulator and commit to the resulting polynomials. | |
| void | commit_to_logderiv_inverses () |
| Compute log derivative inverse polynomial and its commitment, if required. | |
| void | commit_to_z_perm () |
| Compute the permutation grand product polynomial and commit to it. | |
| void | commit_to_masking_poly () |
Private Attributes | |
| std::shared_ptr< ProverInstance > | prover_instance |
| std::shared_ptr< HonkVK > | honk_vk |
| std::shared_ptr< Transcript > | transcript |
| CommitmentKey | commitment_key |
| Flavor::CommitmentLabels | commitment_labels |
Executes the "Oink" phase of the Honk proving protocol: the initial rounds that commit to witness data, lookup/logderivative inverses, and the permutation grand product, producing the relation parameters (eta, beta, gamma, alpha) along the way.
The rounds proceed in order:
After prove() completes, the prover instance holds all committed polynomials and relation parameters needed by the subsequent Sumcheck and PCS phases in UltraProver.
The underlying witness computations (RAM/ROM memory records, log-derivative inverses, permutation grand product) are also exposed as public static methods so that test code can invoke them independently of the transcript-driven commit flow.
Definition at line 52 of file oink_prover.hpp.
|
private |
Definition at line 53 of file oink_prover.hpp.
|
private |
Definition at line 57 of file oink_prover.hpp.
|
private |
Definition at line 54 of file oink_prover.hpp.
|
private |
Definition at line 58 of file oink_prover.hpp.
|
private |
Definition at line 55 of file oink_prover.hpp.
|
private |
Definition at line 56 of file oink_prover.hpp.
|
inline |
Definition at line 61 of file oink_prover.hpp.
|
static |
Add RAM/ROM memory records to the fourth wire polynomial.
This operation must be performed after the first three wires have been committed to, hence the dependence on the eta challenge.
| Flavor |
| instance | prover instance whose polynomials, memory records, and eta powers are used |
Definition at line 214 of file oink_prover.cpp.
|
private |
Compute log derivative inverse polynomial and its commitment, if required.
Definition at line 138 of file oink_prover.cpp.
|
private |
Compute sorted witness-table accumulator and commit to the resulting polynomials.
Definition at line 111 of file oink_prover.cpp.
|
private |
Definition at line 192 of file oink_prover.cpp.
|
private |
Commit to the wire polynomials (part of the witness), with the exception of the fourth wire, which is only committed to after adding memory records. For Mega, we also commit to the ECC op wires and DataBus columns.
Definition at line 66 of file oink_prover.cpp.
|
private |
Compute the permutation grand product polynomial and commit to it.
Definition at line 175 of file oink_prover.cpp.
|
static |
Computes public_input_delta and the permutation grand product polynomial.
| instance | prover instance whose polynomials, public inputs, and relation parameters are used |
Definition at line 277 of file oink_prover.cpp.
|
static |
Compute the inverse polynomials used in the log derivative lookup relations.
| Flavor |
| instance | prover instance whose polynomials and relation parameters are used |
Definition at line 246 of file oink_prover.cpp.
| OinkProver< Flavor >::Proof bb::OinkProver< Flavor >::export_proof | ( | ) |
Export the Oink proof.
Definition at line 41 of file oink_prover.cpp.
| void bb::OinkProver< Flavor >::prove | ( | bool | emit_alpha = true | ) |
Commit to witnesses, compute relation parameters, and prepare for Sumcheck.
Definition at line 22 of file oink_prover.cpp.
|
private |
Hash the verification key and send public inputs to the transcript.
Definition at line 49 of file oink_prover.cpp.
|
private |
Definition at line 83 of file oink_prover.hpp.
|
private |
Definition at line 84 of file oink_prover.hpp.
|
private |
Definition at line 81 of file oink_prover.hpp.
|
private |
Definition at line 80 of file oink_prover.hpp.
|
private |
Definition at line 82 of file oink_prover.hpp.