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

#include <ultra_flavor.hpp>

Inheritance diagram for bb::UltraFlavor:
bb::UltraKeccakFlavor bb::UltraZKFlavor bb::UltraKeccakZKFlavor

Classes

class  AllEntities_
 A base class labelling all entities (for instance, all of the polynomials used by the prover during sumcheck) in this Honk variant along with particular subsets of interest. More...
 
class  AllValues_
 A field element for each entity of the flavor. These entities represent the prover polynomials evaluated at one point. More...
 
class  CommitmentLabels
 A container for commitment labels. More...
 
class  MaskingEntities
 ZK-specific entities (only used when HasZK = true) More...
 
class  MaskingEntities< DataType, true >
 
class  PrecomputedEntities
 A base class labelling precomputed entities and (ordered) subsets of interest. More...
 
class  ShiftedEntities
 Class for ShiftedEntities, containing shifted witness polynomials. More...
 
class  VerifierCommitments_
 A container encapsulating all the commitments that the verifier receives (to precomputed polynomials and witness polynomials). More...
 
class  WitnessEntities
 Base witness entities. More...
 

Public Types

using CircuitBuilder = UltraCircuitBuilder
 
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::Poseidon2ExternalRelation< FF >, bb::Poseidon2InternalRelation< FF > >
 
using Relations = Relations_< FF >
 
using SubrelationSeparator = FF
 
template<typename DataType >
using AllEntities = AllEntities_< DataType, HasZK >
 
using AllValues = AllValues_< HasZK >
 
template<bool HasZK_ = HasZK>
using ProverPolynomials_ = ProverPolynomialsBase< AllEntities_< Polynomial, HasZK_ >, AllValues_< HasZK_ >, Polynomial >
 A container for polynomials handles.
 
using ProverPolynomials = ProverPolynomials_< HasZK >
 
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 >
 
template<bool HasZK_ = HasZK>
using PartiallyEvaluatedMultivariates_ = PartiallyEvaluatedMultivariatesBase< AllEntities_< Polynomial, HasZK_ >, ProverPolynomials_< HasZK_ >, Polynomial >
 A container for storing the partially evaluated multivariates produced by sumcheck.
 
using PartiallyEvaluatedMultivariates = PartiallyEvaluatedMultivariates_< HasZK >
 
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, HasZK >
 

Static Public Member Functions

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 = CONST_PROOF_SIZE_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 NUM_SUBRELATIONS = compute_number_of_subrelations<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_PRECOMPUTED_ENTITIES = PrecomputedEntities<FF>::_members_size
 
static constexpr size_t NUM_WITNESS_ENTITIES = WitnessEntities<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 RepeatedCommitmentsData REPEATED_COMMITMENTS
 

Detailed Description

Definition at line 32 of file ultra_flavor.hpp.

Member Typedef Documentation

◆ AllEntities

template<typename DataType >
using bb::UltraFlavor::AllEntities = AllEntities_<DataType, HasZK>

Definition at line 225 of file ultra_flavor.hpp.

◆ AllValues

Definition at line 256 of file ultra_flavor.hpp.

◆ CircuitBuilder

◆ Codec

Definition at line 42 of file ultra_flavor.hpp.

◆ Commitment

◆ CommitmentKey

◆ Curve

Definition at line 35 of file ultra_flavor.hpp.

◆ ExtendedEdges

A container for univariates produced during the hot loop in sumcheck.

Definition at line 294 of file ultra_flavor.hpp.

◆ FF

Definition at line 36 of file ultra_flavor.hpp.

◆ GroupElement

Definition at line 37 of file ultra_flavor.hpp.

◆ HashFunction

◆ PartiallyEvaluatedMultivariates

◆ PartiallyEvaluatedMultivariates_

A container for storing the partially evaluated multivariates produced by sumcheck.

Definition at line 280 of file ultra_flavor.hpp.

◆ PCS

Definition at line 39 of file ultra_flavor.hpp.

◆ Polynomial

Definition at line 40 of file ultra_flavor.hpp.

◆ PrecomputedData

◆ ProverPolynomials

◆ ProverPolynomials_

A container for polynomials handles.

Definition at line 262 of file ultra_flavor.hpp.

◆ ProverUnivariates

template<size_t LENGTH>
using bb::UltraFlavor::ProverUnivariates = AllEntities<bb::Univariate<FF, LENGTH> >

A container for univariates used in sumcheck.

During folding and sumcheck, the prover evaluates the relations on these univariates.

Definition at line 289 of file ultra_flavor.hpp.

◆ Relations

Definition at line 74 of file ultra_flavor.hpp.

◆ Relations_

◆ SubrelationSeparator

Definition at line 80 of file ultra_flavor.hpp.

◆ Transcript

◆ VerificationKey

The verification key stores commitments to the precomputed (non-witness) polynomials used by the verifier.

Definition at line 272 of file ultra_flavor.hpp.

◆ VerifierCommitments

◆ VKAndHash

◆ WitnessCommitments

A container for the witness commitments.

Definition at line 299 of file ultra_flavor.hpp.

Member Function Documentation

◆ FINAL_PCS_MSM_SIZE()

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

Definition at line 241 of file ultra_flavor.hpp.

Member Data Documentation

◆ BATCHED_RELATION_PARTIAL_LENGTH

constexpr size_t bb::UltraFlavor::BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 1
staticconstexpr

Definition at line 85 of file ultra_flavor.hpp.

◆ HasZK

constexpr bool bb::UltraFlavor::HasZK = false
staticconstexpr

Definition at line 51 of file ultra_flavor.hpp.

◆ MAX_PARTIAL_RELATION_LENGTH

constexpr size_t bb::UltraFlavor::MAX_PARTIAL_RELATION_LENGTH = compute_max_partial_relation_length<Relations>()
staticconstexpr

Definition at line 76 of file ultra_flavor.hpp.

◆ NUM_ALL_ENTITIES

constexpr size_t bb::UltraFlavor::NUM_ALL_ENTITIES = NUM_UNSHIFTED_ENTITIES + NUM_SHIFTED_ENTITIES
staticconstexpr

Definition at line 232 of file ultra_flavor.hpp.

◆ num_frs_comm

constexpr size_t bb::UltraFlavor::num_frs_comm = FrCodec::calc_num_fields<Commitment>()
staticconstexpr

Definition at line 88 of file ultra_flavor.hpp.

◆ num_frs_fr

constexpr size_t bb::UltraFlavor::num_frs_fr = FrCodec::calc_num_fields<FF>()
staticconstexpr

Definition at line 89 of file ultra_flavor.hpp.

◆ NUM_PRECOMPUTED_ENTITIES

constexpr size_t bb::UltraFlavor::NUM_PRECOMPUTED_ENTITIES = PrecomputedEntities<FF>::_members_size
staticconstexpr

Definition at line 228 of file ultra_flavor.hpp.

◆ NUM_RELATIONS

constexpr size_t bb::UltraFlavor::NUM_RELATIONS = std::tuple_size_v<Relations>
staticconstexpr

Definition at line 86 of file ultra_flavor.hpp.

◆ NUM_SHIFTED_ENTITIES

constexpr size_t bb::UltraFlavor::NUM_SHIFTED_ENTITIES = ShiftedEntities<FF>::_members_size
staticconstexpr

Definition at line 230 of file ultra_flavor.hpp.

◆ NUM_SUBRELATIONS

constexpr size_t bb::UltraFlavor::NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>()
staticconstexpr

Definition at line 78 of file ultra_flavor.hpp.

◆ NUM_UNSHIFTED_ENTITIES

constexpr size_t bb::UltraFlavor::NUM_UNSHIFTED_ENTITIES = NUM_PRECOMPUTED_ENTITIES + NUM_WITNESS_ENTITIES
staticconstexpr

Definition at line 231 of file ultra_flavor.hpp.

◆ NUM_WIRES

constexpr size_t bb::UltraFlavor::NUM_WIRES = CircuitBuilder::NUM_WIRES
staticconstexpr

Definition at line 55 of file ultra_flavor.hpp.

◆ NUM_WITNESS_ENTITIES

constexpr size_t bb::UltraFlavor::NUM_WITNESS_ENTITIES = WitnessEntities<FF>::_members_size
staticconstexpr

Definition at line 229 of file ultra_flavor.hpp.

◆ REPEATED_COMMITMENTS

constexpr RepeatedCommitmentsData bb::UltraFlavor::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 235 of file ultra_flavor.hpp.

◆ USE_PADDING

constexpr bool bb::UltraFlavor::USE_PADDING = true
staticconstexpr

Definition at line 54 of file ultra_flavor.hpp.

◆ USE_SHORT_MONOMIALS

constexpr bool bb::UltraFlavor::USE_SHORT_MONOMIALS = true
staticconstexpr

Definition at line 48 of file ultra_flavor.hpp.

◆ VIRTUAL_LOG_N

constexpr size_t bb::UltraFlavor::VIRTUAL_LOG_N = CONST_PROOF_SIZE_LOG_N
staticconstexpr

Definition at line 46 of file ultra_flavor.hpp.


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