From abb265749abedaa90b4a71751aef032b3dad7629 Mon Sep 17 00:00:00 2001 From: Iluvmagick Date: Wed, 3 Apr 2024 21:10:44 +0400 Subject: [PATCH] Fixed some warnings. --- .../detail/polynomial/basic_fri.hpp | 24 +++++++++---------- .../crypto3/zk/commitments/polynomial/lpc.hpp | 1 - .../plonk/placeholder/lookup_argument.hpp | 2 -- .../placeholder/permutation_argument.hpp | 1 - .../plonk/placeholder/preprocessor.hpp | 22 ++++++++--------- 5 files changed, 23 insertions(+), 27 deletions(-) diff --git a/include/nil/crypto3/zk/commitments/detail/polynomial/basic_fri.hpp b/include/nil/crypto3/zk/commitments/detail/polynomial/basic_fri.hpp index 350ec940..83cdc30f 100644 --- a/include/nil/crypto3/zk/commitments/detail/polynomial/basic_fri.hpp +++ b/include/nil/crypto3/zk/commitments/detail/polynomial/basic_fri.hpp @@ -156,14 +156,14 @@ namespace nil { std::size_t expand_factor, bool use_grinding = false, std::size_t grinding_parameter = 0xFFFF - ): r( degree_log - 1 ) - , step_list(generate_random_step_list(r, max_step)) - , expand_factor(expand_factor) - , lambda(lambda) + ): lambda(lambda) , use_grinding(use_grinding) , grinding_parameter(grinding_parameter) , max_degree((1 << degree_log) - 1) , D(math::calculate_domain_set(degree_log + expand_factor, degree_log - 1)) + , r( degree_log - 1 ) + , step_list(generate_random_step_list(r, max_step)) + , expand_factor(expand_factor) { } params_type( @@ -173,14 +173,14 @@ namespace nil { std::size_t expand_factor, bool use_grinding = false, std::size_t grinding_parameter = 0xFFFF - ): r(std::accumulate(step_list_in.begin(), step_list_in.end(), 0)) - , step_list(step_list_in) - , expand_factor(expand_factor) - , lambda(lambda) + ): lambda(lambda) , use_grinding(use_grinding) , grinding_parameter(grinding_parameter) , max_degree((1 << degree_log) - 1) , D(math::calculate_domain_set(degree_log + expand_factor, std::accumulate(step_list_in.begin(), step_list_in.end(), 0))) + , r(std::accumulate(step_list_in.begin(), step_list_in.end(), 0)) + , step_list(step_list_in) + , expand_factor(expand_factor) { } params_type( @@ -191,14 +191,14 @@ namespace nil { std::size_t lambda, bool use_grinding = false, std::size_t grinding_parameter = 0xFFFF - ) : max_degree(max_degree) + ) : lambda(lambda) + , use_grinding(use_grinding) + , grinding_parameter(grinding_parameter) + , max_degree(max_degree) , D(D) , r(std::accumulate(step_list_in.begin(), step_list_in.end(), 0)) , step_list(step_list_in) , expand_factor(expand_factor) - , lambda(lambda) - , use_grinding(use_grinding) - , grinding_parameter(grinding_parameter) {} bool operator==(const params_type &rhs) const { diff --git a/include/nil/crypto3/zk/commitments/polynomial/lpc.hpp b/include/nil/crypto3/zk/commitments/polynomial/lpc.hpp index 59f26aae..1195a87a 100644 --- a/include/nil/crypto3/zk/commitments/polynomial/lpc.hpp +++ b/include/nil/crypto3/zk/commitments/polynomial/lpc.hpp @@ -240,7 +240,6 @@ namespace nil { } if( total_points > points.size()){ - auto &point = _etha; std::size_t p = points.size(); V[p] = {-_etha, 1}; for(std::size_t i:this->_z.get_batches()){ diff --git a/include/nil/crypto3/zk/snark/systems/plonk/placeholder/lookup_argument.hpp b/include/nil/crypto3/zk/snark/systems/plonk/placeholder/lookup_argument.hpp index e857ce2f..919eaafd 100644 --- a/include/nil/crypto3/zk/snark/systems/plonk/placeholder/lookup_argument.hpp +++ b/include/nil/crypto3/zk/snark/systems/plonk/placeholder/lookup_argument.hpp @@ -685,8 +685,6 @@ namespace nil { std::array F; // 1. Get theta typename FieldType::value_type theta = transcript.template challenge(); - typename FieldType::value_type omega = common_data.basic_domain->get_domain_element(1); - // 2. Add commitments to transcript transcript(lookup_commitment); diff --git a/include/nil/crypto3/zk/snark/systems/plonk/placeholder/permutation_argument.hpp b/include/nil/crypto3/zk/snark/systems/plonk/placeholder/permutation_argument.hpp index be160d41..110f38d0 100644 --- a/include/nil/crypto3/zk/snark/systems/plonk/placeholder/permutation_argument.hpp +++ b/include/nil/crypto3/zk/snark/systems/plonk/placeholder/permutation_argument.hpp @@ -144,7 +144,6 @@ namespace nil { std::vector> hs; std::vector> g_factors; std::vector> h_factors; - std::size_t current_ind = 0; for(std::size_t i = 0; i < g_v.size(); i++){ g_factors.push_back(g_v[i]); h_factors.push_back(h_v[i]); diff --git a/include/nil/crypto3/zk/snark/systems/plonk/placeholder/preprocessor.hpp b/include/nil/crypto3/zk/snark/systems/plonk/placeholder/preprocessor.hpp index caa06baf..d2118043 100644 --- a/include/nil/crypto3/zk/snark/systems/plonk/placeholder/preprocessor.hpp +++ b/include/nil/crypto3/zk/snark/systems/plonk/placeholder/preprocessor.hpp @@ -169,19 +169,19 @@ namespace nil { const commitment_scheme_data_type &_commitment_scheme_data, std::size_t max_quotient_chunks = 0 ): commitments(commts), - desc(table_description), columns_rotations(col_rotations), + desc(table_description), lagrange_0(D->size() - 1, D->size(), FieldType::value_type::zero()), Z(std::vector(table_description.rows_amount + 1, FieldType::value_type::zero())), basic_domain(D), max_gates_degree(max_gates_degree), - permutation_parts(permutation_parts), - lookup_parts(lookup_parts), vk(vk), - permuted_columns(_permuted_columns), commitment_scheme_data(_commitment_scheme_data), commitment_params(_commitment_params), - max_quotient_chunks(max_quotient_chunks) + permuted_columns(_permuted_columns), + max_quotient_chunks(max_quotient_chunks), + permutation_parts(permutation_parts), + lookup_parts(lookup_parts) { // Z is polynomial -1, 0,..., 0, 1 Z[0] = -FieldType::value_type::one(); @@ -206,17 +206,17 @@ namespace nil { std::size_t max_quotient_chunks ): commitments(commts), columns_rotations(col_rotations), + desc(table_description), lagrange_0(table_description.rows_amount - 1, table_description.rows_amount, FieldType::value_type::zero()), Z(std::vector(table_description.rows_amount + 1, FieldType::value_type::zero())), max_gates_degree(max_gates_degree), - permutation_parts(permutation_parts), - lookup_parts(lookup_parts), vk(vk), - desc(table_description), - permuted_columns(_permuted_columns), - commitment_params(_commitment_params), commitment_scheme_data(_commitment_scheme_data), - max_quotient_chunks(max_quotient_chunks) + commitment_params(_commitment_params), + permuted_columns(_permuted_columns), + max_quotient_chunks(max_quotient_chunks), + permutation_parts(permutation_parts), + lookup_parts(lookup_parts) { // Z is polynomial -1, 0,..., 0, 1 Z[0] = -FieldType::value_type::one();