Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
hypernova_prover.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Complete, auditors: [Sergei], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6#pragma once
11
12namespace bb {
13
39 public:
41 using FF = Flavor::FF;
51
54
55 HypernovaFoldingProver(std::shared_ptr<Transcript> transcript)
56 : transcript(std::move(transcript)) {};
57
65 const std::shared_ptr<VerificationKey>& honk_vk = nullptr);
66
78 const std::shared_ptr<VerificationKey>& honk_vk = nullptr);
79
85 HonkProof export_proof() { return transcript->export_proof(); };
86
87 private:
88 std::shared_ptr<Transcript> transcript;
89
95 const std::shared_ptr<VerificationKey>& honk_vk);
96
103 template <size_t N>
104 static Polynomial<FF> batch_polynomials(RefArray<Polynomial<FF>, N> polynomials_to_batch,
105 const size_t& full_batched_size,
106 const std::vector<FF>& challenges);
107
112
116 template <size_t N> Commitment batch_mul(const RefArray<Commitment, N>& _points, const std::vector<FF>& scalars);
117};
118
119} // namespace bb
std::shared_ptr< Napi::ThreadSafeFunction > instance
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
HyperNova folding prover. Folds circuit instances into accumulators, deferring PCS verification.
MultilinearBatchingProverClaim Accumulator
std::shared_ptr< Transcript > transcript
HonkProof export_proof()
Export the proof contained in the transcript.
Accumulator sumcheck_output_to_accumulator(MegaSumcheckOutput &sumcheck_output, const std::shared_ptr< ProverInstance > &instance, const std::shared_ptr< VerificationKey > &honk_vk)
Convert the output of the sumcheck run on the incoming instance into an accumulator.
static constexpr size_t NUM_SHIFTED_ENTITIES
std::pair< std::vector< FF >, std::vector< FF > > get_batching_challenges()
Generate the challenges required to batch the incoming instance with the accumulator.
HypernovaFoldingProver(std::shared_ptr< Transcript > transcript)
static constexpr size_t NUM_UNSHIFTED_ENTITIES
Accumulator instance_to_accumulator(const std::shared_ptr< ProverInstance > &instance, const std::shared_ptr< VerificationKey > &honk_vk=nullptr)
Turn an instance into an accumulator by running Sumcheck.
Commitment batch_mul(const RefArray< Commitment, N > &_points, const std::vector< FF > &scalars)
Utility to perform batch mul of commitments.
static Polynomial< FF > batch_polynomials(RefArray< Polynomial< FF >, N > polynomials_to_batch, const size_t &full_batched_size, const std::vector< FF > &challenges)
Batch prover polynomials. Batching happens in place into the first polynomial in the RefArray supplie...
std::pair< HonkProof, Accumulator > fold(Accumulator &&accumulator, const std::shared_ptr< ProverInstance > &instance, const std::shared_ptr< VerificationKey > &honk_vk=nullptr)
Fold an instance into an accumulator.
Curve::ScalarField FF
static constexpr size_t NUM_SHIFTED_ENTITIES
BaseTranscript< Codec, HashFunction > Transcript
VerifierCommitments_< Commitment, VerificationKey, HasZK > VerifierCommitments
Curve::AffineElement Commitment
static constexpr size_t NUM_UNSHIFTED_ENTITIES
NativeVerificationKey_< PrecomputedEntities< Commitment >, Codec, HashFunction, CommitmentKey > VerificationKey
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
Base Native verification key class.
Definition flavor.hpp:172
Class for all the oink rounds, which are shared between the folding prover and ultra prover.
Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x .....
A ProverInstance is normally constructed from a finalized circuit and it contains all the information...
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
Definition ref_array.hpp:22
The implementation of the sumcheck Prover for statements of the form for multilinear polynomials .
Definition sumcheck.hpp:289
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
std::vector< fr > HonkProof
Definition proof.hpp:15
MultilinearBatchingFlavor::ProverClaim MultilinearBatchingProverClaim
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
Prover's claim for multilinear batching - contains polynomials and their evaluation claims.
Contains the evaluations of multilinear polynomials at the challenge point . These are computed by S...