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

#include <eccvm_flavor.hpp>

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...
 
struct  DerivedWitnessEntities
 Container for all derived witness polynomials used/constructed by the prover. More...
 
class  IPATranscript
 Derived class that defines proof structure for ECCVM IPA proof, as well as supporting functions. More...
 
class  PartiallyEvaluatedMultivariates
 A container for storing the partially evaluated multivariates produced by sumcheck. More...
 
class  PrecomputedEntities
 A base class labelling precomputed entities and (ordered) subsets of interest. More...
 
class  ProverPolynomials
 A container for the prover polynomials. More...
 
class  ProvingKey
 The proving key is responsible for storing the polynomials used by the prover. More...
 
class  ShiftedEntities
 Represents polynomials shifted by 1 or their evaluations, defined relative to WitnessEntities. More...
 
class  VerificationKey
 The verification key is responsible for storing the commitments to the precomputed (non-witnessk) polynomials used by the verifier. More...
 
class  VerifierCommitments_
 
class  WireNonShiftedEntities
 
class  WireToBeShiftedAccumulatorEntities
 Containter for transcript accumulators, they stand out as the only to-be-shifted wires that are always populated until the dyadic size of the circuit. More...
 
class  WireToBeShiftedWithoutAccumulatorsEntities
 Container for all to-be-shifted witness polynomials excluding the accumulators used/constructed by the prover. More...
 
class  WitnessEntities
 Container for all witness polynomials used/constructed by the prover. More...
 

Public Types

using CircuitBuilder = ECCVMCircuitBuilder
 
using CycleGroup = bb::g1
 
using Curve = curve::Grumpkin
 
using G1 = typename Curve::Group
 
using PCS = IPA< Curve >
 
using FF = typename Curve::ScalarField
 
using BF = typename Curve::BaseField
 
using Polynomial = bb::Polynomial< FF >
 
using GroupElement = typename G1::element
 
using Commitment = typename G1::affine_element
 
using CommitmentKey = bb::CommitmentKey< Curve >
 
using VerifierCommitmentKey = bb::VerifierCommitmentKey< Curve >
 
using MSM = bb::eccvm::MSM< CycleGroup >
 
using Transcript = NativeTranscript
 
using GrandProductRelations = std::tuple< ECCVMSetRelation< FF > >
 
template<typename FF >
using Relations_ = std::tuple< ECCVMTranscriptRelation< FF >, ECCVMPointTableRelation< FF >, ECCVMWnafRelation< FF >, ECCVMMSMRelation< FF >, ECCVMSetRelation< FF >, ECCVMLookupRelation< FF >, ECCVMBoolsRelation< FF > >
 
using Relations = Relations_< FF >
 
using LookupRelation = ECCVMLookupRelation< FF >
 
using SubrelationSeparators = std::array< FF, NUM_SUBRELATIONS - 1 >
 
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 Member Functions

template<typename DataType , typename PrecomputedAndWitnessEntitiesSuperset >
static auto get_to_be_shifted (PrecomputedAndWitnessEntitiesSuperset &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?
 

Static Public Attributes

static constexpr bool USE_SHORT_MONOMIALS = false
 
static constexpr bool HasZK = true
 
static constexpr bool USE_PADDING = false
 
static constexpr size_t ECCVM_FIXED_SIZE = 1UL << CONST_ECCVM_LOG_N
 
static constexpr size_t NUM_WIRES = 85
 
static constexpr size_t NUM_ALL_ENTITIES = 116
 
static constexpr size_t NUM_PRECOMPUTED_ENTITIES = 3
 
static constexpr size_t NUM_WITNESS_ENTITIES = 87
 
static constexpr size_t NUM_SHIFTED_ENTITIES = 26
 
static constexpr size_t NUM_DERIVED_WITNESS_ENTITIES_NON_SHIFTED = 1
 
static constexpr RepeatedCommitmentsData REPEATED_COMMITMENTS
 
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<Relations>::value
 
static constexpr size_t num_frs_comm = bb::field_conversion::calc_num_bn254_frs<Commitment>()
 
static constexpr size_t num_frs_fq = bb::field_conversion::calc_num_bn254_frs<FF>()
 
static constexpr size_t PROOF_LENGTH_WITHOUT_PUB_INPUTS
 
static constexpr size_t NUM_TRANSLATION_OPENING_CLAIMS = NUM_SMALL_IPA_EVALUATIONS + 1
 

Detailed Description

Definition at line 34 of file eccvm_flavor.hpp.

Member Typedef Documentation

◆ BF

Definition at line 42 of file eccvm_flavor.hpp.

◆ CircuitBuilder

◆ Commitment

using bb::ECCVMFlavor::Commitment = typename G1::affine_element

Definition at line 45 of file eccvm_flavor.hpp.

◆ CommitmentKey

◆ Curve

Definition at line 38 of file eccvm_flavor.hpp.

◆ CycleGroup

Definition at line 37 of file eccvm_flavor.hpp.

◆ ExtendedEdges

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

Definition at line 432 of file eccvm_flavor.hpp.

◆ FF

Definition at line 41 of file eccvm_flavor.hpp.

◆ G1

Definition at line 39 of file eccvm_flavor.hpp.

◆ GrandProductRelations

Definition at line 86 of file eccvm_flavor.hpp.

◆ GroupElement

using bb::ECCVMFlavor::GroupElement = typename G1::element

Definition at line 44 of file eccvm_flavor.hpp.

◆ LookupRelation

◆ MSM

Definition at line 48 of file eccvm_flavor.hpp.

◆ PCS

Definition at line 40 of file eccvm_flavor.hpp.

◆ Polynomial

Definition at line 43 of file eccvm_flavor.hpp.

◆ ProverUnivariates

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

A container for univariates used during sumcheck.

Definition at line 427 of file eccvm_flavor.hpp.

◆ Relations

Definition at line 96 of file eccvm_flavor.hpp.

◆ Relations_

◆ SubrelationSeparators

Definition at line 100 of file eccvm_flavor.hpp.

◆ Transcript

Definition at line 49 of file eccvm_flavor.hpp.

◆ VerifierCommitmentKey

◆ VerifierCommitments

Member Function Documentation

◆ get_to_be_shifted()

template<typename DataType , typename PrecomputedAndWitnessEntitiesSuperset >
static auto bb::ECCVMFlavor::get_to_be_shifted ( PrecomputedAndWitnessEntitiesSuperset &  entities)
inlinestatic

Definition at line 358 of file eccvm_flavor.hpp.

◆ skip_entire_row()

template<typename ProverPolynomialsOrPartiallyEvaluatedMultivariates , typename EdgeType >
static bool bb::ECCVMFlavor::skip_entire_row ( const ProverPolynomialsOrPartiallyEvaluatedMultivariates &  polynomials,
const EdgeType  edge_idx 
)
inlinestatic

When evaluating the sumcheck protocol - can we skip evaluation of all relations for a given row?

When used in ClientIVC, the ECCVM has a large fixed size, which is often not fully utilized. If a row is completely empty, the values of z_perm and z_perm_shift will match, we can use this as a proxy to determine if we can skip Sumcheck::compute_univariate_with_row_skipping

Definition at line 1052 of file eccvm_flavor.hpp.

Member Data Documentation

◆ BATCHED_RELATION_PARTIAL_LENGTH

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

Definition at line 109 of file eccvm_flavor.hpp.

◆ ECCVM_FIXED_SIZE

constexpr size_t bb::ECCVMFlavor::ECCVM_FIXED_SIZE = 1UL << CONST_ECCVM_LOG_N
staticconstexpr

Definition at line 61 of file eccvm_flavor.hpp.

◆ HasZK

constexpr bool bb::ECCVMFlavor::HasZK = true
staticconstexpr

Definition at line 55 of file eccvm_flavor.hpp.

◆ MAX_PARTIAL_RELATION_LENGTH

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

Definition at line 102 of file eccvm_flavor.hpp.

◆ NUM_ALL_ENTITIES

constexpr size_t bb::ECCVMFlavor::NUM_ALL_ENTITIES = 116
staticconstexpr

Definition at line 68 of file eccvm_flavor.hpp.

◆ NUM_DERIVED_WITNESS_ENTITIES_NON_SHIFTED

constexpr size_t bb::ECCVMFlavor::NUM_DERIVED_WITNESS_ENTITIES_NON_SHIFTED = 1
staticconstexpr

Definition at line 77 of file eccvm_flavor.hpp.

◆ num_frs_comm

constexpr size_t bb::ECCVMFlavor::num_frs_comm = bb::field_conversion::calc_num_bn254_frs<Commitment>()
staticconstexpr

Definition at line 112 of file eccvm_flavor.hpp.

◆ num_frs_fq

constexpr size_t bb::ECCVMFlavor::num_frs_fq = bb::field_conversion::calc_num_bn254_frs<FF>()
staticconstexpr

Definition at line 113 of file eccvm_flavor.hpp.

◆ NUM_PRECOMPUTED_ENTITIES

constexpr size_t bb::ECCVMFlavor::NUM_PRECOMPUTED_ENTITIES = 3
staticconstexpr

Definition at line 71 of file eccvm_flavor.hpp.

◆ NUM_RELATIONS

constexpr size_t bb::ECCVMFlavor::NUM_RELATIONS = std::tuple_size<Relations>::value
staticconstexpr

Definition at line 110 of file eccvm_flavor.hpp.

◆ NUM_SHIFTED_ENTITIES

constexpr size_t bb::ECCVMFlavor::NUM_SHIFTED_ENTITIES = 26
staticconstexpr

Definition at line 75 of file eccvm_flavor.hpp.

◆ NUM_SUBRELATIONS

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

Definition at line 99 of file eccvm_flavor.hpp.

◆ NUM_TRANSLATION_OPENING_CLAIMS

constexpr size_t bb::ECCVMFlavor::NUM_TRANSLATION_OPENING_CLAIMS = NUM_SMALL_IPA_EVALUATIONS + 1
staticconstexpr

Definition at line 155 of file eccvm_flavor.hpp.

◆ NUM_WIRES

constexpr size_t bb::ECCVMFlavor::NUM_WIRES = 85
staticconstexpr

Definition at line 63 of file eccvm_flavor.hpp.

◆ NUM_WITNESS_ENTITIES

constexpr size_t bb::ECCVMFlavor::NUM_WITNESS_ENTITIES = 87
staticconstexpr

Definition at line 73 of file eccvm_flavor.hpp.

◆ PROOF_LENGTH_WITHOUT_PUB_INPUTS

constexpr size_t bb::ECCVMFlavor::PROOF_LENGTH_WITHOUT_PUB_INPUTS
staticconstexpr

Definition at line 116 of file eccvm_flavor.hpp.

◆ REPEATED_COMMITMENTS

constexpr RepeatedCommitmentsData bb::ECCVMFlavor::REPEATED_COMMITMENTS
staticconstexpr
Initial value:
=
RepeatedCommitmentsData(NUM_PRECOMPUTED_ENTITIES + NUM_WITNESS_ENTITIES -
static constexpr size_t NUM_WITNESS_ENTITIES
static constexpr size_t NUM_SHIFTED_ENTITIES
static constexpr size_t NUM_PRECOMPUTED_ENTITIES
static constexpr size_t NUM_DERIVED_WITNESS_ENTITIES_NON_SHIFTED

Definition at line 80 of file eccvm_flavor.hpp.

◆ USE_PADDING

constexpr bool bb::ECCVMFlavor::USE_PADDING = false
staticconstexpr

Definition at line 57 of file eccvm_flavor.hpp.

◆ USE_SHORT_MONOMIALS

constexpr bool bb::ECCVMFlavor::USE_SHORT_MONOMIALS = false
staticconstexpr

Definition at line 52 of file eccvm_flavor.hpp.


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