diff --git a/crypto3/libs/blueprint/include/nil/blueprint/component_batch.hpp b/crypto3/libs/blueprint/include/nil/blueprint/component_batch.hpp index c55debdcb..1fb48e508 100644 --- a/crypto3/libs/blueprint/include/nil/blueprint/component_batch.hpp +++ b/crypto3/libs/blueprint/include/nil/blueprint/component_batch.hpp @@ -211,7 +211,7 @@ namespace nil { const compiler_manifest assignment_manifest(parent_assignment.witnesses_amount(), false); const auto component_manifest = std::apply(ComponentType::get_manifest, params_tuple); const auto intersection = assignment_manifest.intersect(component_manifest); - BOOST_ASSERT_MSG(intersection.is_satisfiable(), "Component either has a constant or does not fit"); + BOOST_VERIFY_MSG(intersection.is_satisfiable(), "Component either has a constant or does not fit"); const std::size_t component_witness_amount = intersection.witness_amount->max_value_if_sat(); return component_witness_amount; } @@ -239,7 +239,7 @@ namespace nil { variable.get() = parent_assignment.add_batch_variable(0); } bool insertion_result = inputs_results.insert({input, {result, false}}).second; - BOOST_ASSERT(insertion_result); + BOOST_VERIFY(insertion_result); return result; } @@ -265,21 +265,21 @@ namespace nil { variable_transform(variable); } bool insertion_result = inputs_results.insert({input, {result, true}}).second; - BOOST_ASSERT(insertion_result); + BOOST_VERIFY(insertion_result); return result; } else { // already have some vars auto unassigned_result = inputs_results.find(input)->second.first; auto unsassigned_vars = unassigned_result.all_vars(); auto result_vars = result.all_vars(); - BOOST_ASSERT(unsassigned_vars.size() == result_vars.size()); + BOOST_VERIFY(unsassigned_vars.size() == result_vars.size()); for (std::size_t i = 0; i < unsassigned_vars.size(); i++) { parent_assignment.batch_private_storage(unsassigned_vars[i].get().rotation) = var_value(internal_assignment, result_vars[i].get()); } inputs_results.erase(input); bool insertion_result = inputs_results.insert({input, {unassigned_result, true}}).second; - BOOST_ASSERT(insertion_result); + BOOST_VERIFY(insertion_result); return unassigned_result; } } @@ -307,7 +307,7 @@ namespace nil { const input_type &input = input_result.first; result_type &result = input_result.second.first; bool result_status = input_result.second.second; - BOOST_ASSERT(result_status); + BOOST_VERIFY(result_status); if (col_offset == 0) { parent_assignment.enable_selector(gate_id, row); } @@ -366,7 +366,7 @@ namespace nil { ComponentType component_instance = build_component_instance(component_witness_amount); generate_gates(component_instance, tmp_bp, parent_assignment, example_input); const auto &gates = tmp_bp.gates(); - BOOST_ASSERT(gates.size() == 1); + BOOST_VERIFY(gates.size() == 1); std::vector new_gate_constraints, one_gate_constraints; auto curr_gate = gates[0]; diff --git a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/div_mod.hpp b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/div_mod.hpp index f83e172e1..af449ceab 100644 --- a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/div_mod.hpp +++ b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/div_mod.hpp @@ -172,8 +172,6 @@ namespace nil { integral_type(t_last) * zkevm_modulus - integral_type(b)); - zkevm_word_type result = is_div ? r : q_out; - a_chunks = zkevm_word_to_field_element(a); b_chunks = zkevm_word_to_field_element(b); r_chunks = zkevm_word_to_field_element(r); diff --git a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/mulmod.hpp b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/mulmod.hpp index 5b2268d46..cbcd06c88 100644 --- a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/mulmod.hpp +++ b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/mulmod.hpp @@ -242,8 +242,6 @@ namespace nil { integral_type(t_last) * zkevm_modulus - integral_type(N)); - zkevm_word_type result = q; - v_chunks = zkevm_word_to_field_element(v); N_chunks = zkevm_word_to_field_element(N); q_chunks = zkevm_word_to_field_element(q); diff --git a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sar.hpp b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sar.hpp index 6ac204298..9bdefae77 100644 --- a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sar.hpp +++ b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sar.hpp @@ -233,7 +233,6 @@ namespace nil { q_chunks = zkevm_word_to_field_element(q); v_chunks = zkevm_word_to_field_element(v); - integral_type two_15 = 32768; integral_type biggest_input_a_chunk = integral_type(input_a) >> (256 - 16); b0p = integral_type(input_b) % 16; diff --git a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sdiv_smod.hpp b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sdiv_smod.hpp index 94bbaddf6..31d7e822e 100644 --- a/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sdiv_smod.hpp +++ b/crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sdiv_smod.hpp @@ -227,7 +227,6 @@ namespace nil { zkevm_word_type v = zkevm_word_type(integral_type(q_abs) + integral_type(t_last) * zkevm_modulus - integral_type(b_abs)); - zkevm_word_type result = is_div ? r : q_out; a_chunks = zkevm_word_to_field_element(a); b_input_chunks = zkevm_word_to_field_element(b_input); @@ -620,4 +619,4 @@ namespace nil { }; } // namespace bbf } // namespace blueprint -} // namespace nil \ No newline at end of file +} // namespace nil diff --git a/crypto3/libs/marshalling/zk/include/nil/crypto3/marshalling/zk/types/commitments/commitment_params.hpp b/crypto3/libs/marshalling/zk/include/nil/crypto3/marshalling/zk/types/commitments/commitment_params.hpp index 19b2891c5..297d17986 100644 --- a/crypto3/libs/marshalling/zk/include/nil/crypto3/marshalling/zk/types/commitments/commitment_params.hpp +++ b/crypto3/libs/marshalling/zk/include/nil/crypto3/marshalling/zk/types/commitments/commitment_params.hpp @@ -189,7 +189,7 @@ namespace nil { auto step_list = make_integer_vector(std::get<5>(filled_params.value())); std::size_t expand_factor = std::get<6>(filled_params.value()).value(); - std::size_t r = std::accumulate(step_list.begin(), step_list.end(), 0); + std::accumulate(step_list.begin(), step_list.end(), 0); return CommitmentParamsType( step_list, diff --git a/crypto3/libs/transpiler/include/nil/blueprint/transpiler/lpc_evm_verifier_gen.hpp b/crypto3/libs/transpiler/include/nil/blueprint/transpiler/lpc_evm_verifier_gen.hpp index 3e20e550b..f7d4d0d1c 100644 --- a/crypto3/libs/transpiler/include/nil/blueprint/transpiler/lpc_evm_verifier_gen.hpp +++ b/crypto3/libs/transpiler/include/nil/blueprint/transpiler/lpc_evm_verifier_gen.hpp @@ -331,12 +331,10 @@ namespace nil { std::stringstream out; out << "\t\tgate = 0;" << std::endl; - int c = 0; for(const auto &constraint: gate.constraints){ out << constraint_computation_code_optimized(_var_indices, constraint); out << "\t\tgate = addmod(gate, mulmod(theta_acc, sum, modulus), modulus);" << std::endl; out << "\t\ttheta_acc = mulmod(theta_acc, theta, modulus);" << std::endl; - c++; } variable_type sel_var(gate.selector_index, 0, true, variable_type::column_type::selector); out << "\t\tgate = mulmod(gate, basic_marshalling.get_uint256_be(blob, " << _var_indices.at(sel_var) * 0x20 << "), modulus);" << std::endl; @@ -527,9 +525,7 @@ namespace nil { ++i; } - std::size_t gate_modules_count = 0; - std::size_t current_selector = 0; if (total_cost <= _gates_contract_size_threshold) { auto it = constraints.begin(); gate_argument_str << "\t\tuint256 prod;" << std::endl; @@ -604,9 +600,7 @@ namespace nil { return ""; std::stringstream lookup_str; - std::size_t j = 0; std::size_t i = 0; - std::size_t cur = 0; std::unordered_map lookup_codes; std::vector lookup_ids(lookup_count); std::vector> lookup_costs(lookup_count); @@ -686,7 +680,6 @@ namespace nil { out.close(); } - j = 0; std::size_t table_index = 1; for(const auto &table: _constraint_system.lookup_tables()){ variable_type sel_var(table.tag_index, 0, true, variable_type::column_type::selector); @@ -710,7 +703,6 @@ namespace nil { lookup_str << "\t\t\tstate.theta_acc = mulmod(state.theta_acc, state.theta, modulus);" << std::endl; } lookup_str << "\t\t\tstate.g = mulmod(state.g, addmod( state.factor, addmod(l, mulmod(state.beta, state.l_shifted, modulus), modulus), modulus), modulus);" << std::endl; - j++; } table_index++; } @@ -740,7 +732,6 @@ namespace nil { poly_points += _desc.selector_columns; eta_buf.resize( 32*poly_points ); - std::array empty; auto writer = eta_buf.begin(); result << "\t\t///* eta points check */" << std::endl; @@ -881,9 +872,6 @@ namespace nil { reps["$LOOKUP_PARTS$"] = lookup_parts_hex_string(_constraint_system.lookup_parts(_common_data.max_quotient_chunks)); reps["$MAX_QUOTIENT_CHUNKS$"] = to_string(_common_data.max_quotient_chunks); - std::size_t _lookup_degree = _constraint_system.lookup_poly_degree_bound(); - std::size_t _rows_amount = _desc.rows_amount; - commitment_scheme_replaces( _placeholder_info, _desc, diff --git a/crypto3/libs/transpiler/include/nil/blueprint/transpiler/recursive_verifier_generator.hpp b/crypto3/libs/transpiler/include/nil/blueprint/transpiler/recursive_verifier_generator.hpp index 9ed30d21a..d7666cb71 100644 --- a/crypto3/libs/transpiler/include/nil/blueprint/transpiler/recursive_verifier_generator.hpp +++ b/crypto3/libs/transpiler/include/nil/blueprint/transpiler/recursive_verifier_generator.hpp @@ -498,13 +498,11 @@ namespace nil { static inline std::vector split_point_string(std::string point){ std::vector result; std::size_t found = point.find("& "); - std::size_t j = 0; std::size_t prev = 0; while (found!=std::string::npos){ result.push_back(point.substr(prev, found-prev)); prev = found + 2; found = point.find("& ",prev); - j++; } return result; } @@ -536,8 +534,6 @@ namespace nil { round_proof_layers_num += log2(fri_params.D[i]->m) -1; } - std::size_t lookup_degree = constraint_system.lookup_poly_degree_bound(); - std::size_t rows_amount = desc.rows_amount; std::size_t quotient_polys = placeholder_info.quotient_size; @@ -1094,4 +1090,4 @@ namespace nil { } } -#endif // CRYPTO3_RECURSIVE_VERIFIER_GENERATOR_HPP \ No newline at end of file +#endif // CRYPTO3_RECURSIVE_VERIFIER_GENERATOR_HPP diff --git a/crypto3/libs/zk/include/nil/crypto3/zk/commitments/batched_commitment.hpp b/crypto3/libs/zk/include/nil/crypto3/zk/commitments/batched_commitment.hpp index 0cb037003..b75173624 100644 --- a/crypto3/libs/zk/include/nil/crypto3/zk/commitments/batched_commitment.hpp +++ b/crypto3/libs/zk/include/nil/crypto3/zk/commitments/batched_commitment.hpp @@ -199,7 +199,7 @@ namespace nil { break; } } - BOOST_ASSERT(found); + BOOST_VERIFY(found); } } return eval_map; diff --git a/proof-producer/bin/proof-producer/src/arg_parser.cpp b/proof-producer/bin/proof-producer/src/arg_parser.cpp index d25388b56..960ac2499 100644 --- a/proof-producer/bin/proof-producer/src/arg_parser.cpp +++ b/proof-producer/bin/proof-producer/src/arg_parser.cpp @@ -71,8 +71,9 @@ namespace nil { /*line_length=*/120, /*min_description_length=*/60 ); + // clang-format off - auto options_appender = config.add_options() + config.add_options() ("stage", make_defaulted_option(prover_options.stage), "Stage of the prover to run, one of (all, preprocess, prove, verify, generate-aggregated-challenge, generate-combined-Q, aggregated-FRI, consistency-checks). Defaults to 'all'.") ("proof,p", make_defaulted_option(prover_options.proof_file_path), "Proof file")