56 static constexpr bool HasZK =
false;
89 template <
typename FF>
118 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
119 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
164 q_poseidon2_external,
165 q_poseidon2_internal,
181 auto get_non_gate_selectors() {
return RefArray{ q_m, q_c, q_l, q_r, q_o, q_4 }; }
184 return RefArray{ q_lookup, q_arith, q_delta_range, q_elliptic,
185 q_memory, q_nnf, q_poseidon2_external, q_poseidon2_internal };
203 static auto get_labels() {
return std::vector<std::string>{}; }
227 auto get_wires() {
return RefArray{ w_l, w_r, w_o, w_4 }; };
243 auto get_shifted() {
return RefArray{ w_l_shift, w_r_shift, w_o_shift, w_4_shift, z_perm_shift }; };
255 template <
typename DataType,
bool HasZK_ = HasZK>
310 for (
auto& poly : this->get_unshifted()) {
311 if (poly.is_empty()) {
327 for (
auto [result_field, polynomial] :
zip_view(result.
get_all(), this->get_all())) {
328 result_field = polynomial[row_idx];
336 for (
auto [result_field, polynomial] :
zip_view(result.
get_sigmas(), this->get_sigmas())) {
337 result_field = polynomial[row_idx];
339 for (
auto [result_field, polynomial] :
zip_view(result.
get_ids(), this->get_ids())) {
340 result_field = polynomial[row_idx];
342 for (
auto [result_field, polynomial] :
zip_view(result.get_wires(), this->get_wires())) {
343 result_field = polynomial[row_idx];
352 shifted = to_be_shifted.shifted();
358 for (
auto& polynomial : this->
get_all()) {
359 polynomial.increase_virtual_size(size_in);
383 template <
bool HasZK_ = HasZK>
420 lookup_inverses =
"LOOKUP_INVERSES";
421 lookup_read_counts =
"LOOKUP_READ_COUNTS";
422 lookup_read_tags =
"LOOKUP_READ_TAGS";
430 q_lookup =
"Q_LOOKUP";
432 q_delta_range =
"Q_SORT";
433 q_elliptic =
"Q_ELLIPTIC";
434 q_memory =
"Q_MEMORY";
436 q_poseidon2_external =
"Q_POSEIDON2_EXTERNAL";
437 q_poseidon2_internal =
"Q_POSEIDON2_INTERNAL";
450 lagrange_first =
"LAGRANGE_FIRST";
451 lagrange_last =
"LAGRANGE_LAST";
460 template <
typename Commitment,
typename VerificationKey,
bool HasZK_ = HasZK>
468 precomputed = precomputed_in;
472 if (witness_commitments.has_value()) {
473 for (
auto [witness, witness_in] :
475 witness = witness_in;
479 this->w_l_shift = witness_commitments->w_l;
480 this->w_r_shift = witness_commitments->w_r;
481 this->w_o_shift = witness_commitments->w_o;
482 this->w_4_shift = witness_commitments->w_4;
483 this->z_perm_shift = witness_commitments->z_perm;
#define BB_BENCH_NAME(name)
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
Base Native verification key class.
A container for storing the partially evaluated multivariates produced by sumcheck.
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
static constexpr size_t NUM_WIRES
A base class labelling all entities (for instance, all of the polynomials used by the prover during s...
DEFINE_COMPOUND_GET_ALL(MaskingEntities< DataType, HasZK_ >, PrecomputedEntities< DataType >, WitnessEntities< DataType >, ShiftedEntities< DataType >) auto get_unshifted()
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
A container for commitment labels.
ZK-specific entities (only used when HasZK = true)
A base class labelling precomputed entities and (ordered) subsets of interest.
auto get_gate_selectors()
bool operator==(const PrecomputedEntities &) const =default
DEFINE_FLAVOR_MEMBERS(DataType, q_m, q_c, q_l, q_r, q_o, q_4, q_lookup, q_arith, q_delta_range, q_elliptic, q_memory, q_nnf, q_poseidon2_external, q_poseidon2_internal, sigma_1, sigma_2, sigma_3, sigma_4, id_1, id_2, id_3, id_4, table_1, table_2, table_3, table_4, lagrange_first, lagrange_last) auto get_non_gate_selectors()
A container for polynomials handles.
void increase_polynomials_virtual_size(const size_t size_in)
ProverPolynomials_(const ProverPolynomials_ &o)=delete
AllValues_< HasZK_ > get_row_for_permutation_arg(size_t row_idx)
ProverPolynomials_ & operator=(ProverPolynomials_ &&o) noexcept=default
ProverPolynomials_(ProverPolynomials_ &&o) noexcept=default
AllValues_< HasZK_ > get_row(const size_t row_idx) const
ProverPolynomials_(size_t circuit_size)
ProverPolynomials_()=default
size_t get_polynomial_size() const
ProverPolynomials_ & operator=(const ProverPolynomials_ &)=delete
~ProverPolynomials_()=default
Class for ShitftedEntities, containing shifted witness polynomials.
DEFINE_FLAVOR_MEMBERS(DataType, w_l_shift, w_r_shift, w_o_shift, w_4_shift, z_perm_shift) auto get_shifted()
A container encapsulating all the commitments that the verifier receives (to precomputed polynomials ...
VerifierCommitments_(const std::shared_ptr< VerificationKey > &verification_key, const std::optional< WitnessEntities< Commitment > > &witness_commitments=std::nullopt)
DEFINE_FLAVOR_MEMBERS(DataType, w_l, w_r, w_o, w_4, z_perm, lookup_inverses, lookup_read_counts, lookup_read_tags) auto get_wires()
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams > HashFunction
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr bool USE_PADDING
static constexpr size_t NUM_RELATIONS
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
static constexpr bool HasZK
static constexpr bool is_decider
static constexpr bool USE_SHORT_MONOMIALS
static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n=VIRTUAL_LOG_N)
static constexpr size_t num_frs_comm
Curve::AffineElement Commitment
static constexpr size_t num_frs_fr
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH
static constexpr size_t NUM_SUBRELATIONS
static constexpr size_t VIRTUAL_LOG_N
std::tuple< bb::ArithmeticRelation< FF >, bb::UltraPermutationRelation< FF >, bb::LogDerivLookupRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::NonNativeFieldRelation< FF >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InternalRelation< FF > > Relations_
Curve::Element GroupElement
Relations_< FF > Relations
static constexpr size_t DECIDER_PROOF_LENGTH(size_t virtual_log_n=VIRTUAL_LOG_N)
static constexpr size_t NUM_ALL_ENTITIES
static constexpr size_t OINK_PROOF_LENGTH_WITHOUT_PUB_INPUTS
static constexpr size_t NUM_UNSHIFTED_ENTITIES
static constexpr size_t NUM_SHIFTED_ENTITIES
static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n=VIRTUAL_LOG_N)
static constexpr size_t NUM_WIRES
static constexpr size_t NUM_WITNESS_ENTITIES
Wrapper holding a verification key and its precomputed hash.
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
typename Group::element Element
typename Group::affine_element AffineElement
Base class templates for structures that contain data parameterized by the fundamental polynomials of...
#define DEFINE_FLAVOR_MEMBERS(DataType,...)
Define the body of a flavor class, included each member and a pointer view with which to iterate the ...
Entry point for Barretenberg command-line interface.
UltraCircuitBuilder_< UltraExecutionTraceBlocks > UltraCircuitBuilder
RefArray< T,(Ns+...)> constexpr concatenate(const RefArray< T, Ns > &... ref_arrays)
Concatenates multiple RefArray objects into a single RefArray.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
The precomputed data needed to compute a Honk VK.