4#include <benchmark/benchmark.h>
6using namespace benchmark;
14constexpr size_t MIN_POLYNOMIAL_DEGREE_LOG2 = 10;
15constexpr size_t MAX_POLYNOMIAL_DEGREE_LOG2 = 16;
20 MIN_POLYNOMIAL_DEGREE_LOG2 + 1);
22static void DoSetup(
const benchmark::State&)
29void ipa_open(State& state)
noexcept
32 for (
auto _ : state) {
34 size_t n = 1 <<
static_cast<size_t>(state.range(0));
37 for (
size_t i = 0; i < n; ++i) {
41 auto eval = poly.evaluate(x);
50 prover_transcripts[
static_cast<size_t>(state.range(0)) - MIN_POLYNOMIAL_DEGREE_LOG2] = prover_transcript;
51 opening_claims[
static_cast<size_t>(state.range(0)) - MIN_POLYNOMIAL_DEGREE_LOG2] = opening_claim;
54void ipa_verify(State& state)
noexcept
56 for (
auto _ : state) {
59 auto prover_transcript = prover_transcripts[
static_cast<size_t>(state.range(0)) - MIN_POLYNOMIAL_DEGREE_LOG2];
60 auto opening_claim = opening_claims[
static_cast<size_t>(state.range(0)) - MIN_POLYNOMIAL_DEGREE_LOG2];
63 verifier_transcript->load_proof(prover_transcript->export_proof());
73 ->DenseRange(MIN_POLYNOMIAL_DEGREE_LOG2, MAX_POLYNOMIAL_DEGREE_LOG2)
77 ->DenseRange(MIN_POLYNOMIAL_DEGREE_LOG2, MAX_POLYNOMIAL_DEGREE_LOG2)
#define ASSERT(expression,...)
CommitmentKey object over a pairing group 𝔾₁.
IPA (inner product argument) commitment scheme class.
Unverified claim (C,r,v) for some witness polynomial p(X) such that.
Opening pair (r,v) for some witness polynomial p(X) such that p(r) = v.
Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x .....
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
RNG & get_debug_randomness(bool reset, std::uint_fast64_t seed)
std::filesystem::path bb_crs_path()
void init_file_crs_factory(const std::filesystem::path &path)
std::shared_ptr< factories::CrsFactory< curve::Grumpkin > > get_grumpkin_crs_factory()
Entry point for Barretenberg command-line interface.
BENCHMARK(vector_of_evaluations) -> DenseRange(15, 21) ->Unit(kMillisecond) ->Iterations(1)
CommitmentKey< Curve > ck
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
static field random_element(numeric::RNG *engine=nullptr) noexcept