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

#include <translator_flavor.hpp>

Inheritance diagram for bb::TranslatorShortMonomialFlavor:
bb::TranslatorFlavor

Public Types

using FF = TranslatorFlavor::FF
 
using Curve = TranslatorFlavor::Curve
 
using GrandProductRelations = std::tuple< TranslatorPermutationShortRelation< FF > >
 
template<typename FF_ >
using Relations_ = std::tuple< TranslatorPermutationShortRelation< FF_ >, TranslatorDeltaRangeConstraintShortRelation< FF_ >, TranslatorOpcodeConstraintShortRelation< FF_ >, TranslatorAccumulatorTransferShortRelation< FF_ >, TranslatorDecompositionShortRelation< FF_ >, TranslatorNonNativeFieldShortRelation< FF_ >, TranslatorZeroConstraintsShortRelation< FF_ > >
 
using Relations = Relations_< FF >
 
using SubrelationSeparators = std::array< FF, NUM_SUBRELATIONS - 1 >
 
template<size_t LENGTH>
using ProverUnivariates = TranslatorFlavor::ProverUnivariates< LENGTH >
 
using ExtendedEdges = ProverUnivariates< MAX_PARTIAL_RELATION_LENGTH >
 
- Public Types inherited from bb::TranslatorFlavor
using CircuitBuilder = TranslatorCircuitBuilder
 
using Curve = curve::BN254
 
using PCS = KZG< Curve >
 
using GroupElement = Curve::Element
 
using Commitment = Curve::AffineElement
 
using CommitmentKey = bb::CommitmentKey< Curve >
 
using VerifierCommitmentKey = bb::VerifierCommitmentKey< Curve >
 
using FF = Curve::ScalarField
 
using BF = Curve::BaseField
 
using Polynomial = bb::Polynomial< FF >
 
using Codec = FrCodec
 
using HashFunction = crypto::Poseidon2< crypto::Poseidon2Bn254ScalarFieldParams >
 
using Transcript = BaseTranscript< Codec, HashFunction >
 
using GrandProductRelations = std::tuple< TranslatorPermutationRelation< FF > >
 
template<typename FF >
using Relations_ = std::tuple< TranslatorPermutationRelation< FF >, TranslatorDeltaRangeConstraintRelation< FF >, TranslatorOpcodeConstraintRelation< FF >, TranslatorAccumulatorTransferRelation< FF >, TranslatorDecompositionRelation< FF >, TranslatorNonNativeFieldRelation< FF >, TranslatorZeroConstraintsRelation< FF > >
 
using Relations = Relations_< FF >
 
using SubrelationSeparators = std::array< FF, NUM_SUBRELATIONS - 1 >
 
using VerificationKey = FixedVKAndHash_< VKEntities< Commitment >, FF, TranslatorHardcodedVKAndHash >
 The verification key stores commitments to the precomputed polynomials used by the verifier.
 
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 during sumcheck.
 
using ExtendedEdges = ProverUnivariates< MAX_PARTIAL_RELATION_LENGTH >
 A container for univariates produced during the hot loop in sumcheck.
 
using VerifierCommitments = VerifierCommitments_< Commitment, VerificationKey >
 

Static Public Attributes

static constexpr bool USE_SHORT_MONOMIALS = true
 
static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>()
 
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 + 2
 
static constexpr size_t NUM_RELATIONS = std::tuple_size_v<Relations>
 
- Static Public Attributes inherited from bb::TranslatorFlavor
static constexpr bool USE_SHORT_MONOMIALS = false
 
static constexpr bool HasZK = true
 
static constexpr size_t TRACE_OFFSET = 0
 
static constexpr bool USE_PADDING = false
 
static constexpr size_t NUM_MASKING_POLYNOMIALS = 1
 
static constexpr size_t NUM_OP_QUEUE_WIRES = 4
 
static constexpr size_t CONCATENATION_GROUP_SIZE = 16
 
static constexpr size_t LOG_MINI_CIRCUIT_SIZE = CONST_TRANSLATOR_MINI_CIRCUIT_LOG_SIZE
 
static constexpr size_t CONST_TRANSLATOR_LOG_N = LOG_MINI_CIRCUIT_SIZE + numeric::get_msb(CONCATENATION_GROUP_SIZE)
 
static constexpr size_t VIRTUAL_LOG_N = CONST_TRANSLATOR_LOG_N
 
static constexpr size_t MINI_CIRCUIT_SIZE = 1UL << LOG_MINI_CIRCUIT_SIZE
 
static constexpr size_t NUM_CONCATENATED_POLYS = 5
 
static constexpr size_t SORT_STEP = 3
 
static constexpr size_t NUM_WIRES = CircuitBuilder::NUM_WIRES
 
static constexpr size_t RESULT_ROW = CircuitBuilder::RESULT_ROW
 
static constexpr size_t NUM_MASKED_ROWS_END = CircuitBuilder::NUM_RANDOM_OPS_END * 2
 
static constexpr size_t MAX_RANDOM_VALUES_PER_ORDERED = CONCATENATION_GROUP_SIZE * NUM_MASKED_ROWS_END
 
static constexpr size_t RANDOMNESS_START = 2
 
static constexpr size_t MICRO_LIMB_BITS = CircuitBuilder::MICRO_LIMB_BITS
 
static constexpr size_t NUM_LIMB_BITS = CircuitBuilder::NUM_LIMB_BITS
 
static constexpr size_t NUM_SUBRELATIONS = compute_number_of_subrelations<Relations>()
 
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 + 2
 
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_frs_fq = FrCodec::calc_num_fields<BF>()
 
static constexpr size_t NUM_PRECOMPUTED_ENTITIES = PrecomputedEntities<FF>::_members_size
 
static constexpr size_t NUM_WIRES_NON_SHIFTED = WireNonshiftedEntities<FF>::_members_size
 
static constexpr size_t NUM_ORDERED_RANGE = OrderedRangeConstraints<FF>::_members_size
 
static constexpr size_t NUM_WITNESS_ENTITIES
 
static constexpr size_t NUM_SHIFTED_ENTITIES
 
static constexpr size_t NUM_ALL_ENTITIES
 
static constexpr size_t NUM_COMPUTABLE_PRECOMPUTED = NUM_PRECOMPUTED_ENTITIES - 1
 
static constexpr size_t NUM_MINICIRCUIT_WIRES
 
static constexpr size_t NUM_MINICIRCUIT_EVALUATIONS = 2 * NUM_MINICIRCUIT_WIRES
 
static constexpr size_t NUM_SENT_EVALUATIONS
 
static constexpr size_t NUM_FULL_CIRCUIT_EVALUATIONS = NUM_SENT_EVALUATIONS - NUM_MINICIRCUIT_EVALUATIONS
 
static constexpr size_t NUM_CONCATENATED_WIRES = NUM_CONCATENATED_POLYS * CONCATENATION_GROUP_SIZE
 
static constexpr size_t NUM_UNSHIFTED_WITNESSES_WITHOUT_CONCATENATED
 
static constexpr size_t NUM_TO_BE_SHIFTED
 
static constexpr size_t NUM_PCS_UNSHIFTED
 
static constexpr size_t NUM_PCS_TO_BE_SHIFTED = NUM_TO_BE_SHIFTED + NUM_CONCATENATED_POLYS
 
static constexpr size_t TO_BE_SHIFTED_WITNESSES_START = NUM_PRECOMPUTED_ENTITIES + NUM_WIRES_NON_SHIFTED
 
static constexpr size_t SHIFTED_WITNESSES_START = NUM_SHIFTED_ENTITIES + TO_BE_SHIFTED_WITNESSES_START
 
static constexpr size_t NUM_COMMITMENTS_IN_PROOF = NUM_CONCATENATED_POLYS + NUM_ORDERED_RANGE
 
static constexpr size_t NUM_OP_QUEUE_TO_BE_SHIFTED = OpQueueWiresToBeShiftedEntities<FF>::_members_size
 
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
 
static constexpr size_t PROOF_LENGTH
 
static constexpr size_t COMMITTED_SUMCHECK_PROOF_LENGTH
 
static constexpr size_t SORTED_STEPS_COUNT = ((1 << MICRO_LIMB_BITS) / SORT_STEP) + 1
 
static constexpr size_t MASKING_OVERFLOW_COLUMN
 

Additional Inherited Members

- Static Public Member Functions inherited from bb::TranslatorFlavor
template<typename DataType , typename WireRefs >
static std::vector< RefVector< DataType > > partition_minicircuit_wires_into_groups (WireRefs wire_refs, DataType &zero_value)
 Partition minicircuit wire references into concatenation groups.
 
template<typename FFType >
static void compute_computable_precomputed (AllEntities< FFType > &evals, std::span< const FFType > challenge)
 Compute the computable precomputed selector evaluations and write them into AllEntities.
 
template<typename PolyContainer >
static std::array< FF, NUM_MINICIRCUIT_EVALUATIONSget_minicircuit_evaluations (PolyContainer &polys)
 Prover: read the 154 minicircuit wire evaluations from partially-evaluated polynomials.
 
template<typename FFType >
static void set_minicircuit_evaluations (AllEntities< FFType > &evals, const std::array< FFType, NUM_MINICIRCUIT_EVALUATIONS > &mid)
 Verifier: place the 154 raw mid-sumcheck minicircuit wire evaluations into AllEntities.
 
template<typename FFType >
static void complete_claimed_evaluations (AllEntities< FFType > &evals, std::span< const FFType > challenge)
 Verifier: complete the claimed evaluations for the sumcheck relation check.
 
template<typename FFType >
static void complete_full_circuit_evaluations (AllEntities< FFType > &evals, const std::array< FFType, NUM_FULL_CIRCUIT_EVALUATIONS > &full_circuit, std::span< const FFType > challenge)
 Verifier: complete full-circuit evaluations from received array and challenge.
 
template<typename FFType >
static std::array< FFType, NUM_CONCATENATED_POLYSreconstruct_concatenated_evaluations (const std::vector< RefVector< FFType > > &groups, std::span< const FFType > challenge)
 Reconstruct concatenated polynomial evaluations from individual wire evaluations using the Lagrange basis over the top log2(CONCATENATION_GROUP_SIZE) challenges.
 
template<typename FFType >
static std::array< FFType, NUM_FULL_CIRCUIT_EVALUATIONSget_full_circuit_evaluations (AllEntities< FFType > &evals)
 Prover: extract the full-circuit evaluations via get_full_circuit_entities().
 
template<typename FFType >
static void set_full_circuit_evaluations (AllEntities< FFType > &evals, const std::array< FFType, NUM_FULL_CIRCUIT_EVALUATIONS > &full_circuit)
 Verifier: write the full-circuit evaluations back via get_full_circuit_entities().
 
template<typename ProverPolynomialsOrPartiallyEvaluatedMultivariates , typename EdgeType >
static bool skip_entire_row (const ProverPolynomialsOrPartiallyEvaluatedMultivariates &polynomials, const EdgeType edge_idx)
 When evaluating the sumcheck protocol - can we skip evaluation of all relations for a given row?
 

Detailed Description

Definition at line 1275 of file translator_flavor.hpp.

Member Typedef Documentation

◆ Curve

◆ ExtendedEdges

◆ FF

◆ GrandProductRelations

◆ ProverUnivariates

◆ Relations

◆ Relations_

◆ SubrelationSeparators

Member Data Documentation

◆ BATCHED_RELATION_PARTIAL_LENGTH

constexpr size_t bb::TranslatorShortMonomialFlavor::BATCHED_RELATION_PARTIAL_LENGTH = MAX_PARTIAL_RELATION_LENGTH + 2
staticconstexpr

Definition at line 1296 of file translator_flavor.hpp.

◆ MAX_PARTIAL_RELATION_LENGTH

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

Definition at line 1295 of file translator_flavor.hpp.

◆ NUM_RELATIONS

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

Definition at line 1297 of file translator_flavor.hpp.

◆ NUM_SUBRELATIONS

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

Definition at line 1293 of file translator_flavor.hpp.

◆ USE_SHORT_MONOMIALS

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

Definition at line 1280 of file translator_flavor.hpp.


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