21 const std::shared_ptr<Transcript>& transcript)
23 , transcript(transcript)
29 size_t last_subtable_size =
op_queue->get_current_subtable_size();
78 left_table =
op_queue->construct_current_ultra_ops_subtable_columns();
79 right_table =
op_queue->construct_previous_ultra_ops_table_columns();
81 left_table =
op_queue->construct_previous_ultra_ops_table_columns();
82 right_table =
op_queue->construct_current_ultra_ops_subtable_columns();
85 for (
size_t idx = 0; idx <
NUM_WIRES; ++idx) {
86 left_table_reversed[idx] = left_table[idx].reverse();
89 const size_t merged_table_size = merged_table[0].size();
94 const size_t shift_size = left_table[0].size();
95 transcript->send_to_verifier(
"shift_size",
static_cast<uint32_t
>(shift_size));
99 for (
size_t idx = 0; idx <
NUM_WIRES; ++idx) {
107 const FF kappa =
transcript->template get_challenge<FF>(
"kappa");
108 const FF pow_kappa = kappa.
pow(shift_size);
109 const FF kappa_inv = kappa.
invert();
122 for (
size_t idx = 0; idx <
NUM_WIRES; ++idx) {
123 Polynomial partially_evaluated_difference(merged_table_size);
124 partially_evaluated_difference += left_table[idx];
125 partially_evaluated_difference.add_scaled(right_table[idx], pow_kappa);
126 partially_evaluated_difference -= merged_table[idx];
128 opening_claims.emplace_back(
OpeningClaim{ partially_evaluated_difference, { kappa,
FF(0) } });
131 for (
size_t idx = 0; idx <
NUM_WIRES; ++idx) {
135 evaluation = left_table[idx].evaluate(kappa_inv);
137 opening_claims.emplace_back(
OpeningClaim{ left_table[idx], { kappa_inv, evaluation } });
140 evaluation = left_table_reversed[idx].evaluate(kappa);
142 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 const size_t OP_QUEUE_SIZE
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