Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,13 @@ template <class Curve> class CommitmentKey {
// First batch, create the commitments vector
std::vector<Commitment> commitments;

max_batch_size = 1;
for (size_t i = 0; i < polynomials.size();) {
// Note: have to be careful how we compute this to not overlow e.g. max_batch_size + 1 would
size_t batch_size = std::min(max_batch_size, polynomials.size() - i);
size_t batch_end = i + batch_size;

// Prepare spans for batch MSM
std::vector<std::span<const G1>> points_spans;
// Note, we need to const_cast unfortunately as pippenger takes non-const spans
// as it converts back and forth from montgomery form
std::vector<std::span<Fr>> scalar_spans;

for (auto& polynomial : polynomials.subspan(i, batch_end - i)) {
Expand Down
Loading