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

#include <mega_flavor.hpp>

Inheritance diagram for bb::MegaFlavor:
bb::MegaFlavor_Generated

Public Types

using Generated = MegaFlavor_Generated
 
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 >
 
using Relations = Relations_< FF >
 
using SubrelationSeparator = FF
 
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 CommitmentLabels = AllEntities< std::string >
 
- Public Types inherited from bb::MegaFlavor_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_bilinear_batched_eq = 22 , q_delta_range = 23 ,
  q_elliptic = 24 , q_memory = 25 , q_nnf = 26 , lagrange_ecc_op = 27 ,
  q_busread = 28 , kernel_calldata_indicator = 29 , databus_id = 30 , first_app_calldata_indicator = 31 ,
  second_app_calldata_indicator = 32 , third_app_calldata_indicator = 33 , fourth_app_calldata_indicator = 34 , q_5 = 35 ,
  fifth_app_calldata_indicator = 36 , return_data_indicator = 37 , q_poseidon2_external = 38 , q_poseidon2_external_initial = 39 ,
  q_poseidon2_quad_internal = 40 , q_poseidon2_quad_internal_terminal = 41 , q_poseidon2_transition_entry = 42 , w_l = 43 ,
  w_r = 44 , w_o = 45 , w_4 = 46 , z_perm = 47 ,
  lookup_inverses = 48 , lookup_read_counts = 49 , lookup_read_tags = 50 , ecc_op_wire_1 = 51 ,
  ecc_op_wire_2 = 52 , ecc_op_wire_3 = 53 , ecc_op_wire_4 = 54 , kernel_calldata = 55 ,
  kernel_calldata_read_counts = 56 , kernel_calldata_inverses = 57 , first_app_calldata = 58 , first_app_calldata_read_counts = 59 ,
  first_app_calldata_inverses = 60 , second_app_calldata = 61 , second_app_calldata_read_counts = 62 , second_app_calldata_inverses = 63 ,
  third_app_calldata = 64 , third_app_calldata_read_counts = 65 , third_app_calldata_inverses = 66 , fourth_app_calldata = 67 ,
  fourth_app_calldata_read_counts = 68 , fourth_app_calldata_inverses = 69 , fifth_app_calldata = 70 , fifth_app_calldata_read_counts = 71 ,
  fifth_app_calldata_inverses = 72 , return_data = 73 , return_data_read_counts = 74 , return_data_inverses = 75 ,
  w_l_shift = 76 , w_r_shift = 77 , w_o_shift = 78 , w_4_shift = 79 ,
  z_perm_shift = 80
}
 
template<typename FF >
using Relations_ = std::tuple< bb::UltraPermutationRelation< FF >, bb::LogDerivLookupRelation< FF >, bb::ArithmeticRelation< FF >, bb::BilinearOrBatchedEqCheckRelation< FF >, bb::DeltaRangeConstraintRelation< FF >, bb::EllipticRelation< FF >, bb::MemoryRelation< FF >, bb::NonNativeFieldRelation< FF >, bb::EccOpQueueRelation< FF >, bb::SingleBusLookupRelation< FF, EntityId::kernel_calldata, EntityId::kernel_calldata_read_counts, EntityId::kernel_calldata_inverses, EntityId::kernel_calldata_indicator, EntityId::q_l >, bb::SingleBusLookupRelation< FF, EntityId::first_app_calldata, EntityId::first_app_calldata_read_counts, EntityId::first_app_calldata_inverses, EntityId::first_app_calldata_indicator, EntityId::q_r >, bb::SingleBusLookupRelation< FF, EntityId::second_app_calldata, EntityId::second_app_calldata_read_counts, EntityId::second_app_calldata_inverses, EntityId::second_app_calldata_indicator, EntityId::q_o >, bb::SingleBusLookupRelation< FF, EntityId::third_app_calldata, EntityId::third_app_calldata_read_counts, EntityId::third_app_calldata_inverses, EntityId::third_app_calldata_indicator, EntityId::q_4 >, bb::SingleBusLookupRelation< FF, EntityId::fourth_app_calldata, EntityId::fourth_app_calldata_read_counts, EntityId::fourth_app_calldata_inverses, EntityId::fourth_app_calldata_indicator, EntityId::q_5 >, bb::SingleBusLookupRelation< FF, EntityId::fifth_app_calldata, EntityId::fifth_app_calldata_read_counts, EntityId::fifth_app_calldata_inverses, EntityId::fifth_app_calldata_indicator, EntityId::q_c >, bb::SingleBusLookupRelation< FF, EntityId::return_data, EntityId::return_data_read_counts, EntityId::return_data_inverses, EntityId::return_data_indicator, EntityId::q_m >, bb::Poseidon2ExternalRelation< FF >, bb::Poseidon2InitialExternalRelation< FF >, bb::Poseidon2QuadInternalRelation< FF >, bb::Poseidon2QuadInternalTerminalRelation< FF >, bb::Poseidon2TransitionEntryRelation< 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::MegaFlavor_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_FOLDING_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 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_SUBRELATIONS = compute_number_of_subrelations<Relations>()
 
static constexpr size_t TRACE_OFFSET = 0
 
- Static Public Attributes inherited from bb::MegaFlavor_Generated
static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 43
 
static constexpr size_t NUM_WITNESS_ENTITIES = 33
 
static constexpr size_t NUM_MASKING_ENTITIES = 0
 
static constexpr size_t NUM_SHIFTED_ENTITIES = 5
 
static constexpr bool HasDataBus = true
 
static constexpr size_t NUM_BUS_COLUMNS = 7
 
static constexpr std::array< size_t, NUM_BUS_COLUMNSBUILDER_BUS_INDICES = { 0, 1, 2, 3, 4, 5, 6 }
 
static constexpr bool HasLogDerivLookup = true
 
static constexpr bool HasElliptic = true
 
static constexpr bool HasMemory = true
 
static constexpr bool HasNonNativeField = true
 
static constexpr bool HasEccOpQueue = true
 
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, 13 > GATE_KINDS
 

Detailed Description

Definition at line 27 of file mega_flavor.hpp.

Member Typedef Documentation

◆ AllValues

A field element for each entity of the flavor. These entities represent the prover polynomials evaluated at one point.

Definition at line 89 of file mega_flavor.hpp.

◆ CircuitBuilder

◆ Codec

Definition at line 39 of file mega_flavor.hpp.

◆ Commitment

◆ CommitmentKey

◆ CommitmentLabels

Definition at line 135 of file mega_flavor.hpp.

◆ Curve

Definition at line 32 of file mega_flavor.hpp.

◆ ExtendedEdges

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

Definition at line 124 of file mega_flavor.hpp.

◆ FF

Definition at line 33 of file mega_flavor.hpp.

◆ Generated

◆ GroupElement

Definition at line 34 of file mega_flavor.hpp.

◆ HashFunction

◆ PartiallyEvaluatedMultivariates

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

Definition at line 112 of file mega_flavor.hpp.

◆ PCS

Definition at line 36 of file mega_flavor.hpp.

◆ Polynomial

Definition at line 37 of file mega_flavor.hpp.

◆ PrecomputedData

◆ ProverPolynomials

A container for the prover polynomials handles.

Definition at line 97 of file mega_flavor.hpp.

◆ ProverUnivariates

template<size_t LENGTH>
using bb::MegaFlavor::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 119 of file mega_flavor.hpp.

◆ Relations

Definition at line 57 of file mega_flavor.hpp.

◆ SubrelationSeparator

Definition at line 68 of file mega_flavor.hpp.

◆ Transcript

◆ VerificationKey

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

Definition at line 105 of file mega_flavor.hpp.

◆ VKAndHash

◆ WitnessCommitments

A container for the witness commitments.

Definition at line 129 of file mega_flavor.hpp.

Member Function Documentation

◆ commitment_labels()

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

Definition at line 136 of file mega_flavor.hpp.

◆ FINAL_PCS_MSM_SIZE()

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

Definition at line 80 of file mega_flavor.hpp.

Member Data Documentation

◆ BATCHED_RELATION_PARTIAL_LENGTH

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

Definition at line 63 of file mega_flavor.hpp.

◆ HasZK

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

Definition at line 51 of file mega_flavor.hpp.

◆ MAX_PARTIAL_RELATION_LENGTH

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

Definition at line 59 of file mega_flavor.hpp.

◆ NUM_RELATIONS

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

Definition at line 64 of file mega_flavor.hpp.

◆ NUM_SUBRELATIONS

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

Definition at line 67 of file mega_flavor.hpp.

◆ NUM_WIRES

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

Definition at line 55 of file mega_flavor.hpp.

◆ TRACE_OFFSET

constexpr size_t bb::MegaFlavor::TRACE_OFFSET = 0
staticconstexpr

Definition at line 75 of file mega_flavor.hpp.

◆ USE_PADDING

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

Definition at line 54 of file mega_flavor.hpp.

◆ USE_SHORT_MONOMIALS

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

Definition at line 47 of file mega_flavor.hpp.

◆ USE_SIMD_SUMCHECK

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

Definition at line 49 of file mega_flavor.hpp.

◆ VIRTUAL_LOG_N

constexpr size_t bb::MegaFlavor::VIRTUAL_LOG_N = CONST_FOLDING_LOG_N
staticconstexpr

Definition at line 45 of file mega_flavor.hpp.


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