55 static constexpr bool HasZK =
false;
63 template <
typename FF>
84 static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>();
85 static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>();
88 static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>();
125 q_poseidon2_external,
126 q_poseidon2_internal,
145 auto get_non_gate_selectors() {
return RefArray{ q_m, q_c, q_l, q_r, q_o, q_4 }; };
156 q_poseidon2_external,
157 q_poseidon2_internal,
190 calldata_read_counts,
193 secondary_calldata_read_counts,
194 secondary_calldata_inverses,
196 return_data_read_counts,
197 return_data_inverses);
206 template <
typename DataType>
214 return RefArray{ this->ecc_op_wire_1, this->ecc_op_wire_2, this->ecc_op_wire_3, this->ecc_op_wire_4 };
221 if constexpr (bus_idx == 0) {
223 }
else if constexpr (bus_idx == 1) {
224 return RefArray{ this->secondary_calldata, this->secondary_calldata_read_counts };
226 static_assert(bus_idx == 2);
227 return RefArray{ this->return_data, this->return_data_read_counts };
232 if constexpr (bus_idx == 0) {
233 return RefArray{ this->calldata_inverses };
234 }
else if constexpr (bus_idx == 1) {
235 return RefArray{ this->secondary_calldata_inverses };
237 static_assert(bus_idx == 2);
238 return RefArray{ this->return_data_inverses };
245 return concatenate(this->
template databus_entities_for_bus<Is>()...);
252 return concatenate(this->
template databus_inverse_for_bus<Is>()...);
286 template <
typename DataType>
385 lookup_inverses =
"LOOKUP_INVERSES";
386 lookup_read_counts =
"LOOKUP_READ_COUNTS";
387 lookup_read_tags =
"LOOKUP_READ_TAGS";
388 ecc_op_wire_1 =
"ECC_OP_WIRE_1";
389 ecc_op_wire_2 =
"ECC_OP_WIRE_2";
390 ecc_op_wire_3 =
"ECC_OP_WIRE_3";
391 ecc_op_wire_4 =
"ECC_OP_WIRE_4";
393 calldata_read_counts =
"CALLDATA_READ_COUNTS";
394 calldata_inverses =
"CALLDATA_INVERSES";
395 secondary_calldata =
"SECONDARY_CALLDATA";
396 secondary_calldata_read_counts =
"SECONDARY_CALLDATA_READ_COUNTS";
397 secondary_calldata_inverses =
"SECONDARY_CALLDATA_INVERSES";
398 return_data =
"RETURN_DATA";
399 return_data_read_counts =
"RETURN_DATA_READ_COUNTS";
400 return_data_inverses =
"RETURN_DATA_INVERSES";
408 q_busread =
"Q_BUSREAD";
409 q_lookup =
"Q_LOOKUP";
411 q_delta_range =
"Q_SORT";
412 q_elliptic =
"Q_ELLIPTIC";
413 q_memory =
"Q_MEMORY";
415 q_poseidon2_external =
"Q_POSEIDON2_EXTERNAL";
416 q_poseidon2_internal =
"Q_POSEIDON2_INTERNAL";
429 lagrange_first =
"LAGRANGE_FIRST";
430 lagrange_last =
"LAGRANGE_LAST";
431 lagrange_ecc_op =
"Q_ECC_OP_QUEUE";
438 template <
typename Commitment,
typename VerificationKey>
446 precomputed = precomputed_in;
450 if (witness_commitments.has_value()) {
451 for (
auto [witness, witness_in] :
453 witness = witness_in;
457 this->w_l_shift = witness_commitments->w_l;
458 this->w_r_shift = witness_commitments->w_r;
459 this->w_o_shift = witness_commitments->w_o;
460 this->w_4_shift = witness_commitments->w_4;
461 this->z_perm_shift = witness_commitments->z_perm;
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...
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_inverses, secondary_calldata, secondary_calldata_read_counts, secondary_calldata_inverses, return_data, return_data_read_counts, return_data_inverses)
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()
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 databus_entities_for_bus()
auto get_databus_entities()
auto databus_inverse_for_bus()
auto get_databus_inverses()
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
ProverPolynomialsBase< AllEntities_< Polynomial >, AllValues, Polynomial > ProverPolynomials
A container for the prover polynomials handles.
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 NUM_SHIFTED_ENTITIES
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
static constexpr size_t NUM_WIRES
static constexpr size_t NUM_SUBRELATIONS
Curve::Element GroupElement
static constexpr size_t num_frs_fr
AllEntities_< FF > AllValues
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
static constexpr size_t NUM_RELATIONS
static constexpr size_t NUM_ALL_ENTITIES
static constexpr bool HasZK
static constexpr size_t TRACE_OFFSET
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 container for polynomials handles used by the prover.
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.
typename Group::element Element
typename Group::affine_element AffineElement
Base class templates shared across Honk flavors.
#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.