8#include <gtest/gtest.h>
38 { .ipa_accumulation =
true, .oracle_hash_type =
"poseidon2", .disable_zk =
false },
40 { .ipa_accumulation =
false, .oracle_hash_type =
"poseidon2", .disable_zk =
false },
41 { .ipa_accumulation =
false, .oracle_hash_type =
"poseidon2", .disable_zk =
true },
42 { .ipa_accumulation =
false, .oracle_hash_type =
"keccak", .disable_zk =
false },
43 { .ipa_accumulation =
false, .oracle_hash_type =
"keccak", .disable_zk =
true }
55 .verification_key = vk_response.bytes },
57 .settings = settings }
62 .public_inputs = prove_response.public_inputs,
63 .proof = prove_response.proof,
64 .settings = settings }
67 EXPECT_TRUE(verify_response.verified)
68 <<
"Failed with ipa_accumulation=" << settings.ipa_accumulation
69 <<
", oracle_hash_type=" << settings.oracle_hash_type <<
", disable_zk=" << settings.disable_zk;
78 constexpr size_t num_vks = 8;
83 for (
size_t i = 0; i < num_vks; ++i) {
86 bytecodes[i] = bytecode;
87 witnesses[i] = witness;
95 .oracle_hash_type =
"poseidon2",
96 .disable_zk =
false };
102 .settings = settings }
107 for (
size_t i = 0; i < num_vks; ++i) {
110 .settings = settings }
115 for (
size_t i = 0; i < num_vks; ++i) {
116 EXPECT_FALSE(parallel_vks[i].bytes.empty()) <<
"Parallel VK " << i <<
" is empty";
117 EXPECT_FALSE(sequential_vks[i].bytes.empty()) <<
"Sequential VK " << i <<
" is empty";
120 EXPECT_EQ(parallel_vks[i].bytes, sequential_vks[i].bytes)
121 <<
"Parallel VK " << i <<
" differs from sequential VK " << i;
125 EXPECT_NE(parallel_vks[i].bytes, parallel_vks[0].bytes)
126 <<
"VK " << i <<
" should differ from VK 0 (different circuits)";
UltraHonk-specific command definitions for the Barretenberg RPC API.
static void SetUpTestSuite()
size_t original_concurrency
std::pair< std::vector< uint8_t >, std::vector< uint8_t > > create_simple_circuit_bytecode(size_t num_constraints=1)
Helper function to create a minimal circuit bytecode and witness for testing.
TEST_F(BBApiClientIvcTest, StandaloneVerificationKeySerialization)
std::filesystem::path bb_crs_path()
void init_file_crs_factory(const std::filesystem::path &path)
void set_parallel_for_concurrency(size_t num_cores)
void parallel_for(size_t num_iterations, const std::function< void(size_t)> &func)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::string to_string(bb::avm2::ValueTag tag)
Represents a request to generate a proof. Currently, UltraHonk is the only proving system supported b...
Verify a proof against a verification key and public inputs.
std::vector< uint8_t > verification_key
bool ipa_accumulation
Optional flag to indicate if the proof should be generated with IPA accumulation (i....