diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index faf38e33..36160d96 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -112,6 +112,7 @@ set(TESTS_NAMES "systems/plonk/placeholder/placeholder_kzg" "systems/plonk/placeholder/placeholder_hashes" "systems/plonk/placeholder/placeholder_curves" + "systems/plonk/placeholder/placeholder_quotient_polynomial_chunks" # "systems/pcd/r1cs_pcd/r1cs_mp_ppzkpcd/r1cs_mp_ppzkpcd" # "systems/pcd/r1cs_pcd/r1cs_sp_ppzkpcd/r1cs_sp_ppzkpcd" diff --git a/test/systems/plonk/placeholder/placeholder_quotient_polynomial_chunks.cpp b/test/systems/plonk/placeholder/placeholder_quotient_polynomial_chunks.cpp new file mode 100644 index 00000000..4a28f880 --- /dev/null +++ b/test/systems/plonk/placeholder/placeholder_quotient_polynomial_chunks.cpp @@ -0,0 +1,74 @@ +//---------------------------------------------------------------------------// +// Copyright (c) 2022 Mikhail Komarov +// Copyright (c) 2022 Nikita Kaskov +// Copyright (c) 2022 Ilia Shirobokov +// Copyright (c) 2022 Alisa Cherniaeva +// Copyright (c) 2022 Ilias Khairullin +// Copyright (c) 2023 Elena Tatuzova +// Copyright (c) 2024 Vasiliy Olekhov +// +// MIT License +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +//---------------------------------------------------------------------------// +// Test circuit7 with different chunks of quotient polynomial +// + +#define BOOST_TEST_MODULE placeholder_quotient_polynomial_chunks_test + +#include +#include + +#include +#include + +#include +#include + +#include "circuits.hpp" +#include "placeholder_test_runner.hpp" + +using namespace nil::crypto3; +using namespace nil::crypto3::zk; +using namespace nil::crypto3::zk::snark; + + +BOOST_AUTO_TEST_SUITE(placeholder_quotient_polynomial_chunks) + +using curve_type = algebra::curves::pallas; +using field_type = typename curve_type::base_field_type; +using hash_type = hashes::keccak_1600<256>; + +using TestRunners = boost::mpl::list< + placeholder_test_runner< field_type, hash_type, hash_type, true, 8>, + placeholder_test_runner< field_type, hash_type, hash_type, true, 10>, + placeholder_test_runner< field_type, hash_type, hash_type, true, 30>, + placeholder_test_runner< field_type, hash_type, hash_type, true, 50> + >; + +BOOST_AUTO_TEST_CASE_TEMPLATE(quotient_polynomial_test, TestRunner, TestRunners) { + test_tools::random_test_initializer random_test_initializer; + auto circuit = circuit_test_7( + random_test_initializer.alg_random_engines.template get_alg_engine(), + random_test_initializer.generic_random_engine + ); + TestRunner test_runner(circuit); + BOOST_CHECK(test_runner.run_test()); +} +BOOST_AUTO_TEST_SUITE_END()