21 const std::shared_ptr<Transcript>& transcript)
23 , transcript(transcript)
71 left_table =
op_queue->construct_current_ultra_ops_subtable_columns();
72 right_table =
op_queue->construct_previous_ultra_ops_table_columns();
74 left_table =
op_queue->construct_previous_ultra_ops_table_columns();
75 right_table =
op_queue->construct_current_ultra_ops_subtable_columns();
78 for (
size_t idx = 0; idx <
NUM_WIRES; ++idx) {
79 left_table_reversed[idx] = left_table[idx].reverse();
82 const size_t merged_table_size = merged_table[0].size();
87 const size_t shift_size = left_table[0].size();
88 transcript->send_to_verifier(
"shift_size",
static_cast<uint32_t
>(shift_size));
92 for (
size_t idx = 0; idx <
NUM_WIRES; ++idx) {
100 const FF kappa =
transcript->template get_challenge<FF>(
"kappa");
101 const FF pow_kappa = kappa.
pow(shift_size);
102 const FF kappa_inv = kappa.
invert();
115 for (
size_t idx = 0; idx <
NUM_WIRES; ++idx) {
116 Polynomial partially_evaluated_difference(merged_table_size);
117 partially_evaluated_difference += left_table[idx];
118 partially_evaluated_difference.add_scaled(right_table[idx], pow_kappa);
119 partially_evaluated_difference -= merged_table[idx];
121 opening_claims.emplace_back(
OpeningClaim{ partially_evaluated_difference, { kappa,
FF(0) } });
124 for (
size_t idx = 0; idx <
NUM_WIRES; ++idx) {
128 evaluation = left_table[idx].evaluate(kappa_inv);
130 opening_claims.emplace_back(
OpeningClaim{ left_table[idx], { kappa_inv, evaluation } });
133 evaluation = left_table_reversed[idx].evaluate(kappa);
135 opening_claims.emplace_back(
OpeningClaim{ left_table_reversed[idx], { kappa, evaluation } });
CommitmentKey object over a pairing group 𝔾₁.
Commitment commit(PolynomialSpan< const Fr > polynomial) const
Uses the ProverSRS to create a commitment to p(X)
bool initialized() const
Checks the commitment key is properly initialized.
static void compute_opening_proof(const CK &ck, const ProverOpeningClaim< Curve > &opening_claim, const std::shared_ptr< Transcript > &prover_trancript)
Computes the KZG commitment to an opening proof polynomial at a single evaluation point.
static constexpr size_t NUM_WIRES
std::shared_ptr< ECCOpQueue > op_queue
BB_PROFILE MergeProof construct_proof()
std::vector< FF > MergeProof
ProverOpeningClaim< Curve > OpeningClaim
MergeProver(const std::shared_ptr< ECCOpQueue > &op_queue, const MergeSettings settings=MergeSettings::PREPEND, const CommitmentKey &commitment_key=CommitmentKey(), const std::shared_ptr< Transcript > &transcript=std::make_shared< Transcript >())
Create MergeProver.
std::shared_ptr< Transcript > transcript
CommitmentKey pcs_commitment_key
bb::CommitmentKey< Curve > CommitmentKey
static ProverOpeningClaim< Curve > prove(const CommitmentKey< Curve > &commitment_key, std::span< ProverOpeningClaim< Curve > > opening_claims, const std::shared_ptr< Transcript > &transcript, std::span< ProverOpeningClaim< Curve > > libra_opening_claims={}, std::span< ProverOpeningClaim< Curve > > sumcheck_round_claims={}, const size_t virtual_log_n=0)
Returns a batched opening claim equivalent to a set of opening claims consisting of polynomials,...
typename Flavor::Polynomial Polynomial
Entry point for Barretenberg command-line interface.
MergeSettings
The MergeSettings define whether an current subtable will be added at the beginning (PREPEND) or at t...
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::string to_string(bb::avm2::ValueTag tag)
BB_INLINE constexpr field pow(const uint256_t &exponent) const noexcept
constexpr field invert() const noexcept