Barretenberg
The ZK-SNARK library at the core of Aztec
|
Implementation of the sumcheck Verifier for statements of the form \(\sum_{\vec \ell \in \{0,1\}^d} pow_{\beta}(\vec \ell) \cdot F \left(P_1(\vec \ell),\ldots, P_N(\vec \ell) \right) = 0 \) for multilinear polynomials \(P_1, \ldots, P_N \). More...
#include <sumcheck.hpp>
Public Types | |
using | Utils = bb::RelationUtils< Flavor > |
using | FF = typename Flavor::FF |
using | ClaimedEvaluations = typename Flavor::AllValues |
Container type for the evaluations of Prover Polynomials \(P_1,\ldots,P_N\) at the challenge point \((u_0,\ldots, u_{d-1}) \). | |
using | ClaimedLibraEvaluations = typename std::vector< FF > |
using | Transcript = typename Flavor::Transcript |
using | SubrelationSeparators = typename Flavor::SubrelationSeparators |
using | Commitment = typename Flavor::Commitment |
Public Member Functions | |
SumcheckVerifier (std::shared_ptr< Transcript > transcript, SubrelationSeparators &relation_separator, size_t virtual_log_n, FF target_sum=0) | |
SumcheckVerifier (std::shared_ptr< Transcript > transcript, const FF &alpha, size_t virtual_log_n, FF target_sum=0) | |
SumcheckOutput< Flavor > | verify (const bb::RelationParameters< FF > &relation_parameters, std::vector< FF > &gate_challenges, const std::vector< FF > &padding_indicator_array) |
Extract round univariate, check sum, generate challenge, compute next target sum..., repeat until final round, then use purported evaluations to generate purported full Honk relation value and check against final target sum. | |
SumcheckOutput< Flavor > | verify (const bb::RelationParameters< FF > &relation_parameters, const std::vector< FF > &gate_challenges) |
Sumcheck Verifier for ECCVM and ECCVMRecursive. | |
Public Attributes | |
std::shared_ptr< Transcript > | transcript |
SumcheckVerifierRound< Flavor > | round |
size_t | virtual_log_n |
SubrelationSeparators | alphas |
FF | libra_evaluation { 0 } |
FF | libra_challenge |
FF | libra_total_sum |
FF | correcting_factor |
std::vector< Commitment > | round_univariate_commitments = {} |
std::vector< std::array< FF, 3 > > | round_univariate_evaluations = {} |
Static Public Attributes | |
static constexpr size_t | BATCHED_RELATION_PARTIAL_LENGTH = Flavor::BATCHED_RELATION_PARTIAL_LENGTH |
Maximum partial algebraic degree of the relation \(\tilde F = pow_{\beta} \cdot F \), i.e. MAX_PARTIAL_RELATION_LENGTH + 1. | |
static constexpr size_t | NUM_POLYNOMIALS = Flavor::NUM_ALL_ENTITIES |
The number of Prover Polynomials \( P_1, \ldots, P_N \) specified by the Flavor. | |
Implementation of the sumcheck Verifier for statements of the form \(\sum_{\vec \ell \in \{0,1\}^d} pow_{\beta}(\vec \ell) \cdot F \left(P_1(\vec \ell),\ldots, P_N(\vec \ell) \right) = 0 \) for multilinear polynomials \(P_1, \ldots, P_N \).
Init:
For \( i = 0,\ldots, d-1\):
Compute the challenge \(u_i\) from the transcript using get_challenge method.
Entering the final round, the Verifier has already checked that \(\quad \sigma_{ d-1 } = \tilde{S}^{d-2}(u_{d-2}) \stackrel{?}{=} \tilde{S}^{d-1}(0) + \tilde{S}^{d-1}(1) \) and computed \(\sigma_d = \tilde{S}^{d-1}(u_{d-1})\).
\begin{align}\tilde{F}\left( P_1(u_0,\ldots, u_{d-1}), \ldots, P_N(u_0,\ldots, u_{d-1}) \right)\end{align}
and store it at \( \texttt{full_honk_relation_purported_value} \).Compare \( \sigma_d \) against the evaluation of \( \tilde{F} \) at \(P_1(u_0,\ldots, u_{d-1}), \ldots, P_N(u_0,\ldots, u_{d-1})\):
\begin{align}\quad \sigma_{ d } \stackrel{?}{=} \tilde{F}\left(P_1(u_{0}, \ldots, u_{d-1}),\ldots, P_N(u_0,\ldots, u_{d-1})\right)\end{align}
Definition at line 645 of file sumcheck.hpp.
using bb::SumcheckVerifier< Flavor >::ClaimedEvaluations = typename Flavor::AllValues |
Container type for the evaluations of Prover Polynomials \(P_1,\ldots,P_N\) at the challenge point \((u_0,\ldots, u_{d-1}) \).
Definition at line 655 of file sumcheck.hpp.
using bb::SumcheckVerifier< Flavor >::ClaimedLibraEvaluations = typename std::vector<FF> |
Definition at line 658 of file sumcheck.hpp.
using bb::SumcheckVerifier< Flavor >::Commitment = typename Flavor::Commitment |
Definition at line 661 of file sumcheck.hpp.
using bb::SumcheckVerifier< Flavor >::FF = typename Flavor::FF |
Definition at line 649 of file sumcheck.hpp.
using bb::SumcheckVerifier< Flavor >::SubrelationSeparators = typename Flavor::SubrelationSeparators |
Definition at line 660 of file sumcheck.hpp.
using bb::SumcheckVerifier< Flavor >::Transcript = typename Flavor::Transcript |
Definition at line 659 of file sumcheck.hpp.
using bb::SumcheckVerifier< Flavor >::Utils = bb::RelationUtils<Flavor> |
Definition at line 648 of file sumcheck.hpp.
|
inlineexplicit |
Definition at line 692 of file sumcheck.hpp.
|
inlineexplicit |
Definition at line 701 of file sumcheck.hpp.
|
inline |
Sumcheck Verifier for ECCVM and ECCVMRecursive.
The verifier receives commitments to RoundUnivariates, along with their evaluations at 0 and 1. These evaluations will be proved as a part of Shplemini. The only check that the Verifier performs in this version is the comparison of the target sumcheck sum with the claimed evaluations of the first sumcheck round univariate at 0 and 1.
Note that the SumcheckOutput in this case contains a vector of commitments and a vector of arrays (of size 3) of evaluations at 0, 1, and a round challenge.
relation_parameters | |
alpha | |
gate_challenges |
[Final Verification Step]
Definition at line 818 of file sumcheck.hpp.
|
inline |
Extract round univariate, check sum, generate challenge, compute next target sum..., repeat until final round, then use purported evaluations to generate purported full Honk relation value and check against final target sum.
If verification fails, returns std::nullopt, otherwise returns SumcheckOutput
relation_parameters | |
transcript |
[Final Verification Step]
Definition at line 718 of file sumcheck.hpp.
SubrelationSeparators bb::SumcheckVerifier< Flavor >::alphas |
Definition at line 682 of file sumcheck.hpp.
|
staticconstexpr |
Maximum partial algebraic degree of the relation \(\tilde F = pow_{\beta} \cdot F \), i.e. MAX_PARTIAL_RELATION_LENGTH + 1.
Definition at line 667 of file sumcheck.hpp.
FF bb::SumcheckVerifier< Flavor >::correcting_factor |
Definition at line 687 of file sumcheck.hpp.
FF bb::SumcheckVerifier< Flavor >::libra_challenge |
Definition at line 684 of file sumcheck.hpp.
FF bb::SumcheckVerifier< Flavor >::libra_evaluation { 0 } |
Definition at line 683 of file sumcheck.hpp.
FF bb::SumcheckVerifier< Flavor >::libra_total_sum |
Definition at line 685 of file sumcheck.hpp.
|
staticconstexpr |
The number of Prover Polynomials \( P_1, \ldots, P_N \) specified by the Flavor.
Definition at line 672 of file sumcheck.hpp.
SumcheckVerifierRound<Flavor> bb::SumcheckVerifier< Flavor >::round |
Definition at line 675 of file sumcheck.hpp.
std::vector<Commitment> bb::SumcheckVerifier< Flavor >::round_univariate_commitments = {} |
Definition at line 689 of file sumcheck.hpp.
std::vector<std::array<FF, 3> > bb::SumcheckVerifier< Flavor >::round_univariate_evaluations = {} |
Definition at line 690 of file sumcheck.hpp.
std::shared_ptr<Transcript> bb::SumcheckVerifier< Flavor >::transcript |
Definition at line 674 of file sumcheck.hpp.
size_t bb::SumcheckVerifier< Flavor >::virtual_log_n |
Definition at line 678 of file sumcheck.hpp.