Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mega_avm_flavor.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Completed, auditors: [Federico], 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
29 public:
31
37 using PCS = KZG<Curve>;
40 using Codec = FrCodec;
43
44 static constexpr size_t VIRTUAL_LOG_N = MEGA_AVM_LOG_N;
45 static constexpr bool USE_SHORT_MONOMIALS = true;
46 // No USE_SIMD_SUMCHECK: the SIMD sumcheck path is WASM-only today and the AVM proves natively. Opt in
47 // here once native SIMD field operations exist and can be routed through sumcheck's relation evaluation.
48 static constexpr bool HasZK = false;
49 static constexpr bool USE_PADDING = true;
50 static constexpr size_t NUM_WIRES = CircuitBuilder::NUM_WIRES;
51 static constexpr bool UsesEtaPowers = false;
52 static constexpr bool UsesBetaPowers = false;
53
55
56 static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>();
59
60 static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>();
62
63 static_assert(NUM_MASKING_ENTITIES == 0, "MegaAvmFlavor layout must not include masking columns (non-ZK).");
64
65 // Rows reserved at the top of the trace for row-disabling / ZK masking.
66 static constexpr size_t TRACE_OFFSET = 0;
67
68 static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n = VIRTUAL_LOG_N)
69 {
70 return NUM_UNSHIFTED_ENTITIES + log_n + 2;
71 }
72
74
76
78
80
82
85
87
89
91
94 {
95 static const CommitmentLabels instance = []() {
97 const auto& src = AllEntities<std::string>::get_labels();
98 std::copy(src.begin(), src.end(), result.data.begin());
99 return result;
100 }();
101 return instance;
102 }
103};
104
105} // 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 constexpr size_t NUM_MASKING_ENTITIES
static constexpr size_t NUM_UNSHIFTED_ENTITIES
std::tuple< bb::ArithmeticRelation< FF >, bb::UltraPermutationRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EccOpQueueRelation< FF >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InitialExternalRelation< FF >, bb::Poseidon2QuadInternalRelation< FF >, bb::Poseidon2QuadInternalTerminalRelation< FF >, bb::Poseidon2TransitionEntryRelation< FF > > Relations_
A flavor for the AVM recursive verifier circuit arithmetized with Mega.
static constexpr bool USE_PADDING
Relations_< FF > Relations
static constexpr size_t NUM_SUBRELATIONS
ProverPolynomialsBase< AllEntities< Polynomial >, AllValues, Polynomial > ProverPolynomials
static constexpr size_t VIRTUAL_LOG_N
static constexpr size_t NUM_RELATIONS
Curve::ScalarField FF
static constexpr size_t TRACE_OFFSET
Curve::Element GroupElement
static constexpr bool UsesBetaPowers
AllEntities< FF > AllValues
static constexpr bool HasZK
static constexpr size_t NUM_WIRES
Curve::AffineElement Commitment
static constexpr bool USE_SHORT_MONOMIALS
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr bool UsesEtaPowers
static const CommitmentLabels & commitment_labels()
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH
crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams > HashFunction
AllEntities< std::string > CommitmentLabels
static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n=VIRTUAL_LOG_N)
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