From 440b01aac0588c304d8cf2861521c069c9b790fe Mon Sep 17 00:00:00 2001 From: x-mass <36629999+x-mass@users.noreply.github.com> Date: Wed, 17 Jul 2024 11:20:57 +0000 Subject: [PATCH] Fix prover segfault --- .../crypto3/zk/snark/systems/plonk/placeholder/prover.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/parallel-zk/include/nil/crypto3/zk/snark/systems/plonk/placeholder/prover.hpp b/libs/parallel-zk/include/nil/crypto3/zk/snark/systems/plonk/placeholder/prover.hpp index 0d2157a6..e9349727 100644 --- a/libs/parallel-zk/include/nil/crypto3/zk/snark/systems/plonk/placeholder/prover.hpp +++ b/libs/parallel-zk/include/nil/crypto3/zk/snark/systems/plonk/placeholder/prover.hpp @@ -122,7 +122,6 @@ namespace nil { , _is_lookup_enabled(constraint_system.lookup_gates().size() > 0) , _commitment_scheme(commitment_scheme) { - std::cout << "Table has " << table_description.rows_amount << " rows." << std::endl; // Initialize transcript. transcript(preprocessed_public_data.common_data.vk.constraint_system_with_params_hash); @@ -236,7 +235,7 @@ namespace nil { (split_polynomial_size / preprocessed_public_data.common_data.desc.rows_amount + 1): (split_polynomial_size / preprocessed_public_data.common_data.desc.rows_amount); - if (preprocessed_public_data.common_data.max_quotient_chunks != 0 && + if (preprocessed_public_data.common_data.max_quotient_chunks != 0 && split_polynomial_size > preprocessed_public_data.common_data.max_quotient_chunks) { split_polynomial_size = preprocessed_public_data.common_data.max_quotient_chunks; } @@ -254,6 +253,9 @@ namespace nil { T_splitted_dfs[k].from_coefficients(T_splitted[k]); }, ThreadPool::PoolLevel::HIGH); + // DO NOT CHANGE, sizes are different by design + T_splitted_dfs.resize(split_polynomial_size); + return T_splitted_dfs; }