|
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 = std::array< FF, Flavor::NUM_SUBRELATIONS - 1 > |
| using | Commitment = typename Flavor::Commitment |
Public Member Functions | |
| 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, const std::vector< FF > &gate_challenges, const std::vector< FF > &padding_indicator_array) |
| The Sumcheck verification method. First it extracts round univariate, checks sum (the sumcheck univariate consistency check), 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. | |
Public Attributes | |
| std::shared_ptr< Transcript > | transcript |
| SumcheckVerifierRound< Flavor > | round |
| size_t | virtual_log_n |
| SubrelationSeparators | alphas |
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 719 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 729 of file sumcheck.hpp.
| using bb::SumcheckVerifier< Flavor >::ClaimedLibraEvaluations = typename std::vector<FF> |
Definition at line 732 of file sumcheck.hpp.
| using bb::SumcheckVerifier< Flavor >::Commitment = typename Flavor::Commitment |
Definition at line 735 of file sumcheck.hpp.
| using bb::SumcheckVerifier< Flavor >::FF = typename Flavor::FF |
Definition at line 723 of file sumcheck.hpp.
| using bb::SumcheckVerifier< Flavor >::SubrelationSeparators = std::array<FF, Flavor::NUM_SUBRELATIONS - 1> |
Definition at line 734 of file sumcheck.hpp.
| using bb::SumcheckVerifier< Flavor >::Transcript = typename Flavor::Transcript |
Definition at line 733 of file sumcheck.hpp.
| using bb::SumcheckVerifier< Flavor >::Utils = bb::RelationUtils<Flavor> |
Definition at line 722 of file sumcheck.hpp.
|
inlineexplicit |
Definition at line 758 of file sumcheck.hpp.
|
inline |
The Sumcheck verification method. First it extracts round univariate, checks sum (the sumcheck univariate consistency check), 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 | |
| gate_challenges | |
| padding_indicator | Optional padding indicator (only used for non-Grumpkin flavors) |
[Final Verification Step]
Definition at line 777 of file sumcheck.hpp.
| SubrelationSeparators bb::SumcheckVerifier< Flavor >::alphas |
Definition at line 756 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 741 of file sumcheck.hpp.
|
staticconstexpr |
The number of Prover Polynomials \( P_1, \ldots, P_N \) specified by the Flavor.
Definition at line 746 of file sumcheck.hpp.
| SumcheckVerifierRound<Flavor> bb::SumcheckVerifier< Flavor >::round |
Definition at line 749 of file sumcheck.hpp.
| std::shared_ptr<Transcript> bb::SumcheckVerifier< Flavor >::transcript |
Definition at line 748 of file sumcheck.hpp.
| size_t bb::SumcheckVerifier< Flavor >::virtual_log_n |
Definition at line 752 of file sumcheck.hpp.