3#include "gtest/gtest.h"
39 unshifted_polynomial.increase_virtual_size(1 <<
static_cast<uint
>(accumulator.
challenge.size()));
40 shifted_polynomial.increase_virtual_size(1 <<
static_cast<uint
>(accumulator.
challenge.size()));
42 info(
"Mismatch between batched unshifted evaluation and evaluation of the batched unshifted polynomial.");
46 info(
"Mismatch between batched shifted evaluation and evaluation of the batched shifted polynomial.");
50 info(
"Mismatch between the commitment to the batched unshifted polynomial and the batched unshifted "
55 info(
"Mismatch between the commitment to the batched shifted polynomial and the batched shifted "
93 auto [_, folded_accumulator] = folding_prover.
fold(accumulator, incoming_instance);
95 return folded_accumulator;
101 auto instance = generate_new_instance();
107 EXPECT_TRUE(validate_accumulator(accumulator));
112 auto folded_accumulator = test_folding(TamperingMode::None);
113 EXPECT_TRUE(validate_accumulator(folded_accumulator));
118 auto folded_accumulator = test_folding(TamperingMode::Accumulator);
119 EXPECT_FALSE(validate_accumulator(folded_accumulator));
static bool validate_accumulator(HypernovaFoldingProver::Accumulator &accumulator)
static std::shared_ptr< ProverInstance > generate_new_instance(size_t log_num_gates=4)
static void tampering(HypernovaFoldingProver::Accumulator &accumulator, const TamperingMode &mode)
static void SetUpTestSuite()
HypernovaFoldingProver::Flavor::CommitmentKey CommitmentKey
static HypernovaFoldingProver::Accumulator test_folding(const TamperingMode &mode)
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
std::pair< HonkProof, Accumulator > fold(const Accumulator &accumulator, const std::shared_ptr< ProverInstance > &instance)
Fold an instance into an accumulator. Folding happens in place.
Flavor::Transcript Transcript
ProverInstance_< Flavor > ProverInstance
Accumulator instance_to_accumulator(const std::shared_ptr< ProverInstance > &instance)
Turn an instance into an accumulator by running Sumcheck.
bb::CommitmentKey< Curve > CommitmentKey
MegaCircuitBuilder CircuitBuilder
static void add_arithmetic_gates_with_public_inputs(Builder &builder, const size_t num_gates=4)
Add a specified number of arithmetic gates (with public inputs) to the provided circuit.
static void add_lookup_gates(Builder &builder, size_t num_iterations=1)
Add lookup gates using the uint32 XOR lookup table (table size 4096)
static void add_arithmetic_gates(Builder &builder, const size_t num_gates=4)
Add a specified number of arithmetic gates to the provided circuit.
Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x .....
Fr & at(size_t index)
Our mutable accessor, unlike operator[]. We abuse precedent a bit to differentiate at() and operator[...
A ProverInstance is normally constructed from a finalized circuit and it contains all the information...
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)
CommitmentKey< Curve > ck
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
FF non_shifted_evaluation
Polynomial shifted_polynomial
std::vector< FF > challenge
Commitment shifted_commitment
Commitment non_shifted_commitment
Polynomial non_shifted_polynomial
static field random_element(numeric::RNG *engine=nullptr) noexcept