6#include <benchmark/benchmark.h>
14using namespace benchmark;
22class ChonkBench :
public benchmark::Fixture {
25 static constexpr size_t NUM_ITERATIONS_MEDIUM_COMPLEXITY = 5;
27 void SetUp([[maybe_unused]] const ::benchmark::State& state)
override
36BENCHMARK_DEFINE_F(ChonkBench, VerificationOnly)(benchmark::State& state)
38 size_t NUM_APP_CIRCUITS = 1;
42 for (
auto _ : state) {
44 benchmark::DoNotOptimize(verifier.verify(proof));
51BENCHMARK_DEFINE_F(ChonkBench, Full)(benchmark::State& state)
53 size_t NUM_APP_CIRCUITS =
static_cast<size_t>(state.range(0));
56 for (
auto _ : state) {
65BENCHMARK_DEFINE_F(ChonkBench, ProofCompress)(benchmark::State& state)
67 size_t NUM_APP_CIRCUITS = 1;
71 for (
auto _ : state) {
79BENCHMARK_DEFINE_F(ChonkBench, ProofDecompress)(benchmark::State& state)
81 size_t NUM_APP_CIRCUITS = 1;
88 for (
auto _ : state) {
93#define ARGS Arg(ChonkBench::NUM_ITERATIONS_MEDIUM_COMPLEXITY)->Arg(2)
95BENCHMARK_REGISTER_F(ChonkBench, Full)->Unit(benchmark::kMillisecond)->ARGS;
96BENCHMARK_REGISTER_F(ChonkBench, VerificationOnly)->Unit(benchmark::kMillisecond);
97BENCHMARK_REGISTER_F(ChonkBench, ProofCompress)->Unit(benchmark::kMillisecond);
98BENCHMARK_REGISTER_F(ChonkBench, ProofDecompress)->Unit(benchmark::kMillisecond);
Verifier for Chonk IVC proofs (both native and recursive).
static std::vector< uint8_t > compress_chonk_proof(const ChonkProof &proof)
static ChonkProof decompress_chonk_proof(const std::vector< uint8_t > &compressed, size_t mega_num_public_inputs)
#define GOOGLE_BB_BENCH_REPORTER(state)
std::filesystem::path bb_crs_path()
void init_file_crs_factory(const std::filesystem::path &path)
Entry point for Barretenberg command-line interface.
std::pair< ChonkProof, std::shared_ptr< MegaZKFlavor::VKAndHash > > accumulate_and_prove_with_precomputed_vks(size_t num_app_circuits, auto &precomputed_vks, const bool large_first_app=true)
Perform a specified number of circuit accumulation rounds.
std::vector< std::shared_ptr< typename MegaFlavor::VerificationKey > > precompute_vks(const size_t num_app_circuits, const bool large_first_app=true)
static constexpr size_t HIDING_KERNEL_PROOF_LENGTH_WITHOUT_PUBLIC_INPUTS