Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
sumcheck_pg_recursion_constraint.test.cpp
Go to the documentation of this file.
1#include "acir_format.hpp"
12#include "proof_surgeon.hpp"
13
14#include <gtest/gtest.h>
15#include <vector>
16
17using namespace acir_format;
18using namespace bb;
19
20class SumcheckIvcRecursionConstraintTest : public ::testing::Test {
21
22 public:
26 using FF = Flavor::FF;
32
33 static constexpr size_t NUM_TRAILING_KERNELS = 3; // reset, tail, hiding
34
47
48 static std::shared_ptr<VerificationKey> get_verification_key(Builder& builder_in)
49 {
50 // This is a workaround to ensure that the circuit is finalized before we create the verification key
51 // In practice, this should not be needed as the circuit will be finalized when it is accumulated into the IVC
52 // but this is a workaround for the test setup.
53 // Create a copy of the input circuit
55
56 // Deepcopy the opqueue to avoid modifying the original one
60 std::shared_ptr<VerificationKey> vk = std::make_shared<VerificationKey>(prover_instance->get_precomputed());
61 return vk;
62 }
63
65 {
66
67 // Reset kernel
68 EXPECT_EQ(ivc->verification_queue.size(), 1);
69 EXPECT_EQ(ivc->verification_queue[0].type, QUEUE_TYPE::PG);
71
72 // Tail kernel
73 EXPECT_EQ(ivc->verification_queue.size(), 1);
74 EXPECT_EQ(ivc->verification_queue[0].type, QUEUE_TYPE::PG_TAIL);
76
77 // Hiding kernel
78 EXPECT_EQ(ivc->verification_queue.size(), 1);
79 EXPECT_EQ(ivc->verification_queue[0].type, QUEUE_TYPE::PG_FINAL);
81 }
82
83 static UltraCircuitBuilder create_inner_circuit(size_t log_num_gates = 10)
84 {
86
88
89 // Create 2^log_n many add gates based on input log num gates
90 const size_t num_gates = (1 << log_num_gates);
91 for (size_t i = 0; i < num_gates; ++i) {
93 uint32_t a_idx = builder.add_variable(a);
94
97 fr d = a + b + c;
98 uint32_t b_idx = builder.add_variable(b);
99 uint32_t c_idx = builder.add_variable(c);
100 uint32_t d_idx = builder.add_variable(d);
101
102 builder.create_big_add_gate({ a_idx, b_idx, c_idx, d_idx, fr(1), fr(1), fr(1), fr(-1), fr(0) });
103 }
104
105 InnerPairingPoints::add_default_to_public_inputs(builder);
106 return builder;
107 }
108
114 const bool tamper_vk)
115 {
116 AcirProgram program;
117 std::vector<RecursionConstraint> recursion_constraints;
118
119 Builder circuit{ ivc->goblin.op_queue };
122
123 {
124 using RecursiveFlavor = UltraRecursiveFlavor_<Builder>;
128
129 // Create an arbitrary inner circuit
130 auto inner_circuit = create_inner_circuit();
131
132 // Compute native verification key
133 auto prover_instance = std::make_shared<ProverInstance_<UltraFlavor>>(inner_circuit);
134 auto honk_vk = std::make_shared<UltraFlavor::VerificationKey>(prover_instance->get_precomputed());
135 UltraProver prover(prover_instance, honk_vk); // A prerequisite for computing VK
136 auto inner_proof = prover.construct_proof();
137
138 if (tamper_vk) {
139 honk_vk->q_l = g1::one;
140 UltraVerifier_<UltraFlavor> verifier(honk_vk);
141 EXPECT_FALSE(verifier.template verify_proof<DefaultIO>(inner_proof).result);
142 }
143 // Instantiate the recursive verifier using the native verification key
144 auto stdlib_vk_and_hash = std::make_shared<RecursiveFlavor::VKAndHash>(circuit, honk_vk);
145 stdlib::recursion::honk::UltraRecursiveVerifier_<RecursiveFlavor> verifier(&circuit, stdlib_vk_and_hash);
146
147 StdlibProof stdlib_inner_proof(circuit, inner_proof);
148 VerifierOutput output = verifier.template verify_proof<StdlibIO>(stdlib_inner_proof);
149
150 // IO
151 StdlibIO inputs;
152 inputs.pairing_inputs = output.points_accumulator;
153 inputs.set_public(); // propagate resulting pairing points on the public inputs
154 }
155
156 return circuit;
157 }
158
168 {
169 // Assemble simple vectors of witnesses for vkey and proof
170 std::vector<FF> key_witnesses = input.honk_vk->to_field_elements();
171 FF key_hash_witness = input.honk_vk->hash();
172 std::vector<FF> proof_witnesses = input.proof; // proof contains the public inputs at this stage
173
174 // Construct witness indices for each component in the constraint; populate the witness array
175 auto [key_indices, key_hash_index, proof_indices, public_inputs_indices] =
177 witness, proof_witnesses, key_witnesses, key_hash_witness, /*num_public_inputs_to_extract=*/0);
178
179 // The proof type can be either Oink or PG or PG_FINAL
180 PROOF_TYPE proof_type;
181 switch (input.type) {
182 case QUEUE_TYPE::OINK:
183 proof_type = OINK;
184 break;
185 case QUEUE_TYPE::PG:
186 proof_type = PG;
187 break;
188 case QUEUE_TYPE::PG_FINAL:
189 proof_type = PG_FINAL;
190 break;
191 case QUEUE_TYPE::PG_TAIL:
192 proof_type = PG_TAIL;
193 break;
194 default:
195 throw std::runtime_error("Invalid proof type");
196 }
197
198 return RecursionConstraint{
199 .key = key_indices,
200 .proof = {}, // the proof witness indices are not needed in an ivc recursion constraint
201 .public_inputs = public_inputs_indices,
202 .key_hash = key_hash_index,
203 .proof_type = proof_type,
204 };
205 }
206
221 {
222 AcirProgram program;
223
224 // Construct recursion constraints based on the ivc verification queue; populate the witness along the way
225 std::vector<RecursionConstraint> pg_recursion_constraints;
226 pg_recursion_constraints.reserve(verification_queue.size());
227 for (const auto& queue_entry : verification_queue) {
228 pg_recursion_constraints.push_back(create_recursion_constraint(queue_entry, program.witness));
229 }
230
231 // Construct a constraint system containing the business logic and ivc recursion constraints
232 program.constraints.varnum = static_cast<uint32_t>(program.witness.size());
233 program.constraints.num_acir_opcodes = static_cast<uint32_t>(pg_recursion_constraints.size());
234 program.constraints.pg_recursion_constraints = pg_recursion_constraints;
237
238 return program;
239 }
240
242 {
243 // construct a mock kernel program (acir) from the ivc verification queue
244 const ProgramMetadata metadata{ ivc };
245 AcirProgram mock_kernel_program = construct_mock_kernel_program(ivc->verification_queue);
246 auto kernel = acir_format::create_circuit<Builder>(mock_kernel_program, metadata);
247 auto kernel_vk = get_kernel_vk_from_circuit(kernel);
248 ivc->accumulate(kernel, kernel_vk);
249 }
250
252 {
253 // construct a mock kernel program (acir) from the ivc verification queue
254 auto app_circuit = construct_mock_app_circuit(ivc);
255 ivc->accumulate(app_circuit, get_verification_key(app_circuit));
256 }
257
265 AcirProgram& program)
266 {
267 // Create kernel circuit from the kernel program
268 Builder kernel = acir_format::create_circuit<Builder>(program);
269
270 // Manually construct the VK for the kernel circuit
271 auto prover_instance = std::make_shared<SumcheckClientIVC::ProverInstance>(kernel);
272 auto verification_key =
273 std::make_shared<SumcheckClientIVC::MegaVerificationKey>(prover_instance->get_precomputed());
274 return verification_key;
275 }
276
278 {
279 auto prover_instance = std::make_shared<SumcheckClientIVC::ProverInstance>(kernel);
280 auto verification_key =
281 std::make_shared<SumcheckClientIVC::MegaVerificationKey>(prover_instance->get_precomputed());
282 return verification_key;
283 }
284
285 protected:
286 void SetUp() override
287 {
289 // Set the global flag to use SumcheckClientIVC
291 }
292 void TearDown() override
293 {
294 // Reset the flag after tests
296 }
297};
298
303{
305 EXPECT_EQ(merge_proof.size(), MERGE_PROOF_SIZE);
306}
307
313{
314 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/5 /* app, kernel, reset, tail, hiding */);
315
316 // construct a mock app_circuit
317 construct_and_accumulate_mock_app(ivc);
318
319 // Construct kernel consisting only of the kernel completion logic
320 construct_and_accumulate_mock_kernel(ivc);
321
322 // add the trailing kernels
323 construct_and_accumulate_trailing_kernels(ivc);
324
325 auto proof = ivc->prove();
326 EXPECT_TRUE(SumcheckClientIVC::verify(proof, ivc->get_vk()));
327}
328
334{
335 // 4 ciruits and the tail kernel
336 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/7);
337
338 // construct a mock app_circuit
339 construct_and_accumulate_mock_app(ivc);
340
341 const ProgramMetadata metadata{ ivc };
342
343 // Construct kernel_0; consists of a single oink recursive verification for app (plus databus/merge logic)
344 construct_and_accumulate_mock_kernel(ivc);
345
346 // construct a mock app_circuit
347 construct_and_accumulate_mock_app(ivc);
348
349 // Construct and accumulate another Kernel circuit
350 construct_and_accumulate_mock_kernel(ivc);
351
352 // Accumulate the trailing kernels
353 construct_and_accumulate_trailing_kernels(ivc);
354
355 auto proof = ivc->prove();
356 EXPECT_TRUE(SumcheckClientIVC::verify(proof, ivc->get_vk()));
357}
358
359// Test generation of "init" kernel VK via dummy IVC data
360TEST_F(SumcheckIvcRecursionConstraintTest, GenerateInitKernelVKFromConstraints)
361{
362 // First, construct the kernel VK by running the full IVC (accumulate one app and one kernel)
364 {
365 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/5);
366
367 // Construct and accumulate mock app_circuit
368 construct_and_accumulate_mock_app(ivc);
369
370 // Construct and accumulate kernel consisting only of the kernel completion logic
371 construct_and_accumulate_mock_kernel(ivc);
372 expected_kernel_vk = ivc->verification_queue.back().honk_vk;
373 }
374
375 // Now, construct the kernel VK by mocking the post app accumulation state of the IVC
377 {
378 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/5);
379
380 // Construct kernel consisting only of the kernel completion logic
381 acir_format::mock_sumcheck_ivc_accumulation(ivc, SumcheckClientIVC::QUEUE_TYPE::OINK, /*is_kernel=*/false);
382 AcirProgram program = construct_mock_kernel_program(ivc->verification_queue);
383 program.witness = {}; // remove the witness to mimick VK construction context
384
385 kernel_vk = construct_kernel_vk_from_acir_program(program);
386 }
387
388 // Compare the VK constructed via running the IVc with the one constructed via mocking
389 EXPECT_EQ(*kernel_vk.get(), *expected_kernel_vk.get());
390}
391
392// Test generation of "reset" kernel VK via dummy IVC data
393TEST_F(SumcheckIvcRecursionConstraintTest, GenerateResetKernelVKFromConstraints)
394{
395 // First, construct the kernel VK by running the full IVC (accumulate one app and one kernel)
397 {
398 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/5);
399
400 const ProgramMetadata metadata{ ivc };
401
402 // Construct and accumulate mock app_circuit
403 construct_and_accumulate_mock_app(ivc);
404
405 // Construct and accumulate a mock INIT kernel (oink recursion for app accumulation)
406 construct_and_accumulate_mock_kernel(ivc);
407 EXPECT_TRUE(ivc->verification_queue.size() == 1);
408 EXPECT_TRUE(ivc->verification_queue[0].type == bb::SumcheckClientIVC::QUEUE_TYPE::PG);
409
410 // Construct and accumulate a mock RESET kernel (PG recursion for kernel accumulation)
411 construct_and_accumulate_mock_kernel(ivc);
412 expected_kernel_vk = ivc->verification_queue.back().honk_vk;
413 }
414
415 // Now, construct the kernel VK by mocking the IVC state prior to kernel construction
417 {
418 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/5);
419
420 // Construct kernel consisting only of the kernel completion logic
421 acir_format::mock_sumcheck_ivc_accumulation(ivc, SumcheckClientIVC::QUEUE_TYPE::PG, /*is_kernel=*/true);
422 AcirProgram program = construct_mock_kernel_program(ivc->verification_queue);
423 program.witness = {}; // remove the witness to mimick VK construction context
424 kernel_vk = construct_kernel_vk_from_acir_program(program);
425 }
426
427 // Compare the VK constructed via running the IVc with the one constructed via mocking
428 EXPECT_EQ(*kernel_vk.get(), *expected_kernel_vk.get());
429}
430
431// Test generation of "tail" kernel VK via dummy IVC data
432TEST_F(SumcheckIvcRecursionConstraintTest, GenerateTailKernelVKFromConstraints)
433{
434 // First, construct the kernel VK by running the full IVC (accumulate one app and one kernel)
436 {
437 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/5);
438
439 const ProgramMetadata metadata{ ivc };
440
441 // Construct and accumulate mock app_circuit
442 construct_and_accumulate_mock_app(ivc);
443
444 // Construct and accumulate a mock INIT kernel (oink recursion for app accumulation)
445 construct_and_accumulate_mock_kernel(ivc);
446
447 // Construct and accumulate a mock RESET kernel (PG recursion for kernel accumulation)
448 construct_and_accumulate_mock_kernel(ivc);
449
450 // Construct and accumulate a mock TAIL kernel (PG recursion for kernel accumulation)
451 EXPECT_TRUE(ivc->verification_queue.size() == 1);
452 EXPECT_TRUE(ivc->verification_queue[0].type == bb::SumcheckClientIVC::QUEUE_TYPE::PG_TAIL);
453 construct_and_accumulate_mock_kernel(ivc);
454
455 expected_kernel_vk = ivc->verification_queue.back().honk_vk;
456 }
457
458 // Now, construct the kernel VK by mocking the IVC state prior to kernel construction
460 {
461 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/5);
462
463 // Construct kernel consisting only of the kernel completion logic
464 acir_format::mock_sumcheck_ivc_accumulation(ivc, SumcheckClientIVC::QUEUE_TYPE::PG_TAIL, /*is_kernel=*/true);
465 AcirProgram program = construct_mock_kernel_program(ivc->verification_queue);
466 program.witness = {}; // remove the witness to mimick VK construction context
467
468 kernel_vk = construct_kernel_vk_from_acir_program(program);
469 }
470
471 // Compare the VK constructed via running the IVc with the one constructed via mocking
472 EXPECT_EQ(*kernel_vk.get(), *expected_kernel_vk.get());
473}
474
475// Test generation of "inner" kernel VK via dummy IVC data
476TEST_F(SumcheckIvcRecursionConstraintTest, GenerateInnerKernelVKFromConstraints)
477{
478 // First, construct the kernel VK by running the full IVC (accumulate one app and one kernel)
480 {
481 // we have to set the number of circuits one more than the number of circuits we're accumulating as otherwise
482 // the last circuit will be seen as a tail
483 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/6);
484
485 const ProgramMetadata metadata{ ivc };
486
487 { // Construct and accumulate mock app_circuit
488 construct_and_accumulate_mock_app(ivc);
489 }
490
491 // Construct and accumulate a mock INIT kernel (oink recursion for app accumulation)
492 construct_and_accumulate_mock_kernel(ivc);
493
494 { // Construct and accumulate a second mock app_circuit
495 construct_and_accumulate_mock_app(ivc);
496 }
497
498 { // Construct and accumulate a mock INNER kernel (PG recursion for kernel accumulation)
499 EXPECT_TRUE(ivc->verification_queue.size() == 2);
500 EXPECT_TRUE(ivc->verification_queue[1].type == bb::SumcheckClientIVC::QUEUE_TYPE::PG);
501 construct_and_accumulate_mock_kernel(ivc);
502 }
503
504 expected_kernel_vk = ivc->verification_queue.back().honk_vk;
505 }
506
507 // Now, construct the kernel VK by mocking the IVC state prior to kernel construction
509 {
510 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/4);
511
512 // Construct kernel consisting only of the kernel completion logic
513 acir_format::mock_sumcheck_ivc_accumulation(ivc, SumcheckClientIVC::QUEUE_TYPE::PG, /*is_kernel=*/true);
514 acir_format::mock_sumcheck_ivc_accumulation(ivc, SumcheckClientIVC::QUEUE_TYPE::PG, /*is_kernel=*/false);
515 AcirProgram program = construct_mock_kernel_program(ivc->verification_queue);
516 program.witness = {}; // remove the witness to mimick VK construction context
517
518 kernel_vk = construct_kernel_vk_from_acir_program(program);
519 }
520
521 // Compare the VK constructed via running the IVc with the one constructed via mocking
522 EXPECT_EQ(*kernel_vk.get(), *expected_kernel_vk.get());
523}
524
525// Test generation of "hiding" kernel VK via dummy IVC data
526TEST_F(SumcheckIvcRecursionConstraintTest, GenerateHidingKernelVKFromConstraints)
527{
528 // First, construct the kernel VK by running the full IVC
529 std::shared_ptr<MegaFlavor::VerificationKey> expected_hiding_kernel_vk;
530 {
531 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/5);
532 const ProgramMetadata metadata{ ivc };
533
534 {
535 // Construct and accumulate mock app_circuit
536 construct_and_accumulate_mock_app(ivc);
537 }
538
539 {
540 // Construct and accumulate a mock INIT kernel (oink recursion for app accumulation)
541 construct_and_accumulate_mock_kernel(ivc);
542 }
543
544 construct_and_accumulate_trailing_kernels(ivc);
545
546 // The single entry in the verification queue corresponds to the hiding kernel
547 expected_hiding_kernel_vk = ivc->verification_queue[0].honk_vk;
548 }
549
550 // Now, construct the kernel VK by mocking the IVC state prior to kernel construction
552 {
553 // mock IVC accumulation increases the num_circuits_accumualted, hence we need to assume the tail kernel has
554 // been accumulated
555 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits=*/5);
556 // construct a mock tail kernel
558 SumcheckClientIVC::QUEUE_TYPE::PG_FINAL,
559 /*is_kernel=*/true);
560 AcirProgram program = construct_mock_kernel_program(ivc->verification_queue);
561 program.witness = {}; // remove the witness to mimick VK construction context
562 kernel_vk = construct_kernel_vk_from_acir_program(program);
563 }
564
565 // Compare the VK constructed via running the IVc with the one constructed via mocking
566 EXPECT_EQ(*kernel_vk.get(), *expected_hiding_kernel_vk.get());
567}
568
572TEST_F(SumcheckIvcRecursionConstraintTest, RecursiveVerifierAppCircuit)
573{
574 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits*/ 5);
575
576 // construct a mock app_circuit with an UH recursion call
577 Builder app_circuit = construct_mock_UH_recursion_app_circuit(ivc, /*tamper_vk=*/false);
578
579 // Complete instance and generate an oink proof
580 ivc->accumulate(app_circuit, get_verification_key(app_circuit));
581
582 // Construct kernel consisting only of the kernel completion logic
583 construct_and_accumulate_mock_kernel(ivc);
584
585 construct_and_accumulate_trailing_kernels(ivc);
586
587 auto proof = ivc->prove();
588 EXPECT_TRUE(SumcheckClientIVC::verify(proof, ivc->get_vk()));
589}
590
595TEST_F(SumcheckIvcRecursionConstraintTest, RecursiveVerifierAppCircuitFailure)
596{
597 BB_DISABLE_ASSERTS(); // Disable assert in PG prover
598
599 auto ivc = std::make_shared<SumcheckClientIVC>(/*num_circuits*/ 5);
600
601 // construct and accumulate mock app_circuit that has bad pairing point object
602 Builder app_circuit = construct_mock_UH_recursion_app_circuit(ivc, /*tamper_vk=*/true);
603 ivc->accumulate(app_circuit, get_verification_key(app_circuit));
604
605 // Construct kernel consisting only of the kernel completion logic
606 construct_and_accumulate_mock_kernel(ivc);
607
608 // add the trailing kernels
609 construct_and_accumulate_trailing_kernels(ivc);
610
611 // We expect the CIVC proof to fail due to the app with a failed UH recursive verification
612 auto proof = ivc->prove();
613 EXPECT_FALSE(SumcheckClientIVC::verify(proof, ivc->get_vk()));
614}
acir_format::AcirFormatOriginalOpcodeIndices create_empty_original_opcode_indices()
void mock_opcode_indices(acir_format::AcirFormat &constraint_system)
#define BB_DISABLE_ASSERTS()
Definition assert.hpp:32
Shared type definitions for the Barretenberg RPC API.
static void construct_and_accumulate_mock_kernel(std::shared_ptr< SumcheckClientIVC > ivc)
static AcirProgram construct_mock_kernel_program(const VerificationQueue &verification_queue)
Generate an acir program {constraints, witness} for a mock kernel.
static Builder construct_mock_UH_recursion_app_circuit(const std::shared_ptr< SumcheckClientIVC > &ivc, const bool tamper_vk)
Constuct a mock app circuit with a UH recursive verifier.
static void construct_and_accumulate_trailing_kernels(const std::shared_ptr< SumcheckClientIVC > &ivc)
static UltraCircuitBuilder create_inner_circuit(size_t log_num_gates=10)
SumcheckClientIVC::VerificationQueue VerificationQueue
static Builder construct_mock_app_circuit(const std::shared_ptr< SumcheckClientIVC > &ivc)
Constuct a simple arbitrary circuit to represent a mock app circuit.
static std::shared_ptr< SumcheckClientIVC::MegaVerificationKey > construct_kernel_vk_from_acir_program(AcirProgram &program)
Construct a kernel circuit VK from an acir program with IVC recursion constraints.
static std::shared_ptr< SumcheckClientIVC::MegaVerificationKey > get_kernel_vk_from_circuit(Builder &kernel)
static void construct_and_accumulate_mock_app(std::shared_ptr< SumcheckClientIVC > ivc)
static RecursionConstraint create_recursion_constraint(const VerifierInputs &input, SlabVector< FF > &witness)
Create an ACIR RecursionConstraint given the corresponding verifier inputs.
static std::shared_ptr< VerificationKey > get_verification_key(Builder &builder_in)
static RecursionWitnessData populate_recursion_witness_data(bb::SlabVector< FF > &witness, std::vector< FF > &proof_witnesses, const std::vector< FF > &key_witnesses, const FF &key_hash_witness, const size_t num_public_inputs_to_extract)
Populate a witness vector with key, proof, and public inputs; track witness indices for each componen...
MergeProver::MergeProof MergeProof
Definition goblin.hpp:36
static void add_some_ecc_op_gates(MegaBuilder &builder)
Generate a simple test circuit with some ECC op gates and conventional arithmetic gates.
std::shared_ptr< ECCOpQueue > op_queue
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
Curve::ScalarField FF
static void add_arithmetic_gates(Builder &builder, const size_t num_gates=4)
Add a specified number of arithmetic gates to the provided circuit.
std::deque< VerifierInputs > VerificationQueue
stdlib::recursion::PairingPoints< ClientCircuit > PairingPoints
static bool verify(const Proof &proof, const VerificationKey &vk)
The recursive counterpart to the "native" Ultra flavor.
static constexpr element one
Definition group.hpp:46
A simple wrapper around a vector of stdlib field elements representing a proof.
Definition proof.hpp:19
Manages the data that is propagated on the public inputs of an application/function circuit.
AluTraceBuilder builder
Definition alu.test.cpp:123
FF a
FF b
Goblin::MergeProof create_mock_merge_proof()
Create a mock merge proof which has the correct structure but is not necessarily valid.
void mock_sumcheck_ivc_accumulation(const std::shared_ptr< SumcheckClientIVC > &ivc, SumcheckClientIVC::QUEUE_TYPE type, const bool is_kernel)
Populate an IVC instance with data that mimics the state after a single IVC accumulation.
bool USE_SUMCHECK_IVC
Global flag to control whether to use SumcheckClientIVC instead of ClientIVC.
std::filesystem::path bb_crs_path()
void init_file_crs_factory(const std::filesystem::path &path)
TEST_F(BoomerangGoblinRecursiveVerifierTests, graph_description_basic)
Construct and check a goblin recursive verification circuit.
Entry point for Barretenberg command-line interface.
field< Bn254FrParams > fr
Definition fr.hpp:174
std::vector< T, bb::ContainerSlabAllocator< T > > SlabVector
A vector that uses the slab allocator.
MegaCircuitBuilder_< field< Bn254FrParams > > MegaCircuitBuilder
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
std::vector< RecursionConstraint > pg_recursion_constraints
bb::poly_triple_< bb::curve::BN254::ScalarField > PolyTripleConstraint
AcirFormatOriginalOpcodeIndices original_opcode_indices
RecursionConstraint struct contains information required to recursively verify a proof!
std::shared_ptr< MegaVerificationKey > honk_vk
static field random_element(numeric::RNG *engine=nullptr) noexcept
An object storing two EC points that represent the inputs to a pairing check.
static void add_default_to_public_inputs(Builder &builder)
Adds default public inputs to the builder.