|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Implementation of the Sumcheck Verifier Round. More...
#include <sumcheck_round.hpp>
Public Types | |
| using | ClaimedEvaluations = typename Flavor::AllValues |
| using | ClaimedLibraEvaluations = typename std::vector< FF > |
| using | Transcript = typename Flavor::Transcript |
| using | Commitment = typename Flavor::Commitment |
| using | SumcheckRoundUnivariate = bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > |
Public Member Functions | |
| SumcheckVerifierRound (FF target_total_sum=0) | |
| void | check_sum (bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > &univariate) |
| Check that the round target sum is correct. | |
| void | compute_next_target_sum (bb::Univariate< FF, BATCHED_RELATION_PARTIAL_LENGTH > &univariate, FF &round_challenge) |
| Compute the next target sum. | |
| 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, std::span< const FF > multivariate_challenge={}) |
Evaluate the full Honk relation at the sumcheck challenge u. | |
| void | process_round (const std::shared_ptr< Transcript > &transcript, std::vector< FF > &multivariate_challenge, bb::GateSeparatorPolynomial< FF > &gate_separators, size_t round_idx) |
| Process a single sumcheck round: receive univariate from transcript, verify sum, generate challenge. | |
| bool | perform_final_verification (const FF &full_honk_purported_value) |
| Perform final verification: check that the computed target sum matches the full relation evaluation. i.e. the final evaluation check. | |
| std::vector< Commitment > | get_round_univariate_commitments () |
| Get round univariate commitments (only used for Grumpkin flavors). | |
| std::vector< std::array< FF, 3 > > | get_round_univariate_evaluations () |
| Get round univariate evaluations (only used for Grumpkin flavors). | |
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 |
| static constexpr size_t | BATCHED_RELATION_PARTIAL_LENGTH = Flavor::BATCHED_RELATION_PARTIAL_LENGTH |
Private Types | |
| using | FF = typename Flavor::FF |
| using | Utils = bb::RelationUtils< Flavor > |
| using | Relations = typename Flavor::Relations |
| using | TupleOfArraysOfValues = decltype(create_tuple_of_arrays_of_values< typename Flavor::Relations >()) |
| using | SubrelationSeparators = std::array< FF, Flavor::NUM_SUBRELATIONS - 1 > |
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 1131 of file sumcheck_round.hpp.
| using bb::SumcheckVerifierRound< Flavor, CommittedSumcheck >::ClaimedEvaluations = typename Flavor::AllValues |
Definition at line 1139 of file sumcheck_round.hpp.
| using bb::SumcheckVerifierRound< Flavor, CommittedSumcheck >::ClaimedLibraEvaluations = typename std::vector<FF> |
Definition at line 1140 of file sumcheck_round.hpp.
| using bb::SumcheckVerifierRound< Flavor, CommittedSumcheck >::Commitment = typename Flavor::Commitment |
Definition at line 1142 of file sumcheck_round.hpp.
|
private |
Definition at line 1132 of file sumcheck_round.hpp.
|
private |
Definition at line 1134 of file sumcheck_round.hpp.
|
private |
Definition at line 1136 of file sumcheck_round.hpp.
| using bb::SumcheckVerifierRound< Flavor, CommittedSumcheck >::SumcheckRoundUnivariate = bb::Univariate<FF, BATCHED_RELATION_PARTIAL_LENGTH> |
Definition at line 1147 of file sumcheck_round.hpp.
| using bb::SumcheckVerifierRound< Flavor, CommittedSumcheck >::Transcript = typename Flavor::Transcript |
Definition at line 1141 of file sumcheck_round.hpp.
|
private |
Definition at line 1135 of file sumcheck_round.hpp.
|
private |
Definition at line 1133 of file sumcheck_round.hpp.
|
inlineexplicit |
Definition at line 1152 of file sumcheck_round.hpp.
|
inline |
Check that the round target sum is correct.
Definition at line 1161 of file sumcheck_round.hpp.
|
inline |
Evaluate the full Honk relation at the sumcheck challenge u.
Row-disabling gating is internal: for UseRowDisablingPolynomial<Flavor> && Flavor::HasZK, main-domain rels are scaled by (1 - L)(u) and offset-only rels by L(u); otherwise factors collapse to (1, 0) (offset-only rels drop out).
Definition at line 1198 of file sumcheck_round.hpp.
|
inline |
Compute the next target sum.
Definition at line 1186 of file sumcheck_round.hpp.
|
inline |
Get round univariate commitments (only used for Grumpkin flavors).
Definition at line 1263 of file sumcheck_round.hpp.
|
inline |
Get round univariate evaluations (only used for Grumpkin flavors).
Definition at line 1268 of file sumcheck_round.hpp.
|
inline |
Perform final verification: check that the computed target sum matches the full relation evaluation. i.e. the final evaluation check.
Definition at line 1248 of file sumcheck_round.hpp.
|
inline |
Process a single sumcheck round: receive univariate from transcript, verify sum, generate challenge.
Definition at line 1224 of file sumcheck_round.hpp.
|
staticconstexpr |
Definition at line 1146 of file sumcheck_round.hpp.
|
staticconstexpr |
Definition at line 1145 of file sumcheck_round.hpp.
| TupleOfArraysOfValues bb::SumcheckVerifierRound< Flavor, CommittedSumcheck >::relation_evaluations |
Definition at line 1150 of file sumcheck_round.hpp.
| bool bb::SumcheckVerifierRound< Flavor, CommittedSumcheck >::round_failed = false |
Definition at line 1144 of file sumcheck_round.hpp.
| FF bb::SumcheckVerifierRound< Flavor, CommittedSumcheck >::target_total_sum = 0 |
Definition at line 1149 of file sumcheck_round.hpp.