Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::MockClaimGenerator< Curve > Struct Template Reference

Constructs random polynomials, computes commitments and corresponding evaluations. More...

#include <mock_witness_generator.hpp>

Classes

struct  ClaimData
 
struct  InterleaveData
 

Public Types

using CommitmentKey = bb::CommitmentKey< Curve >
 
using Fr = typename Curve::ScalarField
 
using Commitment = typename Curve::AffineElement
 
using Polynomial = bb::Polynomial< Fr >
 
using PolynomialBatcher = bb::GeminiProver_< Curve >::PolynomialBatcher
 
using ClaimBatcher = ClaimBatcher_< Curve >
 
using ClaimBatch = ClaimBatcher::Batch
 
using InterleavedBatch = ClaimBatcher::InterleavedBatch
 

Public Member Functions

 MockClaimGenerator (const size_t poly_size, const size_t num_polynomials, const size_t num_to_be_shifted, const size_t num_to_be_right_shifted_by_k, const std::vector< Fr > &mle_opening_point, const CommitmentKey &commitment_key, size_t num_interleaved=0, size_t num_to_be_interleaved=0)
 Construct claim data for a set of random polynomials with the specified type.
 
 MockClaimGenerator (const size_t n, const size_t num_zero_polynomials)
 
InterleaveData generate_interleaving_inputs (const std::vector< Fr > &u_challenge, const size_t num_interleaved, const size_t group_size, const CommitmentKey &ck)
 
template<typename Flavor >
void compute_sumcheck_opening_data (const size_t log_n, const size_t sumcheck_univariate_length, std::vector< Fr > &challenge, const CommitmentKey &ck)
 

Public Attributes

CommitmentKey ck
 
ClaimData unshifted
 
ClaimData to_be_shifted
 
ClaimData to_be_right_shifted_by_k
 
std::vector< Frconst_size_mle_opening_point
 
PolynomialBatcher polynomial_batcher
 
ClaimBatcher claim_batcher
 
std::vector< bb::Polynomial< Fr > > round_univariates
 
std::vector< Commitmentsumcheck_commitments
 
std::vector< std::array< Fr, 3 > > sumcheck_evaluations
 
InterleaveData interleave_data
 

Static Public Attributes

static constexpr size_t k_magnitude = 6
 

Detailed Description

template<typename Curve>
struct bb::MockClaimGenerator< Curve >

Constructs random polynomials, computes commitments and corresponding evaluations.

Template Parameters
Curve

Definition at line 23 of file mock_witness_generator.hpp.

Member Typedef Documentation

◆ ClaimBatch

template<typename Curve >
using bb::MockClaimGenerator< Curve >::ClaimBatch = ClaimBatcher::Batch

Definition at line 31 of file mock_witness_generator.hpp.

◆ ClaimBatcher

template<typename Curve >
using bb::MockClaimGenerator< Curve >::ClaimBatcher = ClaimBatcher_<Curve>

Definition at line 30 of file mock_witness_generator.hpp.

◆ Commitment

template<typename Curve >
using bb::MockClaimGenerator< Curve >::Commitment = typename Curve::AffineElement

Definition at line 27 of file mock_witness_generator.hpp.

◆ CommitmentKey

template<typename Curve >
using bb::MockClaimGenerator< Curve >::CommitmentKey = bb::CommitmentKey<Curve>

Definition at line 25 of file mock_witness_generator.hpp.

◆ Fr

template<typename Curve >
using bb::MockClaimGenerator< Curve >::Fr = typename Curve::ScalarField

Definition at line 26 of file mock_witness_generator.hpp.

◆ InterleavedBatch

template<typename Curve >
using bb::MockClaimGenerator< Curve >::InterleavedBatch = ClaimBatcher::InterleavedBatch

Definition at line 32 of file mock_witness_generator.hpp.

◆ Polynomial

Definition at line 28 of file mock_witness_generator.hpp.

◆ PolynomialBatcher

template<typename Curve >
using bb::MockClaimGenerator< Curve >::PolynomialBatcher = bb::GeminiProver_<Curve>::PolynomialBatcher

Definition at line 29 of file mock_witness_generator.hpp.

Constructor & Destructor Documentation

◆ MockClaimGenerator() [1/2]

template<typename Curve >
bb::MockClaimGenerator< Curve >::MockClaimGenerator ( const size_t  poly_size,
const size_t  num_polynomials,
const size_t  num_to_be_shifted,
const size_t  num_to_be_right_shifted_by_k,
const std::vector< Fr > &  mle_opening_point,
const CommitmentKey commitment_key,
size_t  num_interleaved = 0,
size_t  num_to_be_interleaved = 0 
)
inline

Construct claim data for a set of random polynomials with the specified type.

Note
All to-be-shifted polynomials have an unshifted counterpart so the total number of claims is num_polynomials + num_to_be_shifted
Parameters
poly_sizesize of mock polynomials
num_polynomialstotal number of unique polynomials
num_to_be_shiftednumber of polynomials to-be-shifted
mle_opening_point
commitment_key

Definition at line 77 of file mock_witness_generator.hpp.

◆ MockClaimGenerator() [2/2]

template<typename Curve >
bb::MockClaimGenerator< Curve >::MockClaimGenerator ( const size_t  n,
const size_t  num_zero_polynomials 
)
inline

Definition at line 173 of file mock_witness_generator.hpp.

Member Function Documentation

◆ compute_sumcheck_opening_data()

template<typename Curve >
template<typename Flavor >
void bb::MockClaimGenerator< Curve >::compute_sumcheck_opening_data ( const size_t  log_n,
const size_t  sumcheck_univariate_length,
std::vector< Fr > &  challenge,
const CommitmentKey ck 
)
inline

Definition at line 247 of file mock_witness_generator.hpp.

◆ generate_interleaving_inputs()

template<typename Curve >
InterleaveData bb::MockClaimGenerator< Curve >::generate_interleaving_inputs ( const std::vector< Fr > &  u_challenge,
const size_t  num_interleaved,
const size_t  group_size,
const CommitmentKey ck 
)
inline

Definition at line 188 of file mock_witness_generator.hpp.

Member Data Documentation

◆ ck

template<typename Curve >
CommitmentKey bb::MockClaimGenerator< Curve >::ck

Definition at line 34 of file mock_witness_generator.hpp.

◆ claim_batcher

template<typename Curve >
ClaimBatcher bb::MockClaimGenerator< Curve >::claim_batcher

Definition at line 49 of file mock_witness_generator.hpp.

◆ const_size_mle_opening_point

template<typename Curve >
std::vector<Fr> bb::MockClaimGenerator< Curve >::const_size_mle_opening_point

Definition at line 46 of file mock_witness_generator.hpp.

◆ interleave_data

template<typename Curve >
InterleaveData bb::MockClaimGenerator< Curve >::interleave_data

Definition at line 62 of file mock_witness_generator.hpp.

◆ k_magnitude

template<typename Curve >
constexpr size_t bb::MockClaimGenerator< Curve >::k_magnitude = 6
staticconstexpr

Definition at line 64 of file mock_witness_generator.hpp.

◆ polynomial_batcher

template<typename Curve >
PolynomialBatcher bb::MockClaimGenerator< Curve >::polynomial_batcher

Definition at line 48 of file mock_witness_generator.hpp.

◆ round_univariates

template<typename Curve >
std::vector<bb::Polynomial<Fr> > bb::MockClaimGenerator< Curve >::round_univariates

Definition at line 52 of file mock_witness_generator.hpp.

◆ sumcheck_commitments

template<typename Curve >
std::vector<Commitment> bb::MockClaimGenerator< Curve >::sumcheck_commitments

Definition at line 53 of file mock_witness_generator.hpp.

◆ sumcheck_evaluations

template<typename Curve >
std::vector<std::array<Fr, 3> > bb::MockClaimGenerator< Curve >::sumcheck_evaluations

Definition at line 54 of file mock_witness_generator.hpp.

◆ to_be_right_shifted_by_k

template<typename Curve >
ClaimData bb::MockClaimGenerator< Curve >::to_be_right_shifted_by_k

Definition at line 44 of file mock_witness_generator.hpp.

◆ to_be_shifted

template<typename Curve >
ClaimData bb::MockClaimGenerator< Curve >::to_be_shifted

Definition at line 43 of file mock_witness_generator.hpp.

◆ unshifted

template<typename Curve >
ClaimData bb::MockClaimGenerator< Curve >::unshifted

Definition at line 42 of file mock_witness_generator.hpp.


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