Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mock_circuits_pinning.test.cpp
Go to the documentation of this file.
4
5#include <gtest/gtest.h>
6
7using namespace bb;
8
19
21{
22 const auto run_test = [](bool large) {
23 Goblin goblin;
24 MegaCircuitBuilder app_circuit{ goblin.op_queue };
26 TraceSettings trace_settings{ AZTEC_TRACE_STRUCTURE };
27 auto proving_key = std::make_shared<DeciderProvingKey>(app_circuit, trace_settings);
28 if (large) {
29 EXPECT_EQ(proving_key->log_dyadic_size(), 19);
30 } else {
31 EXPECT_EQ(proving_key->log_dyadic_size(), 19);
32 };
33 };
34 run_test(true);
35 run_test(false);
36}
37
41TEST_F(MegaMockCircuitsPinning, SmallTestStructuredCircuitSize)
42{
43 Goblin goblin;
44 MegaCircuitBuilder app_circuit{ goblin.op_queue };
46 TraceSettings trace_settings{ SMALL_TEST_STRUCTURE };
47 auto proving_key = std::make_shared<DeciderProvingKey>(app_circuit, trace_settings);
48 EXPECT_EQ(proving_key->log_dyadic_size(), 18);
49}
50
51TEST_F(MegaMockCircuitsPinning, AztecStructuredCircuitSize)
52{
53 Goblin goblin;
54 MegaCircuitBuilder app_circuit{ goblin.op_queue };
56 TraceSettings trace_settings{ AZTEC_TRACE_STRUCTURE };
57 auto proving_key = std::make_shared<DeciderProvingKey>(app_circuit, trace_settings);
58 EXPECT_EQ(proving_key->log_dyadic_size(), 18);
59}
For benchmarking, we want to be sure that our mocking functions create circuits of a known size....
A DeciderProvingKey is normally constructed from a finalized circuit and it contains all the informat...
std::shared_ptr< OpQueue > op_queue
Definition goblin.hpp:48
static void construct_mock_app_circuit(MegaBuilder &builder, bool large=false)
Populate a builder with some arbitrary but nontrivial constraints.
static void add_default(Builder &builder)
Add default public inputs when they are not present.
std::filesystem::path bb_crs_path()
void init_file_crs_factory(const std::filesystem::path &path)
Entry point for Barretenberg command-line interface.
TEST_F(IPATest, ChallengesAreZero)
Definition ipa.test.cpp:123
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13