From e358648eef4f45958e6a55a926d306c5db97afd7 Mon Sep 17 00:00:00 2001 From: maramihali Date: Sat, 7 Oct 2023 12:36:14 +0000 Subject: [PATCH] link issues properly --- .../barretenberg/honk/proof_system/protogalaxy.test.cpp | 3 ++- .../honk/proof_system/protogalaxy_prover.cpp | 5 +++-- .../honk/proof_system/protogalaxy_prover.hpp | 9 +++------ .../honk/proof_system/protogalaxy_verifier.cpp | 2 +- barretenberg/cpp/src/barretenberg/polynomials/pow.hpp | 1 - 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy.test.cpp b/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy.test.cpp index 7556e261821e..75a8113c3752 100644 --- a/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy.test.cpp +++ b/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy.test.cpp @@ -17,7 +17,8 @@ namespace protogalaxy_utils_tests { namespace { auto& engine = numeric::random::get_debug_engine(); } - +// TODO(https://github.com/AztecProtocol/barretenberg/issues/744): make testing utility with functionality shared +// amongst test files in the proof system barretenberg::Polynomial get_random_polynomial(size_t size) { auto poly = barretenberg::Polynomial(size); diff --git a/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.cpp b/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.cpp index 37814d86d85e..d14858bd80a3 100644 --- a/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.cpp +++ b/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.cpp @@ -37,12 +37,13 @@ template void ProtoGalaxyProver_::prepa } } -// TODO(#689): finalise implementation this function +// TODO(#https://github.com/AztecProtocol/barretenberg/issues/689): finalise implementation this function template ProverFoldingResult ProtoGalaxyProver_::fold_instances() { prepare_for_folding(); - // TODO(#740): Handle the case where we are folding for the first time and accumulator is 0 + // TODO(#https://github.com/AztecProtocol/barretenberg/issues/740): Handle the case where we are folding for the + // first time and accumulator is 0 auto [alpha, delta] = transcript.get_challenges("alpha", "delta"); auto accumulator = get_accumulator(); auto instance_size = accumulator->prover_polynomials[0].size(); diff --git a/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.hpp b/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.hpp index 54a7af56b374..95e36f659025 100644 --- a/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.hpp +++ b/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_prover.hpp @@ -123,7 +123,8 @@ template class ProtoGalaxyProver_ { * the tree, label the branch connecting the left node n_l to its parent by 1 and for the right node n_r by β_i + * δ_i X. The value of the parent node n will be constructed as n = n_l + n_r * (β_i + δ_i X). Recurse over each * layer until the root is reached which will correspond to the perturbator polynomial F(X). - * TODO(insert issue): make this more memory efficient + * TODO(https://github.com/AztecProtocol/barretenberg/issues/745): make computation of perturbator more memory + * efficient */ static std::vector construct_perturbator_coeffs(std::vector betas, std::vector deltas, @@ -146,14 +147,10 @@ template class ProtoGalaxyProver_ { */ static Polynomial compute_perturbator(std::shared_ptr accumulator, std::vector deltas, FF alpha) { - auto instance_size = accumulator->prover_polynomials[0].size(); - auto const log_instance_size = static_cast(numeric::get_msb(instance_size)); - assert(deltas.size() == log_instance_size); auto full_honk_evaluations = compute_full_honk_evaluations(accumulator->prover_polynomials, alpha, accumulator->relation_parameters); - info("evals from compute", full_honk_evaluations); auto betas = accumulator->folding_params.gate_separation_challenges; - assert(betas.size() == log_instance_size); + assert(betas.size() == deltas.size()); auto coeffs = construct_perturbator_coeffs(betas, deltas, full_honk_evaluations); return Polynomial(coeffs); } diff --git a/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_verifier.cpp b/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_verifier.cpp index 049e11051c2d..b04cd7ad7d4a 100644 --- a/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_verifier.cpp +++ b/barretenberg/cpp/src/barretenberg/honk/proof_system/protogalaxy_verifier.cpp @@ -40,7 +40,7 @@ VerifierFoldingResult ProtoGalaxyVerifier_< perturbator[idx] = transcript.template receive_from_prover("perturbator_" + std::to_string(idx)); } - // TODO(#690): implement the Protogalaxy verifier logic + // TODO(https://github.com/AztecProtocol/barretenberg/issues/690): finalise the Protogalaxy verifier logic VerifierFoldingResult res; return res; } diff --git a/barretenberg/cpp/src/barretenberg/polynomials/pow.hpp b/barretenberg/cpp/src/barretenberg/polynomials/pow.hpp index 77a0a53030fb..9039266cac09 100644 --- a/barretenberg/cpp/src/barretenberg/polynomials/pow.hpp +++ b/barretenberg/cpp/src/barretenberg/polynomials/pow.hpp @@ -90,7 +90,6 @@ namespace barretenberg { * = pow(u_{0}, ..., u_{d-1}) // Full evaluation of pow * - σ_{ d } =?= c_{d}⋅P(u_{0}, ..., u_{d-1}) // Compare against real evaluation of P'(u) */ -// this can be used to compute deltas for each round as it is template struct PowUnivariate { // ζ_{l}, initialized as ζ_{0} = ζ // At round l, equals ζ^{ 2^l }