Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
merge_prover.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Complete, auditors: [Sergei], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
8
15
16namespace bb {
17
28 using PCS = KZG<Curve>;
32
33 public:
34 using MergeProof = std::vector<FF>;
35
37 std::shared_ptr<Transcript> transcript,
39
41
42 // Public for test access (computing commitments)
44
45 private:
46 std::shared_ptr<Transcript> transcript;
49
51 std::vector<std::string> labels_degree_check = { "LEFT_TABLE_DEGREE_CHECK_0",
52 "LEFT_TABLE_DEGREE_CHECK_1",
53 "LEFT_TABLE_DEGREE_CHECK_2",
54 "LEFT_TABLE_DEGREE_CHECK_3" };
55
56 std::vector<std::string> labels_shplonk_batching_challenges = {
57 "SHPLONK_MERGE_BATCHING_CHALLENGE_0", "SHPLONK_MERGE_BATCHING_CHALLENGE_1",
58 "SHPLONK_MERGE_BATCHING_CHALLENGE_2", "SHPLONK_MERGE_BATCHING_CHALLENGE_3",
59 "SHPLONK_MERGE_BATCHING_CHALLENGE_4", "SHPLONK_MERGE_BATCHING_CHALLENGE_5",
60 "SHPLONK_MERGE_BATCHING_CHALLENGE_6", "SHPLONK_MERGE_BATCHING_CHALLENGE_7",
61 "SHPLONK_MERGE_BATCHING_CHALLENGE_8", "SHPLONK_MERGE_BATCHING_CHALLENGE_9",
62 "SHPLONK_MERGE_BATCHING_CHALLENGE_10", "SHPLONK_MERGE_BATCHING_CHALLENGE_11",
63 "SHPLONK_MERGE_BATCHING_CHALLENGE_12"
64 };
65
79 const std::vector<FF>& degree_check_challenges);
80
93 const std::array<Polynomial, NUM_WIRES>& right_table,
94 const std::array<Polynomial, NUM_WIRES>& merged_table,
95 const std::vector<FF>& shplonk_batching_challenges,
96 const FF& kappa,
97 const FF& kappa_inv,
98 const Polynomial& reversed_batched_left_tables,
99 const std::vector<FF>& evals);
100
113 static OpeningClaim compute_shplonk_opening_claim(Polynomial& shplonk_batched_quotient,
114 const FF& shplonk_opening_challenge,
115 const std::array<Polynomial, NUM_WIRES>& left_table,
116 const std::array<Polynomial, NUM_WIRES>& right_table,
117 const std::array<Polynomial, NUM_WIRES>& merged_table,
118 const std::vector<FF>& shplonk_batching_challenges,
119 const FF& kappa,
120 const FF& kappa_inv,
121 Polynomial& reversed_batched_left_tables,
122 const std::vector<FF>& evals);
123};
124
125} // namespace bb
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
CommitmentKey object over a pairing group 𝔾₁.
Prover class for the Goblin ECC op queue transcript merge protocol.
static constexpr size_t NUM_WIRES
Curve::AffineElement Commitment
std::shared_ptr< ECCOpQueue > op_queue
std::vector< FF > MergeProof
MergeSettings settings
BB_PROFILE MergeProof construct_proof()
Prove proper construction of the aggregate Goblin ECC op queue polynomials T_j.
std::vector< std::string > labels_degree_check
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.
std::vector< std::string > labels_shplonk_batching_challenges
std::shared_ptr< Transcript > transcript
CommitmentKey pcs_commitment_key
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 Polynomial compute_degree_check_polynomial(const std::array< Polynomial, NUM_WIRES > &left_table, const std::vector< FF > &degree_check_challenges)
Compute the batched polynomial for the degree check.
Unverified claim (C,r,v) for some witness polynomial p(X) such that.
Definition claim.hpp:55
Opening pair (r,v) for some witness polynomial p(X) such that p(r) = v.
Definition claim.hpp:21
Polynomial p and an opening pair (r,v) such that p(r) = v.
Definition claim.hpp:36
typename Group::affine_element AffineElement
Definition bn254.hpp:22
bb::fr ScalarField
Definition bn254.hpp:18
#define BB_PROFILE
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
MergeSettings
The MergeSettings define whether an current subtable will be added at the beginning (PREPEND) or at t...
BaseTranscript< FrCodec, bb::crypto::Poseidon2< bb::crypto::Poseidon2Bn254ScalarFieldParams > > NativeTranscript
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13