Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit c5a80b8

Browse files
ETatuzovankaskov
authored andcommitted
Zero-indices in permutation argument updated #21
1 parent 0f9e96f commit c5a80b8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

include/nil/blueprint/transpiler/evm_verifier_gen.hpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace nil {
9797
}
9898

9999
std::string zero_indices(columns_rotations_type col_rotations){
100-
std::vector<std::uint16_t> zero_indices;
100+
std::vector<std::size_t> zero_indices;
101101
std::uint16_t fixed_values_points;
102102
std::stringstream result;
103103

@@ -106,9 +106,11 @@ namespace nil {
106106
}
107107

108108
for(std::size_t i= 0; i < PlaceholderParams::total_columns; i++){
109+
std::cout << "i = " << i << std::endl;
109110
std::size_t j = 0;
110111
for(auto& rot: col_rotations[i]){
111112
if(rot == 0){
113+
std::cout << "zero_index = " << j << std::endl;
112114
zero_indices.push_back(j);
113115
break;
114116
}
@@ -119,14 +121,18 @@ namespace nil {
119121
std::size_t i = 0;
120122
for(; i < PlaceholderParams::witness_columns + PlaceholderParams::public_input_columns; i++){
121123
zero_indices[i] = (sum + zero_indices[i]) * 0x20;
124+
std::cout << "i = " << i << " offset = " << zero_indices[i] << std::endl;
125+
BOOST_ASSERT(zero_indices[i] < 0x10000);
122126
sum += col_rotations[i].size();
123127
result << std::hex << std::setfill('0') << std::setw(4) << zero_indices[i];
124128
}
125129

126130
sum = 0;
127131
for(; i < PlaceholderParams::total_columns; i++){
128132
zero_indices[i] = (sum + zero_indices[i]) * 0x20;
129-
sum += col_rotations[i].size();
133+
std::cout << "i = " << i << " offset = " << zero_indices[i] << std::endl;
134+
BOOST_ASSERT(zero_indices[i] < 0x10000);
135+
sum += col_rotations[i].size() + 1;
130136
result << std::hex << std::setfill('0') << std::setw(4) << zero_indices[i];
131137
}
132138
return result.str();

0 commit comments

Comments
 (0)