Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
verifier_commitment_key.test.cpp
Go to the documentation of this file.
1
4#include <gtest/gtest.h>
5namespace bb {
6template <typename Curve> class RecursiveVeriferCommitmentKeyTest : public testing::Test {
7 public:
8 using Builder = typename Curve::Builder;
9 using NativeEmbeddedCurve = Builder::EmbeddedCurve;
13
18 static void test_equality()
19 {
20 size_t num_points = 4096;
22 native_VK native_vk(num_points);
23 VK recursive_vk(&builder, num_points, native_vk);
24 EXPECT_EQ(native_vk.get_g1_identity(), recursive_vk.get_g1_identity().get_value());
25 auto native_monomial_points = native_vk.get_monomial_points();
26 auto recursive_monomial_points = recursive_vk.get_monomial_points();
27
28 // The recursive verifier commitment key only stores the SRS so we verify against the even indices of the native
29 // key
30 for (size_t i = 0; i < num_points; i += 1) {
31 EXPECT_EQ(native_monomial_points[i], recursive_monomial_points[i].get_value());
32 }
33 }
34};
35
36using Curves = testing::Types<stdlib::grumpkin<UltraCircuitBuilder>, stdlib::grumpkin<MegaCircuitBuilder>>;
37
39
41{
42 TestFixture::test_equality();
43};
44} // namespace bb
static void test_equality()
Instantiante a recursive verifier commitment key from a Grumpkin native key and check consistency.
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
std::vector< Commitment > get_monomial_points() const
AluTraceBuilder builder
Definition alu.test.cpp:123
std::filesystem::path bb_crs_path()
void init_file_crs_factory(const std::filesystem::path &path)
Entry point for Barretenberg command-line interface.
TYPED_TEST_SUITE(ShpleminiTest, TestSettings)
TYPED_TEST(ShpleminiTest, CorrectnessOfMultivariateClaimBatching)
::testing::Types< curve::BN254, curve::Grumpkin > Curves
::testing::Types< curve::BN254, curve::Grumpkin > Curves