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 const CommitmentKey& commitment_key = CommitmentKey());
40
42
43 // Public for test access (computing commitments)
45
46 private:
47 std::shared_ptr<Transcript> transcript;
50
52 std::vector<std::string> labels_degree_check = { "LEFT_TABLE_DEGREE_CHECK_0",
53 "LEFT_TABLE_DEGREE_CHECK_1",
54 "LEFT_TABLE_DEGREE_CHECK_2",
55 "LEFT_TABLE_DEGREE_CHECK_3" };
56
57 std::vector<std::string> labels_shplonk_batching_challenges = {
58 "SHPLONK_MERGE_BATCHING_CHALLENGE_0", "SHPLONK_MERGE_BATCHING_CHALLENGE_1",
59 "SHPLONK_MERGE_BATCHING_CHALLENGE_2", "SHPLONK_MERGE_BATCHING_CHALLENGE_3",
60 "SHPLONK_MERGE_BATCHING_CHALLENGE_4", "SHPLONK_MERGE_BATCHING_CHALLENGE_5",
61 "SHPLONK_MERGE_BATCHING_CHALLENGE_6", "SHPLONK_MERGE_BATCHING_CHALLENGE_7",
62 "SHPLONK_MERGE_BATCHING_CHALLENGE_8", "SHPLONK_MERGE_BATCHING_CHALLENGE_9",
63 "SHPLONK_MERGE_BATCHING_CHALLENGE_10", "SHPLONK_MERGE_BATCHING_CHALLENGE_11",
64 "SHPLONK_MERGE_BATCHING_CHALLENGE_12"
65 };
66
80 const std::vector<FF>& degree_check_challenges);
81
94 const std::array<Polynomial, NUM_WIRES>& right_table,
95 const std::array<Polynomial, NUM_WIRES>& merged_table,
96 const std::vector<FF>& shplonk_batching_challenges,
97 const FF& kappa,
98 const FF& kappa_inv,
99 const Polynomial& reversed_batched_left_tables,
100 const std::vector<FF>& evals);
101
114 static OpeningClaim compute_shplonk_opening_claim(Polynomial& shplonk_batched_quotient,
115 const FF& shplonk_opening_challenge,
116 const std::array<Polynomial, NUM_WIRES>& left_table,
117 const std::array<Polynomial, NUM_WIRES>& right_table,
118 const std::array<Polynomial, NUM_WIRES>& merged_table,
119 const std::vector<FF>& shplonk_batching_challenges,
120 const FF& kappa,
121 const FF& kappa_inv,
122 Polynomial& reversed_batched_left_tables,
123 const std::vector<FF>& evals);
124};
125
126} // 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.
bb::CommitmentKey< Curve > CommitmentKey
Unverified claim (C,r,v) for some witness polynomial p(X) such that.
Definition claim.hpp:53
Opening pair (r,v) for some witness polynomial p(X) such that p(r) = v.
Definition claim.hpp:19
Polynomial p and an opening pair (r,v) such that p(r) = v.
Definition claim.hpp:34
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