55 static constexpr bool HasZK =
false;
86 template <
typename FF>
107 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
108 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
170 q_poseidon2_external,
171 q_poseidon2_internal,
190 auto get_non_gate_selectors() {
return RefArray{ q_m, q_c, q_l, q_r, q_o, q_4 }; };
201 q_poseidon2_external,
202 q_poseidon2_internal,
238 calldata_read_counts,
242 secondary_calldata_read_counts,
243 secondary_calldata_read_tags,
244 secondary_calldata_inverses,
246 return_data_read_counts,
247 return_data_read_tags,
248 return_data_inverses);
261 static auto get_labels() {
return std::vector<std::string>{}; }
275 template <
typename DataType>
283 return RefArray{ this->ecc_op_wire_1, this->ecc_op_wire_2, this->ecc_op_wire_3, this->ecc_op_wire_4 };
288 this->
calldata, this->calldata_read_counts, this->calldata_read_tags,
289 this->secondary_calldata, this->secondary_calldata_read_counts, this->secondary_calldata_read_tags,
290 this->return_data, this->return_data_read_counts, this->return_data_read_tags
297 this->calldata_inverses,
298 this->secondary_calldata_inverses,
299 this->return_data_inverses,
334 template <
typename DataType,
bool HasZK_ = HasZK>
390 for (
auto& poly : this->get_unshifted()) {
391 if (poly.is_empty()) {
393 poly =
Polynomial{ circuit_size, circuit_size };
407 for (
auto [result_field, polynomial] :
zip_view(result.
get_all(), this->get_all())) {
408 result_field = polynomial[row_idx];
416 for (
auto [result_field, polynomial] :
zip_view(result.
get_sigmas(), this->get_sigmas())) {
417 result_field = polynomial[row_idx];
419 for (
auto [result_field, polynomial] :
zip_view(result.
get_ids(), this->get_ids())) {
420 result_field = polynomial[row_idx];
422 for (
auto [result_field, polynomial] :
zip_view(result.
get_wires(), this->get_wires())) {
423 result_field = polynomial[row_idx];
431 shifted = to_be_shifted.shifted();
437 for (
auto& polynomial : this->
get_all()) {
438 polynomial.increase_virtual_size(size_in);
470 for (
auto& poly : this->
get_all()) {
478 size_t desired_size = full_poly.end_index() / 2 + full_poly.end_index() % 2;
479 poly =
Polynomial(desired_size, circuit_size / 2);
517 lookup_inverses =
"LOOKUP_INVERSES";
518 lookup_read_counts =
"LOOKUP_READ_COUNTS";
519 lookup_read_tags =
"LOOKUP_READ_TAGS";
520 ecc_op_wire_1 =
"ECC_OP_WIRE_1";
521 ecc_op_wire_2 =
"ECC_OP_WIRE_2";
522 ecc_op_wire_3 =
"ECC_OP_WIRE_3";
523 ecc_op_wire_4 =
"ECC_OP_WIRE_4";
525 calldata_read_counts =
"CALLDATA_READ_COUNTS";
526 calldata_read_tags =
"CALLDATA_READ_TAGS";
527 calldata_inverses =
"CALLDATA_INVERSES";
528 secondary_calldata =
"SECONDARY_CALLDATA";
529 secondary_calldata_read_counts =
"SECONDARY_CALLDATA_READ_COUNTS";
530 secondary_calldata_read_tags =
"SECONDARY_CALLDATA_READ_TAGS";
531 secondary_calldata_inverses =
"SECONDARY_CALLDATA_INVERSES";
532 return_data =
"RETURN_DATA";
533 return_data_read_counts =
"RETURN_DATA_READ_COUNTS";
534 return_data_read_tags =
"RETURN_DATA_READ_TAGS";
535 return_data_inverses =
"RETURN_DATA_INVERSES";
543 q_busread =
"Q_BUSREAD";
544 q_lookup =
"Q_LOOKUP";
546 q_delta_range =
"Q_SORT";
547 q_elliptic =
"Q_ELLIPTIC";
548 q_memory =
"Q_MEMORY";
550 q_poseidon2_external =
"Q_POSEIDON2_EXTERNAL";
551 q_poseidon2_internal =
"Q_POSEIDON2_INTERNAL";
564 lagrange_first =
"LAGRANGE_FIRST";
565 lagrange_last =
"LAGRANGE_LAST";
566 lagrange_ecc_op =
"Q_ECC_OP_QUEUE";
573 template <
typename Commitment,
typename VerificationKey,
bool HasZK_ = HasZK>
581 precomputed = precomputed_in;
585 if (witness_commitments.has_value()) {
586 for (
auto [witness, witness_in] :
588 witness = witness_in;
592 this->w_l_shift = witness_commitments->w_l;
593 this->w_r_shift = witness_commitments->w_r;
594 this->w_o_shift = witness_commitments->w_o;
595 this->w_4_shift = witness_commitments->w_4;
596 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 𝔾₁.
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.
DEFINE_FLAVOR_MEMBERS(DataType, z_perm, lookup_inverses, lookup_read_counts, lookup_read_tags, ecc_op_wire_1, ecc_op_wire_2, ecc_op_wire_3, ecc_op_wire_4, calldata, calldata_read_counts, calldata_read_tags, calldata_inverses, secondary_calldata, secondary_calldata_read_counts, secondary_calldata_read_tags, secondary_calldata_inverses, return_data, return_data_read_counts, return_data_read_tags, return_data_inverses)
ZK-specific entities (only used when HasZK = true)
A container for storing the partially evaluated multivariates produced by sumcheck.
PartiallyEvaluatedMultivariates_(const size_t circuit_size)
PartiallyEvaluatedMultivariates_(const ProverPolynomials_< HasZK_ > &full_polynomials, size_t circuit_size)
PartiallyEvaluatedMultivariates_()=default
A base class labelling precomputed entities and (ordered) subsets of interest.
DEFINE_FLAVOR_MEMBERS(DataType, q_m, q_c, q_l, q_r, q_o, q_4, q_busread, 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, lagrange_ecc_op, databus_id) auto get_non_gate_selectors()
bool operator==(const PrecomputedEntities &) const =default
auto get_gate_selectors()
A container for the prover polynomials handles.
void increase_polynomials_virtual_size(const size_t size_in)
size_t get_polynomial_size() const
ProverPolynomials_()=default
ProverPolynomials_ & operator=(ProverPolynomials_ &&o) noexcept=default
ProverPolynomials_(size_t circuit_size)
ProverPolynomials_(const ProverPolynomials_ &o)=delete
ProverPolynomials_ & operator=(const ProverPolynomials_ &)=delete
AllValues_< HasZK_ > get_row_for_permutation_arg(size_t row_idx)
AllValues_< HasZK_ > get_row(size_t row_idx) const
~ProverPolynomials_()=default
ProverPolynomials_(ProverPolynomials_ &&o) noexcept=default
Class for ShiftedEntities, containing the shifted witness 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)
Container for all witness polynomials used/constructed by the prover.
auto get_databus_entities()
auto get_databus_inverses()
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
std::tuple< bb::ArithmeticRelation< FF >, bb::UltraPermutationRelation< FF >, bb::LogDerivLookupRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::NonNativeFieldRelation< FF >, bb::EccOpQueueRelation< FF >, bb::DatabusLookupRelation< FF >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InternalRelation< FF > > Relations_
crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams > HashFunction
static constexpr size_t DECIDER_PROOF_LENGTH(size_t virtual_log_n=VIRTUAL_LOG_N)
static constexpr size_t NUM_SHIFTED_ENTITIES
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
static constexpr size_t NUM_WIRES
static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS(size_t virtual_log_n=VIRTUAL_LOG_N)
static constexpr size_t NUM_SUBRELATIONS
Curve::Element GroupElement
static constexpr size_t OINK_PROOF_LENGTH_WITHOUT_PUB_INPUTS
static constexpr size_t num_frs_fr
static constexpr size_t NUM_RELATIONS
static constexpr size_t NUM_ALL_ENTITIES
static constexpr bool HasZK
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH
static constexpr size_t NUM_WITNESS_ENTITIES
static constexpr size_t VIRTUAL_LOG_N
static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n=VIRTUAL_LOG_N)
bb::Polynomial< FF > Polynomial
Relations_< FF > Relations
static constexpr bool USE_SHORT_MONOMIALS
Curve::AffineElement Commitment
static constexpr bool USE_PADDING
static constexpr size_t NUM_UNSHIFTED_ENTITIES
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr bool has_zero_row
static constexpr size_t num_frs_comm
Base Native verification key class.
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
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 ...
#define DEFINE_COMPOUND_GET_ALL(...)
Entry point for Barretenberg command-line interface.
RefArray< T,(Ns+...)> constexpr concatenate(const RefArray< T, Ns > &... ref_arrays)
Concatenates multiple RefArray objects into a single RefArray.
MegaCircuitBuilder_< field< Bn254FrParams > > MegaCircuitBuilder
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::vector< MemoryValue > calldata
The precomputed data needed to compute a Honk VK.