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,
27
28// Typed test suites
29template <typename T> class BBApiMsgpack : public ::testing::Test {};
30
32
33// Test roundtrip serialization for UltraHonk commands
34TYPED_TEST(BBApiMsgpack, DefaultConstructorRoundtrip)
35{
36 TypeParam command{};
37 auto [actual_command, expected_command] = msgpack_roundtrip(command);
38 EXPECT_EQ(actual_command, expected_command);
39
40 typename TypeParam::Response response{};
41 auto [actual_response, expected_response] = msgpack_roundtrip(response);
42 EXPECT_EQ(actual_response, expected_response);
44}
::testing::Types< bbapi::CircuitProve, bbapi::CircuitComputeVk, bbapi::CircuitStats, bbapi::CircuitVerify, bbapi::VkAsFields, bbapi::CircuitWriteSolidityVerifier, bbapi::ClientIvcStart, bbapi::ClientIvcLoad, bbapi::ClientIvcAccumulate, bbapi::ClientIvcProve, bbapi::ClientIvcComputeStandaloneVk, bbapi::ClientIvcComputeIvcVk, bbapi::ClientIvcCheckPrecomputedVk > Commands
TYPED_TEST_SUITE(BBApiMsgpack, Commands)
TYPED_TEST(BBApiMsgpack, DefaultConstructorRoundtrip)
Entry point for Barretenberg command-line interface.
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.
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.
Accumulate the previously loaded circuit into the IVC proof.
Verify that a precomputed verification key matches the circuit.
Compute IVC verification key for the complete proof.
Compute standalone verification key for a circuit.
Load a circuit into the ClientIVC instance for accumulation.
Generate a proof for all accumulated circuits.
Initialize a new ClientIVC instance for incremental proof accumulation.
Convert a verification key to field elements representation. WORKTODO(bbapi): this should become most...
std::pair< T, T > msgpack_roundtrip(const T &object)