Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
ultra_zk_flavor.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Completed, auditors: [Sergei], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8
13
14namespace bb {
15
25class UltraZKFlavor : public UltraFlavor {
26 public:
27 static constexpr bool HasZK = true;
28
29 // gemini_masking_poly: a single committed-witness column added for ZK; not shifted.
30 static constexpr size_t NUM_MASKING_POLYNOMIALS = 1;
31
32 // ZK Sumcheck multiplies the main Honk relation by a sum of multilinear Lagranges over the
33 // disabled rows; this adds one to the per-round univariate length.
36 "LIBRA_UNIVARIATES_LENGTH must be equal to UltraZKFlavor::BATCHED_RELATION_PARTIAL_LENGTH");
37
38 // Switch AllEntities (and downstream containers) to the ZK generated layout, which adds
39 // `gemini_masking_poly`. Inherited members keyed off the non-ZK base are overridden below.
40 template <typename DataType> using AllEntities = UltraFlavor::AllEntities_<DataType, HasZK>;
41
45
46 // Final PCS MSM grows by NUM_LIBRA_COMMITMENTS (3) over the non-ZK shape.
47 static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n = CONST_PROOF_SIZE_LOG_N)
48 {
50 }
51
53
54 static_assert(gemini_masking_layout_consistent<UltraZKFlavor>(),
55 "UltraZKFlavor gemini masking flag must match its entity layout");
56
59
62};
63
64} // namespace bb
A container for storing the partially evaluated multivariates produced by sumcheck.
A container for polynomials handles used by the prover.
A field element for each entity of the flavor. These entities represent the prover polynomials evalua...
static constexpr size_t NUM_UNSHIFTED_ENTITIES
static constexpr size_t NUM_ALL_ENTITIES
static constexpr size_t NUM_WITNESS_ENTITIES
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
std::conditional_t< HasZK_, UltraZKFlavor_Generated::AllEntities< DataType >, UltraFlavor_Generated::AllEntities< DataType > > AllEntities_
Child class of UltraFlavor that runs with ZK Sumcheck.
AllEntities< bb::Univariate< FF, LENGTH > > ProverUnivariates
UltraFlavor::AllEntities_< DataType, HasZK > AllEntities
static constexpr bool HasZK
static constexpr size_t NUM_UNSHIFTED_ENTITIES
static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n=CONST_PROOF_SIZE_LOG_N)
static constexpr size_t NUM_WITNESS_ENTITIES
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr size_t NUM_ALL_ENTITIES
ProverUnivariates< MAX_PARTIAL_RELATION_LENGTH > ExtendedEdges
static constexpr size_t NUM_MASKING_POLYNOMIALS
static constexpr uint32_t LIBRA_UNIVARIATES_LENGTH
Definition bn254.hpp:44
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr size_t NUM_SMALL_IPA_COMMITMENTS