11template <
typename Builder>
16 if (this->points_accumulator.is_populated()) {
22 if (update_ipa_data) {
24 this->nested_ipa_proofs.push_back(other.
ipa_proof);
25 this->nested_ipa_claims.push_back(other.
ipa_claim);
29template <
typename Builder>
33 if (this->points_accumulator.is_populated()) {
39 if (update_ipa_data) {
41 this->nested_ipa_proofs.insert(
43 this->nested_ipa_claims.insert(
45 this->nested_triple_ipa_openings.insert(this->nested_triple_ipa_openings.end(),
51template <
typename Builder>
55 if (this->points_accumulator.is_populated()) {
56 this->points_accumulator.aggregate(pairing_points);
58 this->points_accumulator = pairing_points;
60 this->nested_triple_ipa_openings.push_back(
std::move(triple_ipa_opening));
71 nested_ipa_claims.size(), nested_ipa_proofs.size(),
"Mismatched number of nested IPA claims and proofs.");
74 accumulators.reserve(nested_ipa_claims.size() + nested_triple_ipa_openings.size());
75 for (
size_t idx = 0; idx < nested_ipa_claims.size(); ++idx) {
77 accumulators.emplace_back(RecursiveIPA::reduce_verify(nested_ipa_claims[idx], ipa_transcript));
79 for (
const auto& opening : nested_triple_ipa_openings) {
80 accumulators.emplace_back(opening.reduce_verify());
84 if (accumulators.size() == 2) {
85 return RecursiveIPA::accumulate(commitment_key,
std::move(accumulators[0]),
std::move(accumulators[1]));
87 if (accumulators.size() == 1) {
88 return RecursiveIPA::prove_accumulator_claim(commitment_key,
std::move(accumulators[0]));
90 if (accumulators.empty()) {
91 info(
"Proving with UltraRollupHonk but no IPA claims exist.");
92 return RecursiveIPA::create_random_valid_ipa_claim_and_proof(
builder);
104 nested_ipa_claims.size(), nested_ipa_proofs.size(),
"Mismatched number of nested IPA claims and proofs.");
105 BB_ASSERT_EQ(nested_ipa_claims.size() + nested_triple_ipa_openings.size(),
107 "Root rollup must accumulate two IPA proofs.");
109 auto [ipa_claim, ipa_proof] = perform_IPA_accumulation(
builder);
115 auto accumulated_ipa_transcript =
118 verifier_commitment_key, ipa_claim, accumulated_ipa_transcript);
123 [[maybe_unused]]
bool is_hn_recursion_constraints,
124 [[maybe_unused]]
bool has_ipa_claim)
130 auto [ipa_claim, ipa_proof] = perform_IPA_accumulation(
builder);
138 points_accumulator.is_populated()
141 inputs.ipa_claim = ipa_claim;
146 if (is_root_rollup) {
148 perform_full_IPA_verification(
builder);
151 BB_ASSERT_EQ(nested_ipa_proofs.size(),
static_cast<size_t>(0),
"IPA proofs present when not expected.");
153 static_cast<size_t>(0),
154 "TripleIPA openings present when not expected.");
158 if (points_accumulator.is_populated()) {
160 inputs.pairing_inputs = points_accumulator;
170 [[maybe_unused]]
bool is_hn_recursion_constraints,
171 [[maybe_unused]]
bool has_ipa_claim)
176 nested_ipa_claims.size(),
static_cast<size_t>(0),
"IPA claims present when not expected in MegaBuilder.");
178 static_cast<size_t>(0),
179 "TripleIPA openings present when not expected in MegaBuilder.");
183 if (!is_hn_recursion_constraints) {
184 if (points_accumulator.is_populated()) {
186 inputs.pairing_inputs = points_accumulator;
#define BB_ASSERT_EQ(actual, expected,...)
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
IPA (inner product argument) commitment scheme class.
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
A simple wrapper around a vector of stdlib field elements representing a proof.
Manages the data that is propagated on the public inputs of an application/function circuit.
The data that is propagated on the public inputs of a rollup circuit.
DefaultIO< MegaCircuitBuilder > AppIO
The data that is propagated on the public inputs of an application/function circuit.
std::vector< fr > HonkProof
BaseTranscript< stdlib::StdlibCodec< stdlib::field_t< UltraCircuitBuilder > >, stdlib::poseidon2< UltraCircuitBuilder > > UltraStdlibTranscript
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Curve grumpkin in circuit setting.
An object storing two EC points that represent the inputs to a pairing check.
Output type for recursive ultra verification.
OpeningClaim< grumpkin< Builder > > ipa_claim
PairingPoints< Curve > points_accumulator
stdlib::Proof< Builder > ipa_proof
void throw_or_abort(std::string const &err)