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

Mega flavor specialized for Chonk app circuits. More...

#include <mega_app_flavor.hpp>

Inheritance diagram for bb::MegaAppFlavor:
bb::MegaAppFlavor_Generated

Public Types

using Generated = MegaAppFlavor_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 >
 
using ProverPolynomials = ProverPolynomialsBase< AllEntities< Polynomial >, AllValues, Polynomial >
 
using PrecomputedData = PrecomputedData_< Polynomial, NUM_PRECOMPUTED_ENTITIES >
 
using VerificationKey = NativeVerificationKey_< PrecomputedEntities< Commitment >, Codec, HashFunction, CommitmentKey >
 
using VKAndHash = VKAndHash_< FF, VerificationKey >
 
using PartiallyEvaluatedMultivariates = PartiallyEvaluatedMultivariatesBase< AllEntities< Polynomial >, ProverPolynomials, Polynomial >
 
template<size_t LENGTH>
using ProverUnivariates = AllEntities< bb::Univariate< FF, LENGTH > >
 
using ExtendedEdges = ProverUnivariates< MAX_PARTIAL_RELATION_LENGTH >
 
using WitnessCommitments = WitnessEntities< Commitment >
 
using CommitmentLabels = AllEntities< std::string >
 
- Public Types inherited from bb::MegaAppFlavor_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 , return_data_indicator = 29 , databus_id = 30 , q_poseidon2_external = 31 ,
  q_poseidon2_external_initial = 32 , q_poseidon2_quad_internal = 33 , q_5 = 34 , q_poseidon2_quad_internal_terminal = 35 ,
  q_poseidon2_transition_entry = 36 , w_l = 37 , w_r = 38 , w_o = 39 ,
  w_4 = 40 , z_perm = 41 , lookup_inverses = 42 , lookup_read_counts = 43 ,
  lookup_read_tags = 44 , ecc_op_wire_1 = 45 , ecc_op_wire_2 = 46 , ecc_op_wire_3 = 47 ,
  ecc_op_wire_4 = 48 , return_data = 49 , return_data_read_counts = 50 , return_data_inverses = 51 ,
  w_l_shift = 52 , w_r_shift = 53 , w_o_shift = 54 , w_4_shift = 55 ,
  z_perm_shift = 56
}
 
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::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::MegaAppFlavor_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::MegaAppFlavor_Generated
static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 37
 
static constexpr size_t NUM_WITNESS_ENTITIES = 15
 
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 = 1
 
static constexpr std::array< size_t, NUM_BUS_COLUMNSBUILDER_BUS_INDICES = { 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

Mega flavor specialized for Chonk app circuits.

Drops the four calldata bus-lookup relations (kernel + first/second/third app), keeping only the return_data bus. See scripts/flavor-codegen/src/flavors/mega_app.ts for the relation set and the rationale behind the drops.

Definition at line 29 of file mega_app_flavor.hpp.

Member Typedef Documentation

◆ AllValues

Definition at line 70 of file mega_app_flavor.hpp.

◆ CircuitBuilder

◆ Codec

Definition at line 41 of file mega_app_flavor.hpp.

◆ Commitment

◆ CommitmentKey

◆ CommitmentLabels

Definition at line 81 of file mega_app_flavor.hpp.

◆ Curve

Definition at line 34 of file mega_app_flavor.hpp.

◆ ExtendedEdges

◆ FF

Definition at line 35 of file mega_app_flavor.hpp.

◆ Generated

◆ GroupElement

◆ HashFunction

◆ PartiallyEvaluatedMultivariates

◆ PCS

Definition at line 38 of file mega_app_flavor.hpp.

◆ Polynomial

◆ PrecomputedData

◆ ProverPolynomials

◆ ProverUnivariates

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

Definition at line 77 of file mega_app_flavor.hpp.

◆ Relations

Definition at line 53 of file mega_app_flavor.hpp.

◆ SubrelationSeparator

◆ Transcript

◆ VerificationKey

◆ VKAndHash

◆ WitnessCommitments

Member Function Documentation

◆ commitment_labels()

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

Definition at line 82 of file mega_app_flavor.hpp.

◆ FINAL_PCS_MSM_SIZE()

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

Definition at line 65 of file mega_app_flavor.hpp.

Member Data Documentation

◆ BATCHED_RELATION_PARTIAL_LENGTH

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

Definition at line 56 of file mega_app_flavor.hpp.

◆ HasZK

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

Definition at line 49 of file mega_app_flavor.hpp.

◆ MAX_PARTIAL_RELATION_LENGTH

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

Definition at line 55 of file mega_app_flavor.hpp.

◆ NUM_RELATIONS

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

Definition at line 57 of file mega_app_flavor.hpp.

◆ NUM_SUBRELATIONS

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

Definition at line 58 of file mega_app_flavor.hpp.

◆ NUM_WIRES

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

Definition at line 51 of file mega_app_flavor.hpp.

◆ TRACE_OFFSET

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

Definition at line 63 of file mega_app_flavor.hpp.

◆ USE_PADDING

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

Definition at line 50 of file mega_app_flavor.hpp.

◆ USE_SHORT_MONOMIALS

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

Definition at line 46 of file mega_app_flavor.hpp.

◆ USE_SIMD_SUMCHECK

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

Definition at line 48 of file mega_app_flavor.hpp.

◆ VIRTUAL_LOG_N

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

Definition at line 45 of file mega_app_flavor.hpp.


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