Skip to content

Commit

Permalink
Merge branch 'master' into feature/proof-producer-cmd-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
oclaw authored Jan 31, 2025
2 parents b60a6b0 + 331cae7 commit 7cdb98d
Show file tree
Hide file tree
Showing 31 changed files with 3,449 additions and 569 deletions.
110 changes: 0 additions & 110 deletions crypto3/libs/blueprint/include/nil/blueprint/bbf/choice_function.hpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,22 @@ namespace nil {
selector_column.set_row(i);
size_t full_selector_id = gates.add_selector(selector_column);

for(const auto& [selector_id, constraints] : gates.constraint_list) {
for(const auto& [selector_id, data] : gates.constraint_list) {
/*
std::cout << "GATE:\n";
for(const auto& c : constraints) {
std::cout << c << "\n";
}
std::cout << "Rows: ";
*/
std::vector<constraint_type> constraints;
std::vector<std::string> names;
for(const auto &d : data){
constraints.push_back(d.first);
names.push_back(d.second);
}
bp.add_gate(selector_id, constraints);

constraint_names.insert({selector_id, names});
//std::cout << "\n";
}

Expand Down Expand Up @@ -540,6 +546,7 @@ namespace nil {
std::cout << "Constraint " << j << " from gate " << i << " on row " << selector_row
<< " is not satisfied." << std::endl;
std::cout << "Constraint result: " << constraint_result << std::endl;
std::cout << "Offending constraint name: " << constraint_names.at(gates[i].selector_index).at(j) << std::endl;
std::cout << "Offending contraint: " << gates[i].constraints[j] << std::endl;
return false;
}
Expand Down Expand Up @@ -668,6 +675,7 @@ namespace nil {

circuit<crypto3::zk::snark::plonk_constraint_system<FieldType>> bp;
crypto3::zk::snark::plonk_assignment_table<FieldType> presets;
std::map<uint32_t, std::vector<std::string>> constraint_names;
};

} // namespace bbf
Expand Down
Loading

0 comments on commit 7cdb98d

Please sign in to comment.