Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::MegaZKFlavor Class Reference

Child class of MegaFlavor that runs with ZK Sumcheck. More...

#include <mega_zk_flavor.hpp>

Inheritance diagram for bb::MegaZKFlavor:
bb::MegaFlavor

Public Types

using Transcript = NativeTranscript
 
using VKAndHash = MegaFlavor::VKAndHash
 
- Public Types inherited from bb::MegaFlavor
using CircuitBuilder = MegaCircuitBuilder
 
using Curve = curve::BN254
 
using FF = Curve::ScalarField
 
using GroupElement = Curve::Element
 
using Commitment = Curve::AffineElement
 
using PCS = KZG< Curve >
 
using Polynomial = bb::Polynomial< FF >
 
using CommitmentKey = bb::CommitmentKey< Curve >
 
using Codec = FrCodec
 
using HashFunction = crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams >
 
using Transcript = BaseTranscript< Codec, HashFunction >
 
template<typename FF >
using Relations_ = std::tuple< bb::ArithmeticRelation< FF >, bb::UltraPermutationRelation< FF >, bb::LogDerivLookupRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::NonNativeFieldRelation< FF >, bb::EccOpQueueRelation< FF >, bb::DatabusLookupRelation< FF >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InitialExternalRelation< FF >, bb::Poseidon2QuadInternalRelation< FF >, bb::Poseidon2QuadInternalTerminalRelation< FF >, bb::Poseidon2TransitionEntryRelation< FF > >
 
using Relations = Relations_< FF >
 
using SubrelationSeparator = FF
 
template<typename DataType >
using WitnessEntities = WitnessEntities_< DataType >
 
template<typename DataType >
using AllEntities = AllEntities_< DataType >
 
using AllValues = AllEntities_< FF >
 A field element for each entity of the flavor. These entities represent the prover polynomials evaluated at one point.
 
using ProverPolynomials = ProverPolynomialsBase< AllEntities_< Polynomial >, AllValues, Polynomial >
 A container for the prover polynomials handles.
 
using PrecomputedData = PrecomputedData_< Polynomial, NUM_PRECOMPUTED_ENTITIES >
 
using VerificationKey = NativeVerificationKey_< PrecomputedEntities< Commitment >, Codec, HashFunction, CommitmentKey >
 The verification key stores commitments to the precomputed (non-witness) polynomials used by the verifier.
 
using VKAndHash = VKAndHash_< FF, VerificationKey >
 
using PartiallyEvaluatedMultivariates = PartiallyEvaluatedMultivariatesBase< AllEntities_< Polynomial >, ProverPolynomials, Polynomial >
 A container for storing the partially evaluated multivariates produced by sumcheck.
 
template<size_t LENGTH>
using ProverUnivariates = AllEntities< bb::Univariate< FF, LENGTH > >
 A container for univariates used in sumcheck.
 
using ExtendedEdges = ProverUnivariates< MAX_PARTIAL_RELATION_LENGTH >
 A container for univariates produced during the hot loop in sumcheck.
 
using WitnessCommitments = WitnessEntities< Commitment >
 A container for the witness commitments.
 
using VerifierCommitments = VerifierCommitments_< Commitment, VerificationKey >
 

Static Public Member Functions

static constexpr size_t FINAL_PCS_MSM_SIZE (size_t log_n=VIRTUAL_LOG_N)
 
- Static Public Member Functions inherited from bb::MegaFlavor
static constexpr size_t FINAL_PCS_MSM_SIZE (size_t log_n=VIRTUAL_LOG_N)
 

Static Public Attributes

static constexpr size_t VIRTUAL_LOG_N = HIDING_KERNEL_LOG_N
 
static constexpr bool HasZK = true
 
static constexpr size_t TRACE_OFFSET = NUM_DISABLED_ROWS_IN_SUMCHECK
 
static constexpr bool HasGeminiMasking = false
 
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MegaFlavor::BATCHED_RELATION_PARTIAL_LENGTH + 1
 
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
 
- Static Public Attributes inherited from bb::MegaFlavor
static constexpr size_t VIRTUAL_LOG_N = CONST_FOLDING_LOG_N
 
static constexpr bool USE_SHORT_MONOMIALS = true
 
static constexpr bool HasZK = false
 
static constexpr bool USE_PADDING = true
 
static constexpr size_t NUM_WIRES = CircuitBuilder::NUM_WIRES
 
static constexpr size_t MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>()
 
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1
 
static constexpr size_t NUM_RELATIONS = std::tuple_size_v<Relations>
 
static constexpr size_t num_frs_comm = FrCodec::calc_num_fields<Commitment>()
 
static constexpr size_t num_frs_fr = FrCodec::calc_num_fields<FF>()
 
static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>()
 
static constexpr size_t NUM_PRECOMPUTED_ENTITIES = PrecomputedEntities<FF>::_members_size
 
static constexpr size_t NUM_WITNESS_ENTITIES = WireEntities<FF>::_members_size + DerivedEntities<FF>::_members_size
 
static constexpr size_t NUM_SHIFTED_ENTITIES = ShiftedEntities<FF>::_members_size
 
static constexpr size_t NUM_UNSHIFTED_ENTITIES = NUM_PRECOMPUTED_ENTITIES + NUM_WITNESS_ENTITIES
 
static constexpr size_t NUM_ALL_ENTITIES = NUM_UNSHIFTED_ENTITIES + NUM_SHIFTED_ENTITIES
 
static constexpr size_t TRACE_OFFSET = 0
 
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
 

Detailed Description

Child class of MegaFlavor that runs with ZK Sumcheck.

MegaZKFlavor enables ZK sumcheck (Libra masking, row-disabling, extended relation degree) but does NOT include a Gemini masking polynomial in its entities. In the batched Chonk context, the translator's masking polynomial (sized at 2^17 = joint circuit size) serves as the single Gemini masking polynomial for the joint PCS.

Definition at line 22 of file mega_zk_flavor.hpp.

Member Typedef Documentation

◆ Transcript

◆ VKAndHash

Member Function Documentation

◆ FINAL_PCS_MSM_SIZE()

static constexpr size_t bb::MegaZKFlavor::FINAL_PCS_MSM_SIZE ( size_t  log_n = VIRTUAL_LOG_N)
inlinestaticconstexpr

Definition at line 49 of file mega_zk_flavor.hpp.

Member Data Documentation

◆ BATCHED_RELATION_PARTIAL_LENGTH

constexpr size_t bb::MegaZKFlavor::BATCHED_RELATION_PARTIAL_LENGTH = MegaFlavor::BATCHED_RELATION_PARTIAL_LENGTH + 1
staticconstexpr

Definition at line 38 of file mega_zk_flavor.hpp.

◆ HasGeminiMasking

constexpr bool bb::MegaZKFlavor::HasGeminiMasking = false
staticconstexpr

Definition at line 35 of file mega_zk_flavor.hpp.

◆ HasZK

constexpr bool bb::MegaZKFlavor::HasZK = true
staticconstexpr

Definition at line 28 of file mega_zk_flavor.hpp.

◆ REPEATED_COMMITMENTS

constexpr RepeatedCommitmentsData bb::MegaZKFlavor::REPEATED_COMMITMENTS
staticconstexpr
Initial value:
= RepeatedCommitmentsData(
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
static constexpr size_t NUM_SHIFTED_ENTITIES
static constexpr size_t NUM_WITNESS_ENTITIES

Definition at line 45 of file mega_zk_flavor.hpp.

◆ TRACE_OFFSET

constexpr size_t bb::MegaZKFlavor::TRACE_OFFSET = NUM_DISABLED_ROWS_IN_SUMCHECK
staticconstexpr

Definition at line 31 of file mega_zk_flavor.hpp.

◆ VIRTUAL_LOG_N

constexpr size_t bb::MegaZKFlavor::VIRTUAL_LOG_N = HIDING_KERNEL_LOG_N
staticconstexpr

Definition at line 25 of file mega_zk_flavor.hpp.


The documentation for this class was generated from the following file: