58 :
srs(
srs::get_crs_factory<
Curve>()->get_crs(num_points))
85 " points with an SRS of size ",
88 return scalar_multiplication::pippenger_unsafe<Curve>(polynomial, point_table, has_duplicates_hint);
106 scalar_spans.reserve(polynomials.size());
108 for (
auto& polynomial : polynomials) {
109 const size_t consumed_srs = polynomial.start_index() + polynomial.size();
113 " points with an SRS of size ",
116 scalar_spans.emplace_back(polynomial.start_index(), polynomial.coeffs());
121 return std::vector<Commitment>(results.begin(), results.end());
134 for (
size_t i = 0; i < commitments.size(); ++i) {
135 transcript->send_to_verifier(
labels[i], commitments[i]);
142 wires.push_back(poly);
#define BB_BENCH_NAME(name)
CommitmentKey object over a pairing group 𝔾₁.
size_t get_monomial_size() const
typename Curve::ScalarField Fr
std::span< Commitment > get_monomial_points() const
typename Curve::AffineElement Commitment
CommitmentKey(const size_t num_points)
Construct a new Kate Commitment Key object from existing SRS.
std::vector< Commitment > batch_commit(RefSpan< Polynomial< Fr > > polynomials, std::span< const uint8_t > has_duplicates_hints={}) const
Batch commitment to multiple polynomials.
bool initialized() const
Checks the commitment key is properly initialized.
std::shared_ptr< srs::factories::Crs< Curve > > srs
CommitBatch start_batch()
Commitment commit(PolynomialSpan< const Fr > polynomial, bool has_duplicates_hint=false) const
Uses the ProverSRS to create a commitment to p(X)
Structured polynomial class that represents the coefficients 'a' of a_0 + a_1 x .....
A template class for a reference vector. Behaves as if std::vector<T&> was possible.
typename Group::affine_element AffineElement
static std::vector< AffineElement > batch_multi_scalar_mul(std::span< const AffineElement > points, std::span< PolynomialSpan< ScalarField > > scalars, bool handle_edge_cases=true, std::span< const uint8_t > dedup_hints={}) noexcept
std::string format(Args... args)
Entry point for Barretenberg command-line interface.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::vector< std::string > labels
void add_to_batch(Polynomial< Fr > &poly, const std::string &label, bool has_duplicates_hint=false)
std::vector< uint8_t > has_duplicates_hints
RefVector< Polynomial< Fr > > wires
std::vector< Commitment > commit_and_send_to_verifier(auto transcript)
void throw_or_abort(std::string const &err)