Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::SumcheckVerifierRound< Flavor > Class Template Reference

Implementation of the Sumcheck Verifier Round. More...

#include <sumcheck_round.hpp>

Public Types

using FF = typename Flavor::FF
 
using ClaimedEvaluations = typename Flavor::AllValues
 
using ClaimedLibraEvaluations = typename std::vector< FF >
 
using SumcheckRoundUnivariate = bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH >
 

Public Member Functions

 SumcheckVerifierRound (FF target_total_sum=0)
 
bool check_sum (bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > &univariate, const FF &indicator)
 Check that the round target sum is correct.
 
void compute_next_target_sum (bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > &univariate, FF &round_challenge, const FF &indicator)
 After checking that the univariate is good for this round, compute the next target sum given by the evaluation \( \tilde{S}^i(u_i) \).
 
FF compute_full_relation_purported_value (const ClaimedEvaluations &purported_evaluations, const bb::RelationParameters< FF > &relation_parameters, const bb::GateSeparatorPolynomial< FF > &gate_separators, const SubrelationSeparators &alphas)
 Given the evaluations \(P_1(u_0,\ldots, u_{d-1}), \ldots, P_N(u_0,\ldots, u_{d-1}) \) of the ProverPolynomials at the challenge point \((u_0,\ldots, u_{d-1})\) stored in purported_evaluations, this method computes the evaluation of \( \tilde{F} \) taking these values as arguments.
 

Public Attributes

bool round_failed = false
 
FF target_total_sum = 0
 
TupleOfArraysOfValues relation_evaluations
 

Static Public Attributes

static constexpr size_t NUM_RELATIONS = Flavor::NUM_RELATIONS
 Number of batched sub-relations in \(F\) specified by Flavor.
 
static constexpr size_t BATCHED_RELATION_PARTIAL_LENGTH = Flavor::BATCHED_RELATION_PARTIAL_LENGTH
 The partial algebraic degree of the relation \(\tilde F = pow \cdot F \), i.e. MAX_PARTIAL_RELATION_LENGTH + 1.
 

Private Types

using Utils = bb::RelationUtils< Flavor >
 
using Relations = typename Flavor::Relations
 
using TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values< typename Flavor::Relations >())
 
using SubrelationSeparators = typename Flavor::SubrelationSeparators
 

Detailed Description

template<typename Flavor>
class bb::SumcheckVerifierRound< Flavor >

Implementation of the Sumcheck Verifier Round.

This Flavor contains the methods

  • Check target sum: \(\quad \sigma_{ i } \stackrel{?}{=} \tilde{S}^i(0) + \tilde{S}^i(1) \)
  • Compute next targetsum" : \( \quad \sigma_{i+1} \gets \tilde{S}^i(u_i) \) required in Round \( i = 0,\ldots, d-1 \).

The last step of the verifification requires to compute the value \( pow(u_0,\ldots, u_{d-1}) \cdot F \left(P_1(u_0,\ldots, u_{d-1}), \ldots, P_N(u_0,\ldots, u_{d-1}) \right) \) implemented as

Definition at line 728 of file sumcheck_round.hpp.

Member Typedef Documentation

◆ ClaimedEvaluations

template<typename Flavor >
using bb::SumcheckVerifierRound< Flavor >::ClaimedEvaluations = typename Flavor::AllValues

Definition at line 736 of file sumcheck_round.hpp.

◆ ClaimedLibraEvaluations

template<typename Flavor >
using bb::SumcheckVerifierRound< Flavor >::ClaimedLibraEvaluations = typename std::vector<FF>

Definition at line 737 of file sumcheck_round.hpp.

◆ FF

template<typename Flavor >
using bb::SumcheckVerifierRound< Flavor >::FF = typename Flavor::FF

Definition at line 735 of file sumcheck_round.hpp.

◆ Relations

template<typename Flavor >
using bb::SumcheckVerifierRound< Flavor >::Relations = typename Flavor::Relations
private

Definition at line 730 of file sumcheck_round.hpp.

◆ SubrelationSeparators

template<typename Flavor >
using bb::SumcheckVerifierRound< Flavor >::SubrelationSeparators = typename Flavor::SubrelationSeparators
private

Definition at line 732 of file sumcheck_round.hpp.

◆ SumcheckRoundUnivariate

template<typename Flavor >
using bb::SumcheckVerifierRound< Flavor >::SumcheckRoundUnivariate = bb::Univariate<FF, BATCHED_RELATION_PARTIAL_LENGTH>

Definition at line 750 of file sumcheck_round.hpp.

◆ TupleOfArraysOfValues

template<typename Flavor >
using bb::SumcheckVerifierRound< Flavor >::TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values<typename Flavor::Relations>())
private

Definition at line 731 of file sumcheck_round.hpp.

◆ Utils

template<typename Flavor >
using bb::SumcheckVerifierRound< Flavor >::Utils = bb::RelationUtils<Flavor>
private

Definition at line 729 of file sumcheck_round.hpp.

Constructor & Destructor Documentation

◆ SumcheckVerifierRound()

template<typename Flavor >
bb::SumcheckVerifierRound< Flavor >::SumcheckVerifierRound ( FF  target_total_sum = 0)
inlineexplicit

Definition at line 756 of file sumcheck_round.hpp.

Member Function Documentation

◆ check_sum()

template<typename Flavor >
bool bb::SumcheckVerifierRound< Flavor >::check_sum ( bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > &  univariate,
const FF indicator 
)
inline

Check that the round target sum is correct.

The verifier receives the claimed evaluations of the round univariate \( \tilde{S}^i \) at \(X_i = 0,\ldots, D \) and checks \(\sigma_i = \tilde{S}^{i-1}(u_{i-1}) \stackrel{?}{=} \tilde{S}^i(0) + \tilde{S}^i(1) \)

Parameters
univariateRound univariate \(\tilde{S}^{i}\) represented by its evaluations over \(0,\ldots,D\).

Definition at line 770 of file sumcheck_round.hpp.

◆ compute_full_relation_purported_value()

template<typename Flavor >
FF bb::SumcheckVerifierRound< Flavor >::compute_full_relation_purported_value ( const ClaimedEvaluations purported_evaluations,
const bb::RelationParameters< FF > &  relation_parameters,
const bb::GateSeparatorPolynomial< FF > &  gate_separators,
const SubrelationSeparators alphas 
)
inline

Given the evaluations \(P_1(u_0,\ldots, u_{d-1}), \ldots, P_N(u_0,\ldots, u_{d-1}) \) of the ProverPolynomials at the challenge point \((u_0,\ldots, u_{d-1})\) stored in purported_evaluations, this method computes the evaluation of \( \tilde{F} \) taking these values as arguments.

Definition at line 812 of file sumcheck_round.hpp.

◆ compute_next_target_sum()

template<typename Flavor >
void bb::SumcheckVerifierRound< Flavor >::compute_next_target_sum ( bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > &  univariate,
FF round_challenge,
const FF indicator 
)
inline

After checking that the univariate is good for this round, compute the next target sum given by the evaluation \( \tilde{S}^i(u_i) \).

Parameters
univariate\( \tilde{S}^i(X) \), given by its evaluations over \( \{0,1,2,\ldots, D\}\).
round_challenge\( u_i\)

Definition at line 798 of file sumcheck_round.hpp.

Member Data Documentation

◆ BATCHED_RELATION_PARTIAL_LENGTH

template<typename Flavor >
constexpr size_t bb::SumcheckVerifierRound< Flavor >::BATCHED_RELATION_PARTIAL_LENGTH = Flavor::BATCHED_RELATION_PARTIAL_LENGTH
staticconstexpr

The partial algebraic degree of the relation \(\tilde F = pow \cdot F \), i.e. MAX_PARTIAL_RELATION_LENGTH + 1.

Definition at line 749 of file sumcheck_round.hpp.

◆ NUM_RELATIONS

template<typename Flavor >
constexpr size_t bb::SumcheckVerifierRound< Flavor >::NUM_RELATIONS = Flavor::NUM_RELATIONS
staticconstexpr

Number of batched sub-relations in \(F\) specified by Flavor.

Definition at line 744 of file sumcheck_round.hpp.

◆ relation_evaluations

template<typename Flavor >
TupleOfArraysOfValues bb::SumcheckVerifierRound< Flavor >::relation_evaluations

Definition at line 754 of file sumcheck_round.hpp.

◆ round_failed

template<typename Flavor >
bool bb::SumcheckVerifierRound< Flavor >::round_failed = false

Definition at line 739 of file sumcheck_round.hpp.

◆ target_total_sum

template<typename Flavor >
FF bb::SumcheckVerifierRound< Flavor >::target_total_sum = 0

Definition at line 752 of file sumcheck_round.hpp.


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