Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
mega_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
11
12namespace bb {
13
18 public:
19 // MegaZK is only used in production to prove the Hiding Kernel
20 static constexpr size_t VIRTUAL_LOG_N = HIDING_KERNEL_LOG_N;
21
22 // Indicates that this flavor runs with ZK Sumcheck.
23 static constexpr bool HasZK = true;
24
25 // The number of entities added for ZK (gemini_masking_poly)
26 static constexpr size_t NUM_MASKING_POLYNOMIALS = 1;
27
28 // The degree has to be increased because the relation is multiplied by the Row Disabling Polynomial
31 "LIBRA_UNIVARIATES_LENGTH must be equal to MegaZKFlavor::BATCHED_RELATION_PARTIAL_LENGTH");
32
33 // Override AllEntities to use ZK version (includes gemini_masking_poly via MaskingEntities)
34 template <typename DataType> using AllEntities = MegaFlavor::AllEntities_<DataType, HasZK>;
35
36 // NUM_WITNESS_ENTITIES includes gemini_masking_poly
38 // NUM_ALL_ENTITIES includes gemini_masking_poly
40 // NUM_UNSHIFTED_ENTITIES includes gemini_masking_poly
42
43 // Size of the final PCS MSM for ZK = non-ZK size + NUM_LIBRA_COMMITMENTS (3)
44 static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n = MegaFlavor::VIRTUAL_LOG_N)
45 {
46 return NUM_UNSHIFTED_ENTITIES + log_n + 2 + NUM_LIBRA_COMMITMENTS;
47 }
48
53
54 // Override ProverUnivariates and ExtendedEdges to include gemini_masking_poly
57
60};
61
62} // namespace bb
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
A base class labelling all entities (for instance, all of the polynomials used by the prover during s...
static constexpr size_t NUM_ALL_ENTITIES
static constexpr size_t NUM_WITNESS_ENTITIES
static constexpr size_t VIRTUAL_LOG_N
static constexpr size_t NUM_UNSHIFTED_ENTITIES
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
VKAndHash_< FF, VerificationKey > VKAndHash
Child class of MegaFlavor that runs with ZK Sumcheck.
static constexpr size_t NUM_UNSHIFTED_ENTITIES
static constexpr bool HasZK
static constexpr size_t NUM_MASKING_POLYNOMIALS
static constexpr size_t FINAL_PCS_MSM_SIZE(size_t log_n=MegaFlavor::VIRTUAL_LOG_N)
static constexpr size_t NUM_WITNESS_ENTITIES
static constexpr size_t NUM_ALL_ENTITIES
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH
static constexpr size_t VIRTUAL_LOG_N
A container for storing the partially evaluated multivariates produced by sumcheck.
A container for polynomials handles used by the prover.
Wrapper holding a verification key and its precomputed hash.
Definition flavor.hpp:541
static constexpr uint32_t LIBRA_UNIVARIATES_LENGTH
Definition bn254.hpp:44
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
BaseTranscript< FrCodec, bb::crypto::Poseidon2< bb::crypto::Poseidon2Bn254ScalarFieldParams > > NativeTranscript