|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Prover for the single-step Goblin ECC op queue merge protocol. More...
#include <merge_prover.hpp>
Public Types | |
| using | MergeProof = std::vector< FF > |
| using | Table = std::array< Polynomial, NUM_WIRES > |
Public Member Functions | |
| MergeProver (const std::shared_ptr< ECCOpQueue > &op_queue, std::shared_ptr< Transcript > transcript) | |
| Create MergeProver. | |
| BB_PROFILE MergeProof | construct_proof () |
| Prove proper construction of the aggregate Goblin ECC op queue polynomials T_j. | |
Public Attributes | |
| CommitmentKey | pcs_commitment_key |
Static Public Attributes | |
| static constexpr size_t | NUM_WIRES = MegaExecutionTraceBlocks::NUM_WIRES |
Private Types | |
| using | Curve = curve::BN254 |
| using | FF = Curve::ScalarField |
| using | Commitment = Curve::AffineElement |
| using | Polynomial = bb::Polynomial< FF > |
| using | CommitmentKey = bb::CommitmentKey< Curve > |
| using | PCS = KZG< Curve > |
| using | OpeningClaim = ProverOpeningClaim< Curve > |
| using | OpeningPair = bb::OpeningPair< Curve > |
| using | Transcript = NativeTranscript |
Private Member Functions | |
| Polynomial | compute_degree_check_polynomial (const std::array< Polynomial, NUM_WIRES > &left_table, const std::vector< FF > °ree_check_challenges) const |
| Compute the batched polynomial for the degree check. | |
Static Private Member Functions | |
| static Polynomial | compute_shplonk_batched_quotient (const std::array< Polynomial, NUM_WIRES > &left_table, const std::array< Polynomial, NUM_WIRES > &right_table, const std::array< Polynomial, NUM_WIRES > &merged_table, const std::vector< FF > &shplonk_batching_challenges, const FF &kappa, const FF &kappa_inv, const Polynomial &reversed_batched_left_tables, const std::vector< FF > &evals) |
| Compute the batched Shplonk quotient polynomial. | |
| static OpeningClaim | compute_shplonk_opening_claim (Polynomial &shplonk_batched_quotient, const FF &shplonk_opening_challenge, const std::array< Polynomial, NUM_WIRES > &left_table, const std::array< Polynomial, NUM_WIRES > &right_table, const std::array< Polynomial, NUM_WIRES > &merged_table, const std::vector< FF > &shplonk_batching_challenges, const FF &kappa, const FF &kappa_inv, Polynomial &reversed_batched_left_tables, const std::vector< FF > &evals) |
| Compute the partially evaluated Shplonk batched quotient and the resulting opening claim. | |
Private Attributes | |
| std::shared_ptr< Transcript > | transcript |
| std::shared_ptr< ECCOpQueue > | op_queue |
| size_t | fixed_append_shift_size = 0 |
| std::vector< std::string > | labels_degree_check |
| std::vector< std::string > | labels_shplonk_batching_challenges |
Prover for the single-step Goblin ECC op queue merge protocol.
Proves that the most recently merged subtable concatenates correctly with the prior aggregate table to form the new aggregate table. Used in the Chonk flow only for the final merge of the hiding kernel's subtable (placed at a fixed offset). For the multi-subtable batched merge proven once at the end of an IVC, see BatchMergeProver.
Definition at line 26 of file merge_prover.hpp.
|
private |
Definition at line 29 of file merge_prover.hpp.
|
private |
Definition at line 31 of file merge_prover.hpp.
|
private |
Definition at line 27 of file merge_prover.hpp.
|
private |
Definition at line 28 of file merge_prover.hpp.
| using bb::MergeProver::MergeProof = std::vector<FF> |
Definition at line 38 of file merge_prover.hpp.
|
private |
Definition at line 33 of file merge_prover.hpp.
|
private |
Definition at line 34 of file merge_prover.hpp.
|
private |
Definition at line 32 of file merge_prover.hpp.
|
private |
Definition at line 30 of file merge_prover.hpp.
| using bb::MergeProver::Table = std::array<Polynomial, NUM_WIRES> |
Definition at line 45 of file merge_prover.hpp.
|
private |
Definition at line 35 of file merge_prover.hpp.
|
explicit |
Create MergeProver.
We require an SRS at least as large as the current ultra ecc ops table TODO(https://github.com/AztecProtocol/barretenberg/issues/1267): consider possible efficiency improvements
Definition at line 19 of file merge_prover.cpp.
|
private |
Compute the batched polynomial for the degree check.
To show that \(\deg(L_j) < k\), the prover batches the \(L_i\)'s as \(\sum_i \alpha_i L_i\) and computes \(G(X) = (\sum_i \alpha_i L_i(X)) X^{k-1}\). The prover commits to \(G\) and later opens \(L_i\) at \(\kappa\) and \(G\) at \(\kappa^{-1}\), so to show that \(G(\kappa^{-1}) = (\sum_i \alpha_i L_i(\kappa)) * \kappa^{-(k-1)}\).
| left_table | |
| degree_check_challenges |
Definition at line 31 of file merge_prover.cpp.
|
staticprivate |
Compute the batched Shplonk quotient polynomial.
This function computes the polynomial \(Q(X)\) such that \(Q(X) * (X - \kappa) * (X - \kappa^{-1}) = F(X)\), where \(F(X)\) is defined as
\[ (X - \kappa^{-1}) * (\sum_i \beta_i (L_i - l_i) + \sum_i \beta_i (R_i - r_i) + \sum_i \beta_i (M_i - m_i)) + (X - \kappa) * \beta_i (G - g) \]
Definition at line 42 of file merge_prover.cpp.
|
staticprivate |
Compute the partially evaluated Shplonk batched quotient and the resulting opening claim.
Compute the partially evaluated batched quotient \(Q'(X)\) defined as:
\[ -Q * (z - \kappa) + + (\sum_i \beta_i (L_i - l_i) + \sum_i \beta_i (R_i - r_i) + \sum_i \beta_i (M_i - m_i)) + (z - \kappa) / (z - \kappa^{-1}) * \beta_i (G - g) \]
and return the opening claim \(\{ Q', (z, 0) \}\).
Definition at line 91 of file merge_prover.cpp.
| MergeProver::MergeProof bb::MergeProver::construct_proof | ( | ) |
Prove proper construction of the aggregate Goblin ECC op queue polynomials T_j.
Proves that M_j(X) = L_j(X) + X^k * R_j(X) and deg(L_j) < k for j = 1,2,3,4. Uses degree-check polynomial G(X) and Shplonk for batched openings.
L = aggregate table up to and including the tail subtable (T_tail), R = the hiding kernel's subtable (t, appended at a fixed offset and carrying APPEND_TRACE_OFFSET leading zeros), M = the resulting full table (T).
Definition at line 156 of file merge_prover.cpp.
|
private |
Definition at line 52 of file merge_prover.hpp.
|
private |
Definition at line 54 of file merge_prover.hpp.
|
private |
Definition at line 59 of file merge_prover.hpp.
|
staticconstexpr |
Definition at line 39 of file merge_prover.hpp.
|
private |
Definition at line 51 of file merge_prover.hpp.
| CommitmentKey bb::MergeProver::pcs_commitment_key |
Definition at line 47 of file merge_prover.hpp.
|
private |
Definition at line 50 of file merge_prover.hpp.