31 execute_preamble_round();
34 verifier_instance->gemini_masking_commitment =
35 transcript->template receive_from_prover<Commitment>(
"Gemini:masking_poly_comm");
37 execute_wire_commitments_round();
38 execute_sorted_list_accumulator_round();
39 execute_log_derivative_inverse_round();
40 execute_grand_product_computation_round();
42 verifier_instance->witness_commitments = witness_comms;
43 verifier_instance->relation_parameters = relation_parameters;
44 verifier_instance->alpha = generate_alpha_round();
53 auto vk = verifier_instance->get_vk();
55 FF vk_hash =
vk->hash_with_origin_tagging(*transcript);
56 transcript->add_to_hash_buffer(domain_separator +
"vk_hash", vk_hash);
57 vinfo(
"vk hash in Oink verifier: ", vk_hash);
61 const bool is_write_vk_mode = vk_hash.get_context()->is_write_vk_mode();
62 const bool vk_hash_consistency = verifier_instance->vk_and_hash->hash.get_value() == vk_hash.get_value();
63 if (!vk_hash_consistency && !is_write_vk_mode) {
64 info(
"Recursive Ultra Verifier: VK Hash Mismatch");
66 verifier_instance->vk_and_hash->hash.assert_equal(vk_hash);
69 vk->num_public_inputs.assert_equal(
FF(num_public_inputs),
"OinkVerifier: num_public_inputs mismatch with VK");
71 BB_ASSERT_EQ(verifier_instance->vk_and_hash->hash, vk_hash,
"Native Ultra Verifier: VK Hash Mismatch");
74 static_cast<size_t>(
vk->num_public_inputs),
75 "OinkVerifier: num_public_inputs mismatch with VK");
78 std::vector<FF> public_inputs;
79 for (
size_t i = 0; i < num_public_inputs; ++i) {
81 transcript->template receive_from_prover<FF>(domain_separator +
"public_input_" +
std::to_string(i));
82 public_inputs.emplace_back(public_input_i);
84 verifier_instance->public_inputs =
std::move(public_inputs);
95 witness_comms.w_l = transcript->template receive_from_prover<Commitment>(domain_separator + comm_labels.w_l);
96 witness_comms.w_r = transcript->template receive_from_prover<Commitment>(domain_separator + comm_labels.w_r);
97 witness_comms.w_o = transcript->template receive_from_prover<Commitment>(domain_separator + comm_labels.w_o);
102 for (
auto [commitment, label] :
zip_view(witness_comms.get_ecc_op_wires(), comm_labels.get_ecc_op_wires())) {
103 commitment = transcript->template receive_from_prover<Commitment>(domain_separator + label);
107 for (
auto [commitment, label] :
108 zip_view(witness_comms.get_databus_entities(), comm_labels.get_databus_entities())) {
109 commitment = transcript->template receive_from_prover<Commitment>(domain_separator + label);
121 relation_parameters.compute_eta_powers(transcript->template get_challenge<FF>(
"eta"));
124 witness_comms.lookup_read_counts =
125 transcript->template receive_from_prover<Commitment>(domain_separator + comm_labels.lookup_read_counts);
126 witness_comms.lookup_read_tags =
127 transcript->template receive_from_prover<Commitment>(domain_separator + comm_labels.lookup_read_tags);
128 witness_comms.w_4 = transcript->template receive_from_prover<Commitment>(domain_separator + comm_labels.w_4);
137 auto [beta, gamma] = transcript->template get_challenges<FF>(
139 relation_parameters.compute_beta_powers(beta);
140 relation_parameters.gamma = gamma;
142 witness_comms.lookup_inverses =
143 transcript->template receive_from_prover<Commitment>(domain_separator + comm_labels.lookup_inverses);
147 for (
auto [commitment, label] :
148 zip_view(witness_comms.get_databus_inverses(), comm_labels.get_databus_inverses())) {
149 commitment = transcript->template receive_from_prover<Commitment>(domain_separator + label);
160 auto vk = verifier_instance->get_vk();
162 const FF public_input_delta = compute_public_input_delta<Flavor>(
163 verifier_instance->public_inputs, relation_parameters.beta, relation_parameters.gamma,
vk->pub_inputs_offset);
165 relation_parameters.public_input_delta = public_input_delta;
168 witness_comms.z_perm = transcript->template receive_from_prover<Commitment>(domain_separator + comm_labels.z_perm);
175 return transcript->template get_challenge<FF>(domain_separator +
"alpha");
182#ifdef STARKNET_GARAGA_FLAVORS
#define BB_ASSERT_EQ(actual, expected,...)
bb::field< bb::Bn254FrParams > FF
static constexpr bool HasZK
Verifier class for all the presumcheck rounds, which are shared between the folding verifier and ultr...
void execute_wire_commitments_round()
Get the wire polynomials (part of the witness), with the exception of the fourth wire,...
void execute_preamble_round()
Get circuit size, public input size, and public inputs from transcript.
void verify()
Oink Verifier function that runs all the rounds of the verifier.
SubrelationSeparator generate_alpha_round()
void execute_log_derivative_inverse_round()
Get log derivative inverse polynomial and its commitment, if MegaFlavor.
void execute_grand_product_computation_round()
Compute lookup grand product delta and get permutation and lookup grand product commitments.
void execute_sorted_list_accumulator_round()
Get sorted witness-table accumulator and fourth wire commitments.
Entry point for Barretenberg command-line interface.
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::string to_string(bb::avm2::ValueTag tag)