Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mega_app_flavor.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8
19
20namespace bb {
21
30 public:
32
38 using PCS = KZG<Curve>;
41 using Codec = FrCodec;
44
45 static constexpr size_t VIRTUAL_LOG_N = CONST_FOLDING_LOG_N;
46 static constexpr bool USE_SHORT_MONOMIALS = true;
47 // opt in to the row-parallel (SIMD) sumcheck path; see SupportsSimdSumcheck in flavor_concepts.hpp
48 static constexpr bool USE_SIMD_SUMCHECK = true;
49 static constexpr bool HasZK = false;
50 static constexpr bool USE_PADDING = true;
51 static constexpr size_t NUM_WIRES = CircuitBuilder::NUM_WIRES;
52
54
55 static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
58 static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>();
60
61 static_assert(NUM_BUS_COLUMNS == 1, "MegaAppFlavor should declare exactly the return_data bus");
62
63 static constexpr size_t TRACE_OFFSET = 0;
64
65 static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n = VIRTUAL_LOG_N)
66 {
67 return NUM_UNSHIFTED_ENTITIES + log_n + 2;
68 }
69
80
83 {
84 static const CommitmentLabels instance = []() {
86 const auto& src = AllEntities<std::string>::get_labels();
87 std::copy(src.begin(), src.end(), result.data.begin());
88 return result;
89 }();
90 return instance;
91 }
92};
93
94} // namespace bb
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
std::tuple< bb::UltraPermutationRelation< FF >, bb::LogDerivLookupRelation< FF >, bb::ArithmeticRelation< FF >, bb::BilinearOrBatchedEqCheckRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::NonNativeFieldRelation< FF >, bb::EccOpQueueRelation< FF >, bb::SingleBusLookupRelation< FF, EntityId::return_data, EntityId::return_data_read_counts, EntityId::return_data_inverses, EntityId::return_data_indicator, EntityId::q_m >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InitialExternalRelation< FF >, bb::Poseidon2QuadInternalRelation< FF >, bb::Poseidon2QuadInternalTerminalRelation< FF >, bb::Poseidon2TransitionEntryRelation< FF > > Relations_
static constexpr size_t NUM_UNSHIFTED_ENTITIES
Mega flavor specialized for Chonk app circuits.
static constexpr size_t NUM_SUBRELATIONS
static constexpr size_t VIRTUAL_LOG_N
ProverPolynomialsBase< AllEntities< Polynomial >, AllValues, Polynomial > ProverPolynomials
Curve::AffineElement Commitment
static constexpr bool USE_SIMD_SUMCHECK
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH
static constexpr size_t NUM_WIRES
Curve::ScalarField FF
AllEntities< FF > AllValues
static constexpr bool USE_PADDING
Relations_< FF > Relations
AllEntities< std::string > CommitmentLabels
static constexpr size_t NUM_RELATIONS
static const CommitmentLabels & commitment_labels()
static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n=VIRTUAL_LOG_N)
static constexpr bool HasZK
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams > HashFunction
static constexpr bool USE_SHORT_MONOMIALS
Curve::Element GroupElement
static constexpr size_t TRACE_OFFSET
static const std::vector< std::string > & get_labels()
Base Native verification key class.
Definition flavor.hpp:138
A container for polynomials handles used by the prover.
Wrapper holding a verification key and its precomputed hash.
Definition flavor.hpp:551
typename Group::element Element
Definition bn254.hpp:21
typename Group::affine_element AffineElement
Definition bn254.hpp:22
bb::fr ScalarField
Definition bn254.hpp:18
Base class templates shared across Honk flavors.
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
MegaCircuitBuilder_< field< Bn254FrParams > > MegaCircuitBuilder
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
The precomputed data needed to compute a Honk VK.
Definition flavor.hpp:87
VectorField result