From 6669d2bbdba2903a52aa0ebb5b94d8bad6e7de11 Mon Sep 17 00:00:00 2001 From: codygunton Date: Fri, 17 Nov 2023 22:34:17 +0000 Subject: [PATCH] Fix test --- .../commitment_schemes/zeromorph/zeromorph.hpp | 4 ++-- .../zeromorph/zeromorph.test.cpp | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp b/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp index 93ec07ec533..1cd359ebe69 100644 --- a/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp +++ b/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.hpp @@ -319,9 +319,9 @@ template class ZeroMorphProver_ { auto& multilinear_challenge, auto& commitment_key, auto& transcript, - const std::vector& concatenated_polynomials = {}, + const std::vector>& concatenated_polynomials = {}, const std::vector& concatenated_evaluations = {}, - const std::vector>& concatenation_groups = {}) + const std::vector>>& concatenation_groups = {}) { // Generate batching challenge \rho and powers 1,...,\rho^{m-1} FF rho = transcript.get_challenge("rho"); diff --git a/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.test.cpp b/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.test.cpp index 270f236ad68..30876c73e50 100644 --- a/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.test.cpp +++ b/barretenberg/cpp/src/barretenberg/commitment_schemes/zeromorph/zeromorph.test.cpp @@ -225,6 +225,17 @@ template class ZeroMorphWithConcatenationTest : public CommitmentT // Initialize an empty BaseTranscript auto prover_transcript = BaseTranscript::prover_init_empty(); + std::vector> concatenated_polynomials_views; + for (auto& poly : concatenated_polynomials) { + concatenated_polynomials_views.emplace_back(poly); + } + + std::vector>> concatenation_groups_views(concatenation_groups.size()); + for (auto [group_of_polys, group_of_views] : zip_view(concatenation_groups, concatenation_groups_views)) { + for (auto& poly : group_of_polys) { + group_of_views.emplace_back(poly); + } + } // Execute Prover protocol ZeroMorphProver::prove(f_polynomials, // unshifted g_polynomials, // to-be-shifted @@ -233,9 +244,9 @@ template class ZeroMorphWithConcatenationTest : public CommitmentT u_challenge, this->commitment_key, prover_transcript, - concatenated_polynomials, + concatenated_polynomials_views, c_evaluations, - concatenation_groups); + concatenation_groups_views); auto verifier_transcript = BaseTranscript::verifier_init_empty(prover_transcript);