Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bbapi.test.cpp
Go to the documentation of this file.
5#include "msgpack/v3/sbuffer_decl.hpp"
6#include <gtest/gtest.h>
7
8using namespace bb;
9
10// Template for testing roundtrip serialization
11template <typename T> class BBApiSerializationTest : public ::testing::Test {};
12
13// Enumerate each command type
14using Commands = ::testing::Types<bbapi::CircuitProve,
26
27// Typed test suites
28template <typename T> class BBApiMsgpack : public ::testing::Test {};
29
31
32// Test roundtrip serialization for UltraHonk commands
33TYPED_TEST(BBApiMsgpack, DefaultConstructorRoundtrip)
34{
35 TypeParam command{};
36 auto [actual_command, expected_command] = msgpack_roundtrip(command);
37 EXPECT_EQ(actual_command, expected_command);
38
39 typename TypeParam::Response response{};
40 auto [actual_response, expected_response] = msgpack_roundtrip(response);
41 EXPECT_EQ(actual_response, expected_response);
43}
::testing::Types< bbapi::CircuitProve, bbapi::CircuitComputeVk, bbapi::CircuitStats, bbapi::CircuitVerify, bbapi::VkAsFields, bbapi::CircuitWriteSolidityVerifier, bbapi::ChonkStart, bbapi::ChonkLoad, bbapi::ChonkAccumulate, bbapi::ChonkProve, bbapi::ChonkComputeVk, bbapi::ChonkCheckPrecomputedVk > Commands
TYPED_TEST_SUITE(BBApiMsgpack, Commands)
TYPED_TEST(BBApiMsgpack, DefaultConstructorRoundtrip)
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
std::string msgpack_schema_to_string(const auto &obj)
Print's an object's derived msgpack schema as a string.
Accumulate the previously loaded circuit into the IVC proof.
Verify that a precomputed verification key matches the circuit.
Compute MegaHonk verification key for a circuit to be accumulated in Chonk.
Load a circuit into the Chonk instance for accumulation.
Generate a proof for all accumulated circuits.
Initialize a new Chonk instance for incremental proof accumulation.
Represents a request to generate a proof. Currently, UltraHonk is the only proving system supported b...
Consolidated command for retrieving circuit information. Combines gate count, circuit size,...
Verify a proof against a verification key and public inputs.
Command to generate Solidity verifier contract.
Convert a verification key to field elements representation. WORKTODO(bbapi): this should become most...
std::pair< T, T > msgpack_roundtrip(const T &object)