Skip to content

Commit 1e1618c

Browse files
committed
fix
1 parent 6c17cba commit 1e1618c

File tree

10 files changed

+13
-34
lines changed

10 files changed

+13
-34
lines changed

crypto3/libs/blueprint/include/nil/blueprint/component_batch.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ namespace nil {
211211
const compiler_manifest assignment_manifest(parent_assignment.witnesses_amount(), false);
212212
const auto component_manifest = std::apply(ComponentType::get_manifest, params_tuple);
213213
const auto intersection = assignment_manifest.intersect(component_manifest);
214-
BOOST_ASSERT_MSG(intersection.is_satisfiable(), "Component either has a constant or does not fit");
214+
BOOST_VERIFY_MSG(intersection.is_satisfiable(), "Component either has a constant or does not fit");
215215
const std::size_t component_witness_amount = intersection.witness_amount->max_value_if_sat();
216216
return component_witness_amount;
217217
}
@@ -239,7 +239,7 @@ namespace nil {
239239
variable.get() = parent_assignment.add_batch_variable(0);
240240
}
241241
bool insertion_result = inputs_results.insert({input, {result, false}}).second;
242-
BOOST_ASSERT(insertion_result);
242+
BOOST_VERIFY(insertion_result);
243243
return result;
244244
}
245245

@@ -265,21 +265,21 @@ namespace nil {
265265
variable_transform(variable);
266266
}
267267
bool insertion_result = inputs_results.insert({input, {result, true}}).second;
268-
BOOST_ASSERT(insertion_result);
268+
BOOST_VERIFY(insertion_result);
269269
return result;
270270
} else {
271271
// already have some vars
272272
auto unassigned_result = inputs_results.find(input)->second.first;
273273
auto unsassigned_vars = unassigned_result.all_vars();
274274
auto result_vars = result.all_vars();
275-
BOOST_ASSERT(unsassigned_vars.size() == result_vars.size());
275+
BOOST_VERIFY(unsassigned_vars.size() == result_vars.size());
276276
for (std::size_t i = 0; i < unsassigned_vars.size(); i++) {
277277
parent_assignment.batch_private_storage(unsassigned_vars[i].get().rotation) =
278278
var_value(internal_assignment, result_vars[i].get());
279279
}
280280
inputs_results.erase(input);
281281
bool insertion_result = inputs_results.insert({input, {unassigned_result, true}}).second;
282-
BOOST_ASSERT(insertion_result);
282+
BOOST_VERIFY(insertion_result);
283283
return unassigned_result;
284284
}
285285
}
@@ -307,7 +307,7 @@ namespace nil {
307307
const input_type &input = input_result.first;
308308
result_type &result = input_result.second.first;
309309
bool result_status = input_result.second.second;
310-
BOOST_ASSERT(result_status);
310+
BOOST_VERIFY(result_status);
311311
if (col_offset == 0) {
312312
parent_assignment.enable_selector(gate_id, row);
313313
}
@@ -366,7 +366,7 @@ namespace nil {
366366
ComponentType component_instance = build_component_instance(component_witness_amount);
367367
generate_gates(component_instance, tmp_bp, parent_assignment, example_input);
368368
const auto &gates = tmp_bp.gates();
369-
BOOST_ASSERT(gates.size() == 1);
369+
BOOST_VERIFY(gates.size() == 1);
370370

371371
std::vector<constraint_type> new_gate_constraints, one_gate_constraints;
372372
auto curr_gate = gates[0];

crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/div_mod.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ namespace nil {
172172
integral_type(t_last) * zkevm_modulus -
173173
integral_type(b));
174174

175-
zkevm_word_type result = is_div ? r : q_out;
176-
177175
a_chunks = zkevm_word_to_field_element<FieldType>(a);
178176
b_chunks = zkevm_word_to_field_element<FieldType>(b);
179177
r_chunks = zkevm_word_to_field_element<FieldType>(r);

crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/mulmod.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ namespace nil {
242242
integral_type(t_last) * zkevm_modulus -
243243
integral_type(N));
244244

245-
zkevm_word_type result = q;
246-
247245
v_chunks = zkevm_word_to_field_element<FieldType>(v);
248246
N_chunks = zkevm_word_to_field_element<FieldType>(N);
249247
q_chunks = zkevm_word_to_field_element<FieldType>(q);

crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sar.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ namespace nil {
233233
q_chunks = zkevm_word_to_field_element<FieldType>(q);
234234
v_chunks = zkevm_word_to_field_element<FieldType>(v);
235235

236-
integral_type two_15 = 32768;
237236
integral_type biggest_input_a_chunk = integral_type(input_a) >> (256 - 16);
238237

239238
b0p = integral_type(input_b) % 16;

crypto3/libs/blueprint/include/nil/blueprint/zkevm_bbf/opcodes/sdiv_smod.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ namespace nil {
227227
zkevm_word_type v = zkevm_word_type(integral_type(q_abs) +
228228
integral_type(t_last) * zkevm_modulus -
229229
integral_type(b_abs));
230-
zkevm_word_type result = is_div ? r : q_out;
231230

232231
a_chunks = zkevm_word_to_field_element<FieldType>(a);
233232
b_input_chunks = zkevm_word_to_field_element<FieldType>(b_input);
@@ -620,4 +619,4 @@ namespace nil {
620619
};
621620
} // namespace bbf
622621
} // namespace blueprint
623-
} // namespace nil
622+
} // namespace nil

crypto3/libs/marshalling/zk/include/nil/crypto3/marshalling/zk/types/commitments/commitment_params.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ namespace nil {
189189

190190
auto step_list = make_integer_vector<Endianness, std::size_t>(std::get<5>(filled_params.value()));
191191
std::size_t expand_factor = std::get<6>(filled_params.value()).value();
192-
std::size_t r = std::accumulate(step_list.begin(), step_list.end(), 0);
192+
std::accumulate(step_list.begin(), step_list.end(), 0);
193193

194194
return CommitmentParamsType(
195195
step_list,

crypto3/libs/transpiler/include/nil/blueprint/transpiler/lpc_evm_verifier_gen.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,10 @@ namespace nil {
331331
std::stringstream out;
332332

333333
out << "\t\tgate = 0;" << std::endl;
334-
int c = 0;
335334
for(const auto &constraint: gate.constraints){
336335
out << constraint_computation_code_optimized(_var_indices, constraint);
337336
out << "\t\tgate = addmod(gate, mulmod(theta_acc, sum, modulus), modulus);" << std::endl;
338337
out << "\t\ttheta_acc = mulmod(theta_acc, theta, modulus);" << std::endl;
339-
c++;
340338
}
341339
variable_type sel_var(gate.selector_index, 0, true, variable_type::column_type::selector);
342340
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 {
527525
++i;
528526
}
529527

530-
531528
std::size_t gate_modules_count = 0;
532-
std::size_t current_selector = 0;
533529
if (total_cost <= _gates_contract_size_threshold) {
534530
auto it = constraints.begin();
535531
gate_argument_str << "\t\tuint256 prod;" << std::endl;
@@ -604,9 +600,7 @@ namespace nil {
604600
return "";
605601

606602
std::stringstream lookup_str;
607-
std::size_t j = 0;
608603
std::size_t i = 0;
609-
std::size_t cur = 0;
610604
std::unordered_map<std::size_t, std::string> lookup_codes;
611605
std::vector<std::size_t> lookup_ids(lookup_count);
612606
std::vector<std::pair<std::size_t, std::size_t>> lookup_costs(lookup_count);
@@ -686,7 +680,6 @@ namespace nil {
686680
out.close();
687681
}
688682

689-
j = 0;
690683
std::size_t table_index = 1;
691684
for(const auto &table: _constraint_system.lookup_tables()){
692685
variable_type sel_var(table.tag_index, 0, true, variable_type::column_type::selector);
@@ -710,7 +703,6 @@ namespace nil {
710703
lookup_str << "\t\t\tstate.theta_acc = mulmod(state.theta_acc, state.theta, modulus);" << std::endl;
711704
}
712705
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;
713-
j++;
714706
}
715707
table_index++;
716708
}
@@ -740,7 +732,6 @@ namespace nil {
740732
poly_points += _desc.selector_columns;
741733
eta_buf.resize( 32*poly_points );
742734

743-
std::array<std::uint8_t, 0> empty;
744735
auto writer = eta_buf.begin();
745736

746737
result << "\t\t///* eta points check */" << std::endl;
@@ -881,9 +872,6 @@ namespace nil {
881872
reps["$LOOKUP_PARTS$"] = lookup_parts_hex_string(_constraint_system.lookup_parts(_common_data.max_quotient_chunks));
882873
reps["$MAX_QUOTIENT_CHUNKS$"] = to_string(_common_data.max_quotient_chunks);
883874

884-
std::size_t _lookup_degree = _constraint_system.lookup_poly_degree_bound();
885-
std::size_t _rows_amount = _desc.rows_amount;
886-
887875
commitment_scheme_replaces<PlaceholderParams>(
888876
_placeholder_info,
889877
_desc,

crypto3/libs/transpiler/include/nil/blueprint/transpiler/recursive_verifier_generator.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -498,13 +498,11 @@ namespace nil {
498498
static inline std::vector<std::string> split_point_string(std::string point){
499499
std::vector<std::string> result;
500500
std::size_t found = point.find("& ");
501-
std::size_t j = 0;
502501
std::size_t prev = 0;
503502
while (found!=std::string::npos){
504503
result.push_back(point.substr(prev, found-prev));
505504
prev = found + 2;
506505
found = point.find("& ",prev);
507-
j++;
508506
}
509507
return result;
510508
}
@@ -536,8 +534,6 @@ namespace nil {
536534
round_proof_layers_num += log2(fri_params.D[i]->m) -1;
537535
}
538536

539-
std::size_t lookup_degree = constraint_system.lookup_poly_degree_bound();
540-
541537
std::size_t rows_amount = desc.rows_amount;
542538
std::size_t quotient_polys = placeholder_info.quotient_size;
543539

@@ -1094,4 +1090,4 @@ namespace nil {
10941090
}
10951091
}
10961092

1097-
#endif // CRYPTO3_RECURSIVE_VERIFIER_GENERATOR_HPP
1093+
#endif // CRYPTO3_RECURSIVE_VERIFIER_GENERATOR_HPP

crypto3/libs/zk/include/nil/crypto3/zk/commitments/batched_commitment.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ namespace nil {
199199
break;
200200
}
201201
}
202-
BOOST_ASSERT(found);
202+
BOOST_VERIFY(found);
203203
}
204204
}
205205
return eval_map;

proof-producer/bin/proof-producer/src/arg_parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ namespace nil {
7171
/*line_length=*/120,
7272
/*min_description_length=*/60
7373
);
74+
7475
// clang-format off
75-
auto options_appender = config.add_options()
76+
config.add_options()
7677
("stage", make_defaulted_option(prover_options.stage),
7778
"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'.")
7879
("proof,p", make_defaulted_option(prover_options.proof_file_path), "Proof file")

0 commit comments

Comments
 (0)