Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
ledwards2225 committed Sep 12, 2023
1 parent 9d6d6a1 commit aa59518
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,20 +299,20 @@ template <UltraFlavor Flavor> void UltraProver_<Flavor>::execute_op_queue_transc
// T_{i-1}(γ)
auto polynomial = Polynomial(prev_aggregate_ecc_op_transcript[idx]);
auto evaluation = polynomial.evaluate(kappa);
univariate_openings.opening_pairs.emplace_back(kappa, evaluation);
univariate_openings.opening_pairs.emplace_back(OpenPair{kappa, evaluation});
univariate_openings.witnesses.emplace_back(std::move(polynomial));
transcript.send_to_verifier("prev_agg_ecc_op_queue_eval_" + suffix, evaluation);

// t_i^{shift}(γ)
evaluation = right_shifted_op_wires[idx].evaluate(kappa);
univariate_openings.opening_pairs.emplace_back(kappa, evaluation);
univariate_openings.opening_pairs.emplace_back(OpenPair{kappa, evaluation});
univariate_openings.witnesses.emplace_back(std::move(right_shifted_op_wires[idx]));
transcript.send_to_verifier("op_wire_eval_" + suffix, evaluation);

// T_i(γ)
polynomial = Polynomial(aggregate_ecc_op_transcript[idx]);
evaluation = polynomial.evaluate(kappa);
univariate_openings.opening_pairs.emplace_back(kappa, evaluation);
univariate_openings.opening_pairs.emplace_back(OpenPair{kappa, evaluation});
univariate_openings.witnesses.emplace_back(std::move(polynomial));
transcript.send_to_verifier("agg_ecc_op_queue_eval_" + suffix, evaluation);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ template <UltraFlavor Flavor> class UltraProver_ {
using ProverPolynomials = typename Flavor::ProverPolynomials;
using CommitmentLabels = typename Flavor::CommitmentLabels;
using Curve = typename Flavor::Curve;
using OpenPair = pcs::OpeningPair<Curve>;

public:
explicit UltraProver_(std::shared_ptr<ProvingKey> input_key, std::shared_ptr<CommitmentKey> commitment_key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,29 +184,6 @@ template <typename Fr> class Polynomial {
zero_memory_beyond(size_);
}

/**
* @brief Returns the right-shift of self by given magnitude k.
*
* @details Asserts that the last k coefficients of self are zero.
*/
[[nodiscard]] Polynomial get_right_shifted(size_t shift_size = 1) const
{
ASSERT(size_ > 0);
ASSERT(shift_size < size_);
// Ensure that the last k coefficients of the pre-shifted polynomial are zero
for (size_t i = 0; i < shift_size; ++i) {
size_t idx = size_ - shift_size - 1;
ASSERT(coefficients_[(std::ptrdiff_t)idx].is_zero());
}
// Compute the right-shift-by-k of the polynomial
// Note: first shift_size coefficients of result will be zero
Polynomial right_shifted(size_);
for (size_t idx = 0; idx < size_ - shift_size; ++idx) {
right_shifted.at(idx + shift_size) = coefficients_[(std::ptrdiff_t)idx];
}
return right_shifted;
}

/**
* @brief adds the polynomial q(X) 'other', multiplied by a scaling factor.
*
Expand Down

0 comments on commit aa59518

Please sign in to comment.