Skip to content

Commit

Permalink
Fixed some warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Iluvmagick committed Apr 3, 2024
1 parent 654e477 commit abb2657
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 27 deletions.
24 changes: 12 additions & 12 deletions include/nil/crypto3/zk/commitments/detail/polynomial/basic_fri.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<FieldType>(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(
Expand All @@ -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<FieldType>(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(
Expand All @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion include/nil/crypto3/zk/commitments/polynomial/lpc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,6 @@ namespace nil {
std::array<typename FieldType::value_type, argument_size> F;
// 1. Get theta
typename FieldType::value_type theta = transcript.template challenge<FieldType>();
typename FieldType::value_type omega = common_data.basic_domain->get_domain_element(1);


// 2. Add commitments to transcript
transcript(lookup_commitment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ namespace nil {
std::vector<math::polynomial_dfs<typename FieldType::value_type>> hs;
std::vector<math::polynomial_dfs<typename FieldType::value_type>> g_factors;
std::vector<math::polynomial_dfs<typename FieldType::value_type>> 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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typename FieldType::value_type>(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();
Expand All @@ -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<typename FieldType::value_type>(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();
Expand Down

0 comments on commit abb2657

Please sign in to comment.