56 static constexpr bool HasZK =
false;
87 template <
typename FF>
108 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
109 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
169 q_poseidon2_external,
170 q_poseidon2_internal,
189 auto get_non_gate_selectors() {
return RefArray{ q_m, q_c, q_l, q_r, q_o, q_4 }; };
200 q_poseidon2_external,
201 q_poseidon2_internal,
237 calldata_read_counts,
241 secondary_calldata_read_counts,
242 secondary_calldata_read_tags,
243 secondary_calldata_inverses,
245 return_data_read_counts,
246 return_data_read_tags,
247 return_data_inverses);
260 static auto get_labels() {
return std::vector<std::string>{}; }
274 template <
typename DataType>
282 return RefArray{ this->ecc_op_wire_1, this->ecc_op_wire_2, this->ecc_op_wire_3, this->ecc_op_wire_4 };
287 this->
calldata, this->calldata_read_counts, this->calldata_read_tags,
288 this->secondary_calldata, this->secondary_calldata_read_counts, this->secondary_calldata_read_tags,
289 this->return_data, this->return_data_read_counts, this->return_data_read_tags
296 this->calldata_inverses,
297 this->secondary_calldata_inverses,
298 this->return_data_inverses,
333 template <
typename DataType,
bool HasZK_ = HasZK>
389 for (
auto& poly : this->get_unshifted()) {
390 if (poly.is_empty()) {
392 poly =
Polynomial{ circuit_size, circuit_size };
406 for (
auto [result_field, polynomial] :
zip_view(result.
get_all(), this->get_all())) {
407 result_field = polynomial[row_idx];
415 for (
auto [result_field, polynomial] :
zip_view(result.
get_sigmas(), this->get_sigmas())) {
416 result_field = polynomial[row_idx];
418 for (
auto [result_field, polynomial] :
zip_view(result.
get_ids(), this->get_ids())) {
419 result_field = polynomial[row_idx];
421 for (
auto [result_field, polynomial] :
zip_view(result.
get_wires(), this->get_wires())) {
422 result_field = polynomial[row_idx];
430 shifted = to_be_shifted.shifted();
436 for (
auto& polynomial : this->
get_all()) {
437 polynomial.increase_virtual_size(size_in);
462 template <
bool HasZK_ = HasZK>
499 lookup_inverses =
"LOOKUP_INVERSES";
500 lookup_read_counts =
"LOOKUP_READ_COUNTS";
501 lookup_read_tags =
"LOOKUP_READ_TAGS";
502 ecc_op_wire_1 =
"ECC_OP_WIRE_1";
503 ecc_op_wire_2 =
"ECC_OP_WIRE_2";
504 ecc_op_wire_3 =
"ECC_OP_WIRE_3";
505 ecc_op_wire_4 =
"ECC_OP_WIRE_4";
507 calldata_read_counts =
"CALLDATA_READ_COUNTS";
508 calldata_read_tags =
"CALLDATA_READ_TAGS";
509 calldata_inverses =
"CALLDATA_INVERSES";
510 secondary_calldata =
"SECONDARY_CALLDATA";
511 secondary_calldata_read_counts =
"SECONDARY_CALLDATA_READ_COUNTS";
512 secondary_calldata_read_tags =
"SECONDARY_CALLDATA_READ_TAGS";
513 secondary_calldata_inverses =
"SECONDARY_CALLDATA_INVERSES";
514 return_data =
"RETURN_DATA";
515 return_data_read_counts =
"RETURN_DATA_READ_COUNTS";
516 return_data_read_tags =
"RETURN_DATA_READ_TAGS";
517 return_data_inverses =
"RETURN_DATA_INVERSES";
525 q_busread =
"Q_BUSREAD";
526 q_lookup =
"Q_LOOKUP";
528 q_delta_range =
"Q_SORT";
529 q_elliptic =
"Q_ELLIPTIC";
530 q_memory =
"Q_MEMORY";
532 q_poseidon2_external =
"Q_POSEIDON2_EXTERNAL";
533 q_poseidon2_internal =
"Q_POSEIDON2_INTERNAL";
546 lagrange_first =
"LAGRANGE_FIRST";
547 lagrange_last =
"LAGRANGE_LAST";
548 lagrange_ecc_op =
"Q_ECC_OP_QUEUE";
555 template <
typename Commitment,
typename VerificationKey,
bool HasZK_ = HasZK>
563 precomputed = precomputed_in;
567 if (witness_commitments.has_value()) {
568 for (
auto [witness, witness_in] :
570 witness = witness_in;
574 this->w_l_shift = witness_commitments->w_l;
575 this->w_r_shift = witness_commitments->w_r;
576 this->w_o_shift = witness_commitments->w_o;
577 this->w_4_shift = witness_commitments->w_4;
578 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 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)
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 size_t num_frs_comm
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
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.