From bfbe828dab9d372f87fe13ce75ef7bc54a83d25c Mon Sep 17 00:00:00 2001 From: maramihali Date: Wed, 15 May 2024 09:57:47 +0000 Subject: [PATCH] increase N_max --- .../zeromorph/zeromorph.hpp | 2 +- .../protogalaxy_recursive_verifier.hpp | 70 +++++++++---------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp b/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp index 4811d32407ac..53c526759525 100644 --- a/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp +++ b/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp @@ -41,7 +41,7 @@ template class ZeroMorphProver_ { // TODO(#742): Set this N_max to be the number of G1 elements in the mocked zeromorph SRS once it's in place. // (Then, eventually, set it based on the real SRS). For now we set it to be large but more or less arbitrary. - static const size_t N_max = 1 << 22; + static const size_t N_max = 1 << 23; public: /** diff --git a/barretenberg/cpp/src/barretenberg/stdlib/honk_recursion/verifier/protogalaxy_recursive_verifier.hpp b/barretenberg/cpp/src/barretenberg/stdlib/honk_recursion/verifier/protogalaxy_recursive_verifier.hpp index dbc78b944e63..83572ad2d751 100644 --- a/barretenberg/cpp/src/barretenberg/stdlib/honk_recursion/verifier/protogalaxy_recursive_verifier.hpp +++ b/barretenberg/cpp/src/barretenberg/stdlib/honk_recursion/verifier/protogalaxy_recursive_verifier.hpp @@ -131,40 +131,41 @@ template class ProtoGalaxyRecursiveVerifier_ { * Specifically, at some point in the algorithm we compute the difference between the points which, if they are * equal, would be zero, case that is not supported. See https://github.com/AztecProtocol/barretenberg/issues/971. */ - void fold_commitments(std::vector lagranges, - VerifierInstances& instances, - std::shared_ptr& accumulator) - requires IsUltraBuilder - { - using ElementNative = typename Flavor::Curve::ElementNative; - using AffineElementNative = typename Flavor::Curve::AffineElementNative; - - auto offset_generator = Commitment::from_witness(builder, AffineElementNative(ElementNative::random_element())); - - size_t vk_idx = 0; - for (auto& expected_vk : accumulator->verification_key->get_all()) { - expected_vk = offset_generator; - size_t inst = 0; - for (auto& instance : instances) { - expected_vk += instance->verification_key->get_all()[vk_idx] * lagranges[inst]; - inst++; - } - expected_vk -= offset_generator; - vk_idx++; - } - - size_t comm_idx = 0; - for (auto& comm : accumulator->witness_commitments.get_all()) { - comm = offset_generator; - size_t inst = 0; - for (auto& instance : instances) { - comm += instance->witness_commitments.get_all()[comm_idx] * lagranges[inst]; - inst++; - } - comm -= offset_generator; - comm_idx++; - } - } + // void fold_commitments(std::vector lagranges, + // VerifierInstances& instances, + // std::shared_ptr& accumulator) + // requires IsUltraBuilder + // { + // using ElementNative = typename Flavor::Curve::ElementNative; + // using AffineElementNative = typename Flavor::Curve::AffineElementNative; + + // auto offset_generator = Commitment::from_witness(builder, + // AffineElementNative(ElementNative::random_element())); + + // size_t vk_idx = 0; + // for (auto& expected_vk : accumulator->verification_key->get_all()) { + // expected_vk = offset_generator; + // size_t inst = 0; + // for (auto& instance : instances) { + // expected_vk += instance->verification_key->get_all()[vk_idx] * lagranges[inst]; + // inst++; + // } + // expected_vk -= offset_generator; + // vk_idx++; + // } + + // size_t comm_idx = 0; + // for (auto& comm : accumulator->witness_commitments.get_all()) { + // comm = offset_generator; + // size_t inst = 0; + // for (auto& instance : instances) { + // comm += instance->witness_commitments.get_all()[comm_idx] * lagranges[inst]; + // inst++; + // } + // comm -= offset_generator; + // comm_idx++; + // } + // } /** * @brief Folds the witness commitments and verification key (part of ϕ) and stores the values in the accumulator. @@ -175,7 +176,6 @@ template class ProtoGalaxyRecursiveVerifier_ { void fold_commitments(std::vector lagranges, VerifierInstances& instances, std::shared_ptr& accumulator) - requires(!IsUltraBuilder) { size_t vk_idx = 0; for (auto& expected_vk : accumulator->verification_key->get_all()) {