Barretenberg
The ZK-SNARK library at the core of Aztec
|
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 |
Implementation of the Sumcheck Verifier Round.
This Flavor contains the methods
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.
using bb::SumcheckVerifierRound< Flavor >::ClaimedEvaluations = typename Flavor::AllValues |
Definition at line 736 of file sumcheck_round.hpp.
using bb::SumcheckVerifierRound< Flavor >::ClaimedLibraEvaluations = typename std::vector<FF> |
Definition at line 737 of file sumcheck_round.hpp.
using bb::SumcheckVerifierRound< Flavor >::FF = typename Flavor::FF |
Definition at line 735 of file sumcheck_round.hpp.
|
private |
Definition at line 730 of file sumcheck_round.hpp.
|
private |
Definition at line 732 of file sumcheck_round.hpp.
using bb::SumcheckVerifierRound< Flavor >::SumcheckRoundUnivariate = bb::Univariate<FF, BATCHED_RELATION_PARTIAL_LENGTH> |
Definition at line 750 of file sumcheck_round.hpp.
|
private |
Definition at line 731 of file sumcheck_round.hpp.
|
private |
Definition at line 729 of file sumcheck_round.hpp.
|
inlineexplicit |
Definition at line 756 of file sumcheck_round.hpp.
|
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) \)
univariate | Round univariate \(\tilde{S}^{i}\) represented by its evaluations over \(0,\ldots,D\). |
Definition at line 770 of file sumcheck_round.hpp.
|
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.
|
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) \).
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.
|
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.
|
staticconstexpr |
Number of batched sub-relations in \(F\) specified by Flavor.
Definition at line 744 of file sumcheck_round.hpp.
TupleOfArraysOfValues bb::SumcheckVerifierRound< Flavor >::relation_evaluations |
Definition at line 754 of file sumcheck_round.hpp.
bool bb::SumcheckVerifierRound< Flavor >::round_failed = false |
Definition at line 739 of file sumcheck_round.hpp.
FF bb::SumcheckVerifierRound< Flavor >::target_total_sum = 0 |
Definition at line 752 of file sumcheck_round.hpp.