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::UltraFlavor_Generated bb::UltraKeccakFlavor bb::UltraZKFlavor bb::UltraKeccakZKFlavor

Classes

class  AllValues_
 A field element for each entity of the flavor. These entities represent the prover polynomials evaluated at one point. 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 >
 
using Generated = UltraFlavor_Generated
 
using Relations = Relations_< FF >
 
using SubrelationSeparator = FF
 
template<typename DataType , bool HasZK_ = HasZK>
using AllEntities_ = std::conditional_t< HasZK_, UltraZKFlavor_Generated::AllEntities< DataType >, UltraFlavor_Generated::AllEntities< DataType > >
 
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 CommitmentLabels = AllEntities< std::string >
 
- Public Types inherited from bb::UltraFlavor_Generated
enum class  EntityId : uint16_t {
  sigma_1 = 0 , sigma_2 = 1 , sigma_3 = 2 , sigma_4 = 3 ,
  id_1 = 4 , id_2 = 5 , id_3 = 6 , id_4 = 7 ,
  lagrange_first = 8 , lagrange_last = 9 , q_lookup = 10 , table_1 = 11 ,
  table_2 = 12 , table_3 = 13 , table_4 = 14 , q_m = 15 ,
  q_r = 16 , q_o = 17 , q_c = 18 , q_l = 19 ,
  q_4 = 20 , q_arith = 21 , q_delta_range = 22 , q_elliptic = 23 ,
  q_memory = 24 , q_nnf = 25 , q_poseidon2_external = 26 , q_poseidon2_internal = 27 ,
  w_l = 28 , w_r = 29 , w_o = 30 , w_4 = 31 ,
  z_perm = 32 , lookup_inverses = 33 , lookup_read_counts = 34 , lookup_read_tags = 35 ,
  w_l_shift = 36 , w_r_shift = 37 , w_o_shift = 38 , w_4_shift = 39 ,
  z_perm_shift = 40
}
 
template<typename FF >
using Relations_ = std::tuple< bb::UltraPermutationRelation< FF >, bb::LogDerivLookupRelation< FF >, bb::ArithmeticRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::NonNativeFieldRelation< FF >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InternalRelation< FF > >
 

Static Public Member Functions

static constexpr size_t FINAL_PCS_MSM_SIZE (size_t log_n=VIRTUAL_LOG_N)
 
static const CommitmentLabelscommitment_labels ()
 
- Static Public Member Functions inherited from bb::UltraFlavor_Generated
template<typename TraceBlocks >
static auto get_gate_blocks (TraceBlocks &blocks)
 
template<typename TraceBlocks >
static auto get_gate_blocks (TraceBlocks const &blocks)
 
template<typename TraceBlock >
static auto get_block_non_gate_selectors (TraceBlock &block)
 

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 USE_SIMD_SUMCHECK = 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 TRACE_OFFSET = NUM_DISABLED_ROWS_IN_SUMCHECK
 
- Static Public Attributes inherited from bb::UltraFlavor_Generated
static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 28
 
static constexpr size_t NUM_WITNESS_ENTITIES = 8
 
static constexpr size_t NUM_MASKING_ENTITIES = 0
 
static constexpr size_t NUM_SHIFTED_ENTITIES = 5
 
static constexpr bool HasDataBus = false
 
static constexpr size_t NUM_BUS_COLUMNS = 0
 
static constexpr bool HasLogDerivLookup = true
 
static constexpr bool HasElliptic = true
 
static constexpr bool HasMemory = true
 
static constexpr bool HasNonNativeField = true
 
static constexpr bool HasEccOpQueue = false
 
static constexpr size_t NUM_COMMITTED_WITNESS_ENTITIES = NUM_WITNESS_ENTITIES + NUM_MASKING_ENTITIES
 
static constexpr size_t NUM_UNSHIFTED_ENTITIES = NUM_PRECOMPUTED_ENTITIES + NUM_COMMITTED_WITNESS_ENTITIES
 
static constexpr size_t NUM_ALL_ENTITIES = NUM_UNSHIFTED_ENTITIES + NUM_SHIFTED_ENTITIES
 
static constexpr std::array< DuplicatePair, NUM_SHIFTED_ENTITIESREPEATED_COMMITMENT_PAIRS
 
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
 
static constexpr std::array< GateKind, 8 > GATE_KINDS
 

Detailed Description

Definition at line 29 of file ultra_flavor.hpp.

Member Typedef Documentation

◆ AllEntities_

template<typename DataType , bool HasZK_ = HasZK>
using bb::UltraFlavor::AllEntities_ = std::conditional_t<HasZK_, UltraZKFlavor_Generated::AllEntities<DataType>, UltraFlavor_Generated::AllEntities<DataType> >

Definition at line 82 of file ultra_flavor.hpp.

◆ AllValues

Definition at line 116 of file ultra_flavor.hpp.

◆ CircuitBuilder

◆ Codec

Definition at line 39 of file ultra_flavor.hpp.

◆ Commitment

◆ CommitmentKey

◆ CommitmentLabels

Definition at line 168 of file ultra_flavor.hpp.

◆ Curve

Definition at line 32 of file ultra_flavor.hpp.

◆ ExtendedEdges

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

Definition at line 157 of file ultra_flavor.hpp.

◆ FF

Definition at line 33 of file ultra_flavor.hpp.

◆ Generated

◆ GroupElement

Definition at line 34 of file ultra_flavor.hpp.

◆ HashFunction

◆ PartiallyEvaluatedMultivariates

◆ PartiallyEvaluatedMultivariates_

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

Definition at line 143 of file ultra_flavor.hpp.

◆ PCS

Definition at line 36 of file ultra_flavor.hpp.

◆ Polynomial

Definition at line 37 of file ultra_flavor.hpp.

◆ PrecomputedData

◆ ProverPolynomials

◆ ProverPolynomials_

A container for polynomials handles.

Definition at line 125 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 152 of file ultra_flavor.hpp.

◆ Relations

Definition at line 63 of file ultra_flavor.hpp.

◆ SubrelationSeparator

Definition at line 69 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 135 of file ultra_flavor.hpp.

◆ VKAndHash

◆ WitnessCommitments

A container for the witness commitments.

Definition at line 162 of file ultra_flavor.hpp.

Member Function Documentation

◆ commitment_labels()

static const CommitmentLabels & bb::UltraFlavor::commitment_labels ( )
inlinestatic

Definition at line 169 of file ultra_flavor.hpp.

◆ 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 101 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 74 of file ultra_flavor.hpp.

◆ HasZK

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

Definition at line 50 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 65 of file ultra_flavor.hpp.

◆ NUM_RELATIONS

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

Definition at line 75 of file ultra_flavor.hpp.

◆ NUM_SUBRELATIONS

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

Definition at line 67 of file ultra_flavor.hpp.

◆ NUM_WIRES

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

Definition at line 54 of file ultra_flavor.hpp.

◆ TRACE_OFFSET

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

Definition at line 96 of file ultra_flavor.hpp.

◆ USE_PADDING

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

Definition at line 53 of file ultra_flavor.hpp.

◆ USE_SHORT_MONOMIALS

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

Definition at line 45 of file ultra_flavor.hpp.

◆ USE_SIMD_SUMCHECK

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

Definition at line 47 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 43 of file ultra_flavor.hpp.


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