22 if (!proving_key->commitment_key.initialized()) {
23 proving_key->commitment_key =
CommitmentKey(proving_key->dyadic_size());
30 execute_preamble_round();
37 execute_wire_commitments_round();
44 execute_sorted_list_accumulator_round();
52 execute_log_derivative_inverse_round();
60 execute_grand_product_computation_round();
64 proving_key->alphas = generate_alphas_round();
71 proving_key->is_complete =
true;
80 return transcript->export_proof();
90 fr vk_hash = honk_vk->hash_through_transcript(domain_separator, *transcript);
91 transcript->add_to_hash_buffer(domain_separator +
"vk_hash", vk_hash);
92 vinfo(
"vk hash in Oink prover: ", vk_hash);
94 for (
size_t i = 0; i < proving_key->num_public_inputs(); ++i) {
95 auto public_input_i = proving_key->public_inputs[i];
96 transcript->send_to_verifier(domain_separator +
"public_input_" +
std::to_string(i), public_input_i);
115 commit_to_witness_polynomial(proving_key->polynomials.w_l, commitment_labels.w_l, commit_type);
116 commit_to_witness_polynomial(proving_key->polynomials.w_r, commitment_labels.w_r, commit_type);
117 commit_to_witness_polynomial(proving_key->polynomials.w_o, commitment_labels.w_o, commit_type);
125 for (
auto [polynomial, label] :
126 zip_view(proving_key->polynomials.get_ecc_op_wires(), commitment_labels.get_ecc_op_wires())) {
129 transcript->send_to_verifier(domain_separator + label, proving_key->commitment_key.commit(polynomial));
134 for (
auto [polynomial, label] :
135 zip_view(proving_key->polynomials.get_databus_entities(), commitment_labels.get_databus_entities())) {
138 commit_to_witness_polynomial(polynomial, label);
152 auto [eta, eta_two, eta_three] = transcript->template get_challenges<FF>(
153 domain_separator +
"eta", domain_separator +
"eta_two", domain_separator +
"eta_three");
154 proving_key->relation_parameters.eta = eta;
155 proving_key->relation_parameters.eta_two = eta_two;
156 proving_key->relation_parameters.eta_three = eta_three;
159 proving_key->memory_read_records,
160 proving_key->memory_write_records,
168 commit_to_witness_polynomial(proving_key->polynomials.lookup_read_counts,
169 commitment_labels.lookup_read_counts,
172 commit_to_witness_polynomial(proving_key->polynomials.lookup_read_tags,
173 commitment_labels.lookup_read_tags,
180 commit_to_witness_polynomial(
181 proving_key->polynomials.w_4, domain_separator + commitment_labels.w_4, commit_type);
192 auto [beta, gamma] = transcript->template get_challenges<FF>(domain_separator +
"beta", domain_separator +
"gamma");
193 proving_key->relation_parameters.beta = beta;
194 proving_key->relation_parameters.gamma = gamma;
198 proving_key->polynomials, proving_key->dyadic_size(), proving_key->relation_parameters);
202 commit_to_witness_polynomial(proving_key->polynomials.lookup_inverses,
203 commitment_labels.lookup_inverses,
209 for (
auto [polynomial, label] :
210 zip_view(proving_key->polynomials.get_databus_inverses(), commitment_labels.get_databus_inverses())) {
229 proving_key->public_inputs,
230 proving_key->pub_inputs_offset(),
231 proving_key->active_region_data,
232 proving_key->relation_parameters,
233 proving_key->get_final_active_wire_idx() + 1);
239 commit_to_witness_polynomial(proving_key->polynomials.z_perm, commitment_labels.z_perm, commit_type);
251 challenge_labels[idx] = domain_separator +
"alpha_" +
std::to_string(idx);
266template <IsUltraOrMegaHonk Flavor>
268 const std::string& label,
279 proving_key->commitment_key.commit_with_type(polynomial, type, proving_key->active_region_data.get_ranges());
281 transcript->send_to_verifier(domain_separator + label, commitment);
287#ifdef STARKNET_GARAGA_FLAVORS
@ StructuredNonZeroComplement
std::array< FF, NUM_SUBRELATIONS - 1 > SubrelationSeparators
static constexpr size_t NUM_SUBRELATIONS
static constexpr bool HasZK
Curve::AffineElement Commitment
Class for all the oink rounds, which are shared between the folding prover and ultra prover.
Proof export_proof()
Export the Oink proof.
void execute_log_derivative_inverse_round()
Compute log derivative inverse polynomial and its commitment, if required.
void execute_grand_product_computation_round()
Compute permutation and lookup grand product polynomials and their commitments.
void prove()
Oink Prover function that runs all the rounds of the verifier.
void execute_preamble_round()
Add circuit size, public input size, and public inputs to transcript.
typename Flavor::CommitmentKey CommitmentKey
SubrelationSeparators generate_alphas_round()
void execute_sorted_list_accumulator_round()
Compute sorted witness-table accumulator and commit to the resulting polynomials.
typename Flavor::SubrelationSeparators SubrelationSeparators
void commit_to_witness_polynomial(Polynomial< FF > &polynomial, const std::string &label, const CommitmentKey::CommitType type=CommitmentKey::CommitType::Default)
A uniform method to mask, commit, and send the corresponding commitment to the verifier.
void execute_wire_commitments_round()
Commit to the wire polynomials (part of the witness), with the exception of the fourth wire,...
typename Transcript::Proof Proof
Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x .....
void mask()
Add random values to the coefficients of a polynomial. In practice, this is used for ensuring the com...
static void compute_logderivative_inverses(Flavor::ProverPolynomials &polynomials, const size_t circuit_size, RelationParameters< FF > &relation_parameters)
Compute the inverse polynomials used in the log derivative lookup relations.
static void add_ram_rom_memory_records_to_wire_4(typename Flavor::ProverPolynomials &polynomials, const std::vector< uint32_t > &memory_read_records, const std::vector< uint32_t > &memory_write_records, const FF &eta, const FF &eta_two, const FF &eta_three)
Add RAM/ROM memory records to the fourth wire polynomial.
static void compute_grand_product_polynomial(Flavor::ProverPolynomials &polynomials, std::vector< FF > &public_inputs, const size_t pub_inputs_offset, ActiveRegionData &active_region_data, RelationParameters< FF > &relation_parameters, size_t size_override=0)
Computes public_input_delta and the permutation grand product polynomial.
Entry point for Barretenberg command-line interface.
std::string to_string(bb::avm2::ValueTag tag)
#define PROFILE_THIS_NAME(name)