Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
sumcheck_client_ivc.test.cpp
Go to the documentation of this file.
14#include "gtest/gtest.h"
15
16using namespace bb;
17
18// static constexpr size_t SMALL_LOG_2_NUM_GATES = 5;
19// TODO(https://github.com/AztecProtocol/barretenberg/issues/1511): The CIVC class should enforce the minimum number of
20// circuits in a test flow.
21
22class SumcheckClientIVCTests : public ::testing::Test {
23 protected:
25
27 using FF = typename Flavor::FF;
36 using CircuitProducer = PrivateFunctionExecutionMockCircuitProducer;
37
38 public:
40 size_t num_app_circuits)
41 {
42 CircuitProducer circuit_producer(num_app_circuits);
43 const size_t num_circuits = circuit_producer.total_num_circuits;
44 SumcheckClientIVC ivc{ num_circuits };
45 for (size_t j = 0; j < num_circuits; ++j) {
46 circuit_producer.construct_and_accumulate_next_circuit(ivc);
47 }
48
49 info("Num ecc rows: ", ivc.goblin.op_queue->get_num_rows());
50 // info("Num ecc ultra ops: ", ivc.goblin.op_queue->get_ultra_ops_table_num_rows());
51
52 return { ivc.prove(), ivc.get_vk() };
53 };
54};
55
61{
62 // BB_DISABLE_ASSERTS();
63 const size_t NUM_APP_CIRCUITS = 15;
64 auto [proof, vk] = SumcheckClientIVCTests::accumulate_and_prove_ivc(NUM_APP_CIRCUITS);
65
66 EXPECT_TRUE(SumcheckClientIVC::verify(proof, vk));
67};
static std::pair< SumcheckClientIVC::Proof, SumcheckClientIVC::VerificationKey > accumulate_and_prove_ivc(size_t num_app_circuits)
PrivateFunctionExecutionMockCircuitProducer CircuitProducer
SumcheckClientIVC::FoldProof FoldProof
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
Curve::ScalarField FF
Curve::AffineElement Commitment
A ProverInstance is normally constructed from a finalized circuit and it contains all the information...
The IVC scheme used by the aztec client for private function execution.
MegaCircuitBuilder ClientCircuit
ProverInstance_< Flavor > ProverInstance
DeciderProver_< Flavor > DeciderProver
static bool verify(const Proof &proof, const VerificationKey &vk)
DeciderVerifier_< Flavor > DeciderVerifier
VerifierInstance_< Flavor > VerifierInstance
The VerifierInstance encapsulates all the necessary information for a Mega Honk Verifier to verify a ...
void info(Args... args)
Definition log.hpp:74
std::filesystem::path bb_crs_path()
void init_file_crs_factory(const std::filesystem::path &path)
Entry point for Barretenberg command-line interface.
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
TEST_F(SumcheckClientIVCTests, BasicStructured)
Using a structured trace allows for the accumulation of circuits of varying size.