53 static constexpr bool HasZK =
false;
76 template <
typename FF>
99 static constexpr size_t num_frs_comm = bb::field_conversion::calc_num_bn254_frs<Commitment>();
100 static constexpr size_t num_frs_fr = bb::field_conversion::calc_num_bn254_frs<FF>();
128 template <
size_t NUM_KEYS>
130 decltype(create_protogalaxy_tuple_of_tuples_of_univariates<Relations, NUM_KEYS>());
132 template <
size_t NUM_KEYS>
162 q_poseidon2_external,
163 q_poseidon2_internal,
195 q_poseidon2_external,
196 q_poseidon2_internal,
232 calldata_read_counts,
236 secondary_calldata_read_counts,
237 secondary_calldata_read_tags,
238 secondary_calldata_inverses,
240 return_data_read_counts,
241 return_data_read_tags,
242 return_data_inverses);
251 template <
typename DataType>
259 return RefArray{ this->ecc_op_wire_1, this->ecc_op_wire_2, this->ecc_op_wire_3, this->ecc_op_wire_4 };
264 this->
calldata, this->calldata_read_counts, this->calldata_read_tags,
265 this->secondary_calldata, this->secondary_calldata_read_counts, this->secondary_calldata_read_tags,
266 this->return_data, this->return_data_read_counts, this->return_data_read_tags
273 this->calldata_inverses,
274 this->secondary_calldata_inverses,
275 this->return_data_inverses,
288 this->lookup_inverses,
289 this->lookup_read_counts,
290 this->lookup_read_tags,
296 this->calldata_read_counts,
297 this->calldata_read_tags,
298 this->calldata_inverses,
299 this->secondary_calldata,
300 this->secondary_calldata_read_counts,
301 this->secondary_calldata_read_tags,
302 this->secondary_calldata_inverses,
304 this->return_data_read_counts,
305 this->return_data_read_tags,
306 this->return_data_inverses);
332 template <
typename DataType>
377 if (poly.is_empty()) {
379 poly =
Polynomial{ circuit_size, circuit_size };
393 for (
auto [result_field, polynomial] :
zip_view(result.get_all(), this->get_all())) {
394 result_field = polynomial[row_idx];
403 result_field = polynomial[row_idx];
406 result_field = polynomial[row_idx];
409 result_field = polynomial[row_idx];
417 shifted = to_be_shifted.shifted();
423 for (
auto& polynomial : this->get_all()) {
424 polynomial.increase_virtual_size(size_in);
467 commitment = commitment_key.commit(polynomial);
489 q_poseidon2_external,
490 q_poseidon2_internal,
518 for (
auto& poly : this->get_all()) {
524 for (
auto [poly, full_poly] :
zip_view(get_all(), full_polynomials.get_all())) {
526 size_t desired_size = full_poly.end_index() / 2 + full_poly.end_index() % 2;
527 poly =
Polynomial(desired_size, circuit_size / 2);
543 template <
size_t LENGTH,
size_t SKIP_COUNT>
571 lookup_inverses =
"LOOKUP_INVERSES";
572 lookup_read_counts =
"LOOKUP_READ_COUNTS";
573 lookup_read_tags =
"LOOKUP_READ_TAGS";
574 ecc_op_wire_1 =
"ECC_OP_WIRE_1";
575 ecc_op_wire_2 =
"ECC_OP_WIRE_2";
576 ecc_op_wire_3 =
"ECC_OP_WIRE_3";
577 ecc_op_wire_4 =
"ECC_OP_WIRE_4";
579 calldata_read_counts =
"CALLDATA_READ_COUNTS";
580 calldata_read_tags =
"CALLDATA_READ_TAGS";
581 calldata_inverses =
"CALLDATA_INVERSES";
582 secondary_calldata =
"SECONDARY_CALLDATA";
583 secondary_calldata_read_counts =
"SECONDARY_CALLDATA_READ_COUNTS";
584 secondary_calldata_read_tags =
"SECONDARY_CALLDATA_READ_TAGS";
585 secondary_calldata_inverses =
"SECONDARY_CALLDATA_INVERSES";
586 return_data =
"RETURN_DATA";
587 return_data_read_counts =
"RETURN_DATA_READ_COUNTS";
588 return_data_read_tags =
"RETURN_DATA_READ_TAGS";
589 return_data_inverses =
"RETURN_DATA_INVERSES";
597 q_busread =
"Q_BUSREAD";
598 q_lookup =
"Q_LOOKUP";
600 q_delta_range =
"Q_SORT";
601 q_elliptic =
"Q_ELLIPTIC";
602 q_memory =
"Q_MEMORY";
604 q_poseidon2_external =
"Q_POSEIDON2_EXTERNAL";
605 q_poseidon2_internal =
"Q_POSEIDON2_INTERNAL";
618 lagrange_first =
"LAGRANGE_FIRST";
619 lagrange_last =
"LAGRANGE_LAST";
620 lagrange_ecc_op =
"Q_ECC_OP_QUEUE";
627 template <
typename Commitment,
typename VerificationKey>
635 precomputed = precomputed_in;
639 if (witness_commitments.has_value()) {
640 for (
auto [witness, witness_in] :
642 witness = witness_in;
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
static constexpr CircuitType CIRCUIT_TYPE
A base class labelling all entities (for instance, all of the polynomials used by the prover during s...
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)
A container for storing the partially evaluated multivariates produced by sumcheck.
PartiallyEvaluatedMultivariates(const size_t circuit_size)
PartiallyEvaluatedMultivariates(const ProverPolynomials &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) static const expr CircuitType CIRCUIT_TYPE
bool operator==(const PrecomputedEntities &) const =default
auto get_non_gate_selectors()
auto get_gate_selectors()
A container for the prover polynomials handles.
AllValues get_row(size_t row_idx) const
void increase_polynomials_virtual_size(const size_t size_in)
~ProverPolynomials()=default
ProverPolynomials(const ProverPolynomials &o)=delete
ProverPolynomials & operator=(ProverPolynomials &&o) noexcept=default
ProverPolynomials & operator=(const ProverPolynomials &)=delete
size_t get_polynomial_size() const
ProverPolynomials(size_t circuit_size)
AllValues get_row_for_permutation_arg(size_t row_idx)
ProverPolynomials(ProverPolynomials &&o) noexcept=default
ProverPolynomials()=default
Class for ShiftedEntities, containing the shifted witness polynomials.
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
VerificationKey(const PrecomputedData &precomputed)
VerificationKey(const size_t circuit_size, const size_t num_public_inputs)
static constexpr size_t VERIFICATION_KEY_LENGTH
VerificationKey()=default
void set_metadata(const MetaData &metadata)
MSGPACK_FIELDS(log_circuit_size, num_public_inputs, pub_inputs_offset, 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)
std::true_type MSGPACK_NO_STATIC_CHECK
VerificationKey(const VerificationKey &vk)=default
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_inverses()
MSGPACK_FIELDS(this->w_l, this->w_r, this->w_o, this->w_4, this->z_perm, this->lookup_inverses, this->lookup_read_counts, this->lookup_read_tags, this->ecc_op_wire_1, this->ecc_op_wire_2, this->ecc_op_wire_3, this->ecc_op_wire_4, this->calldata, this->calldata_read_counts, this->calldata_read_tags, this->calldata_inverses, this->secondary_calldata, this->secondary_calldata_read_counts, this->secondary_calldata_read_tags, this->secondary_calldata_inverses, this->return_data, this->return_data_read_counts, this->return_data_read_tags, this->return_data_inverses)
auto get_databus_entities()
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
decltype(create_protogalaxy_tuple_of_tuples_of_univariates< Relations, NUM_KEYS, true >()) ProtogalaxyTupleOfTuplesOfUnivariates
static constexpr size_t DECIDER_PROOF_LENGTH(size_t virtual_log_n=VIRTUAL_LOG_N)
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)
std::array< FF, NUM_SUBRELATIONS - 1 > SubrelationSeparators
static constexpr size_t MAX_TOTAL_RELATION_LENGTH
decltype(create_protogalaxy_tuple_of_tuples_of_univariates< Relations, NUM_KEYS >()) ProtogalaxyTupleOfTuplesOfUnivariatesNoOptimisticSkipping
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 NUM_SHIFTED_WITNESSES
static constexpr size_t 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 BATCHED_RELATION_PARTIAL_LENGTH
static constexpr bool has_zero_row
static constexpr size_t num_frs_comm
static constexpr size_t NUM_FOLDED_ENTITIES
std::tuple< bb::UltraArithmeticRelation< 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_
Base Native verification key class.
uint64_t log_circuit_size
uint64_t pub_inputs_offset
uint64_t num_public_inputs
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
typename Group::element Element
typename Group::affine_element AffineElement
constexpr size_t NUM_KEYS
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(...)
constexpr T get_msb(const T in)
Entry point for Barretenberg command-line interface.
constexpr auto create_protogalaxy_tuple_of_tuples_of_univariates()
Utility function to construct a container for the subrelation accumulators of Protogalaxy folding.
RefArray< T,(Ns+...)> constexpr concatenate(const RefArray< T, Ns > &... ref_arrays)
Concatenates multiple RefArray objects into a single RefArray.
MegaCircuitBuilder_< field< Bn254FrParams > > MegaCircuitBuilder
BaseTranscript< NativeTranscriptParams > NativeTranscript
VerifierCommitmentKey< Curve > vk
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
#define PROFILE_THIS_NAME(name)
std::vector< FF > calldata
The precomputed data needed to compute a Honk VK.
RefArray< Polynomial, NUM_PRECOMPUTED_ENTITIES > polynomials