From a9992969daad836dc653cfae67ddf52b15350c40 Mon Sep 17 00:00:00 2001 From: "e.tatuzova" Date: Wed, 10 Apr 2024 19:09:10 +0400 Subject: [PATCH] Some tests fixed #335 --- .../systems/snark/plonk/flexible/swap.hpp | 6 ++++-- test/verifiers/placeholder/verifier.cpp | 13 +------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/include/nil/blueprint/components/systems/snark/plonk/flexible/swap.hpp b/include/nil/blueprint/components/systems/snark/plonk/flexible/swap.hpp index 9e3615998..6df5bba59 100644 --- a/include/nil/blueprint/components/systems/snark/plonk/flexible/swap.hpp +++ b/include/nil/blueprint/components/systems/snark/plonk/flexible/swap.hpp @@ -75,12 +75,14 @@ namespace nil { return manifest; } - constexpr static std::size_t get_rows_amount() { + constexpr static std::size_t get_rows_amount( + std::size_t witness_amount + ) { return 1; } constexpr static const std::size_t gates_amount = 1; - const std::size_t rows_amount = get_rows_amount(); + const std::size_t rows_amount = get_rows_amount(this->witness_amount()); struct input_type { std::array inp; // the array of pairs of elements diff --git a/test/verifiers/placeholder/verifier.cpp b/test/verifiers/placeholder/verifier.cpp index b509838d9..bf5f0ea33 100644 --- a/test/verifiers/placeholder/verifier.cpp +++ b/test/verifiers/placeholder/verifier.cpp @@ -171,17 +171,6 @@ struct default_zkllvm_params{ marshalled_data ); } - - auto filled_val = nil::crypto3::marshalling::types::fill_plonk_constraint_system(constraint_system); - std::vector cv; - cv.resize(filled_val.length(), 0x00); - auto write_iter = cv.begin(); - nil::marshalling::status_type status = filled_val.write(write_iter, cv.size()); - std::ofstream out; - out.open(filename, std::ios_base::binary | std::ios_base::out); - out.write(reinterpret_cast(cv.data()), cv.size()); - out.close(); - return constraint_system; } @@ -408,7 +397,7 @@ void test_multiple_arithmetizations(std::string folder_name){ BOOST_AUTO_TEST_SUITE(blueprint_pallas_test_suite) BOOST_AUTO_TEST_CASE(basic_test) { - test_multiple_arithmetizations("../libs/blueprint/test/verifiers/placeholder/data/merkle_tree_poseidon"); + test_multiple_arithmetizations("../../../libs/blueprint/test/verifiers/placeholder/data/merkle_tree_poseidon"); } // TODO: add vesta tests