Skip to content

Commit

Permalink
Some minor fixes. (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
martun authored Feb 5, 2024
1 parent 6a3101b commit b804b09
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 3 additions & 1 deletion include/nil/crypto3/zk/commitments/batched_commitment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

#include <unordered_set>
#include <set>
#include <vector>
#include <utility>
#include <map>

#include <boost/property_tree/ptree.hpp>
Expand Down Expand Up @@ -105,7 +107,7 @@ namespace nil {
}

// We call them singles in recursive verifier
std::vector<typename field_type::value_type> get_unique_points(){
std::vector<typename field_type::value_type> get_unique_points() const {
std::vector<typename field_type::value_type> result;
// std::unordered_set<typename field_type::value_type> result_set;

Expand Down
2 changes: 0 additions & 2 deletions include/nil/crypto3/zk/commitments/polynomial/fri.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ namespace nil {
evals_map, combined_U, combined_V,
transcript
);

return true;
}
} // namespace algorithms
} // namespace zk
Expand Down
2 changes: 0 additions & 2 deletions include/nil/crypto3/zk/commitments/polynomial/lpc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ namespace nil {
math::polynomial<value_type> combined_Q_normal;

for (auto const &point: points){
bool first = true;
V = {-point, 1};
math::polynomial<value_type> Q_normal;
for(std::size_t i: this->_z.get_batches()){
Expand Down Expand Up @@ -217,7 +216,6 @@ namespace nil {

for (std::size_t p = 0; p < points.size(); p++){
auto &point = points[p];
bool first = true;
V[p] = {-point, 1};
for(std::size_t i:this->_z.get_batches()){
for(std::size_t j = 0; j < this->_z.get_batch_size(i); j++){
Expand Down
4 changes: 2 additions & 2 deletions include/nil/crypto3/zk/snark/routing/as_waksman.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ namespace nil {
/**
* Return the height of the AS-Waksman network's top sub-network.
*/
inline std::size_t as_waksman_top_height(const std::size_t num_packets) {
inline std::size_t as_waksman_top_height(std::size_t num_packets) const {
return num_packets / 2;
}

Expand All @@ -165,7 +165,7 @@ namespace nil {
* If top = true, return the top wire, otherwise return bottom wire.
*/
inline std::size_t as_waksman_switch_output(size_t num_packets, std::size_t row_offset, std::size_t row_idx,
bool use_top) {
bool use_top) const{
std::size_t relpos = row_idx - row_offset;
assert(relpos % 2 == 0 && relpos + 1 < num_packets);
return row_offset + (relpos / 2) + (use_top ? 0 : as_waksman_top_height(num_packets));
Expand Down

0 comments on commit b804b09

Please sign in to comment.