Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mega_kernel_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
20
21namespace bb {
22
31 public:
33
39 using PCS = KZG<Curve>;
42 using Codec = FrCodec;
45
46 static constexpr size_t VIRTUAL_LOG_N = CONST_FOLDING_LOG_N;
47 static constexpr bool USE_SHORT_MONOMIALS = true;
48 // opt in to the row-parallel (SIMD) sumcheck path; see SupportsSimdSumcheck in flavor_concepts.hpp
49 static constexpr bool USE_SIMD_SUMCHECK = true;
50 static constexpr bool HasZK = false;
51 static constexpr bool USE_PADDING = true;
52 static constexpr size_t NUM_WIRES = CircuitBuilder::NUM_WIRES;
53
55
56 static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
59 static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>();
61
62 static_assert(NUM_BUS_COLUMNS == bb::NUM_BUS_COLUMNS,
63 "MegaKernelFlavor databus count must match the builder databus");
64
65 static constexpr size_t TRACE_OFFSET = 0;
66
67 static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n = VIRTUAL_LOG_N)
68 {
69 return NUM_UNSHIFTED_ENTITIES + log_n + 2;
70 }
71
82
85 {
86 static const CommitmentLabels instance = []() {
88 const auto& src = AllEntities<std::string>::get_labels();
89 std::copy(src.begin(), src.end(), result.data.begin());
90 return result;
91 }();
92 return instance;
93 }
94};
95
96} // 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 𝔾₁.
static const std::vector< std::string > & get_labels()
std::tuple< bb::ArithmeticRelation< FF >, bb::BilinearOrBatchedEqCheckRelation< FF >, bb::UltraPermutationRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::EccOpQueueRelation< FF >, bb::SingleBusLookupRelation< FF, EntityId::kernel_calldata, EntityId::kernel_calldata_read_counts, EntityId::kernel_calldata_inverses, EntityId::kernel_calldata_indicator, EntityId::q_l >, bb::SingleBusLookupRelation< FF, EntityId::first_app_calldata, EntityId::first_app_calldata_read_counts, EntityId::first_app_calldata_inverses, EntityId::first_app_calldata_indicator, EntityId::q_r >, bb::SingleBusLookupRelation< FF, EntityId::second_app_calldata, EntityId::second_app_calldata_read_counts, EntityId::second_app_calldata_inverses, EntityId::second_app_calldata_indicator, EntityId::q_o >, bb::SingleBusLookupRelation< FF, EntityId::third_app_calldata, EntityId::third_app_calldata_read_counts, EntityId::third_app_calldata_inverses, EntityId::third_app_calldata_indicator, EntityId::q_4 >, bb::SingleBusLookupRelation< FF, EntityId::fourth_app_calldata, EntityId::fourth_app_calldata_read_counts, EntityId::fourth_app_calldata_inverses, EntityId::fourth_app_calldata_indicator, EntityId::q_5 >, bb::SingleBusLookupRelation< FF, EntityId::fifth_app_calldata, EntityId::fifth_app_calldata_read_counts, EntityId::fifth_app_calldata_inverses, EntityId::fifth_app_calldata_indicator, EntityId::q_c >, 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_
Mega flavor specialized for Chonk kernel circuits.
static constexpr bool HasZK
AllEntities< std::string > CommitmentLabels
Curve::AffineElement Commitment
static constexpr bool USE_PADDING
static constexpr size_t NUM_WIRES
static constexpr size_t TRACE_OFFSET
static constexpr size_t VIRTUAL_LOG_N
static constexpr size_t NUM_RELATIONS
static constexpr bool USE_SHORT_MONOMIALS
AllEntities< FF > AllValues
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH
static const CommitmentLabels & commitment_labels()
ProverPolynomialsBase< AllEntities< Polynomial >, AllValues, Polynomial > ProverPolynomials
static constexpr size_t NUM_SUBRELATIONS
static constexpr bool USE_SIMD_SUMCHECK
crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams > HashFunction
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n=VIRTUAL_LOG_N)
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
constexpr size_t NUM_BUS_COLUMNS
The DataBus; facilitates storage of public circuit input/output.
Definition databus.hpp:72
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