@@ -65,7 +65,7 @@ namespace nil {
65
65
using assignment_table_type = typename PlaceholderParams::assignment_table_type;
66
66
67
67
// TODO: Move logic to utils.hpp. It's similar to EVM verifier generator
68
- static std::string zero_indices (columns_rotations_type col_rotations){
68
+ static std::string zero_indices (columns_rotations_type col_rotations, std:: size_t permutation_size ){
69
69
std::vector<std::size_t > zero_indices;
70
70
std::uint16_t fixed_values_points = 0 ;
71
71
std::stringstream result;
@@ -90,16 +90,17 @@ namespace nil {
90
90
for (; i < PlaceholderParams::witness_columns + PlaceholderParams::public_input_columns; i++){
91
91
zero_indices[i] = sum + zero_indices[i];
92
92
sum += col_rotations[i].size ();
93
- if ( i != 0 ) result << " , " ;
94
- result << zero_indices[i];
95
93
}
96
94
97
95
sum = 0 ;
98
96
for (; i < PlaceholderParams::total_columns; i++){
99
97
zero_indices[i] = sum + zero_indices[i];
100
98
sum += col_rotations[i].size () + 1 ;
101
- if ( i != 0 ) result << " , " ;
102
- result << zero_indices[i];
99
+ }
100
+
101
+ for ( i = 0 ; i < PlaceholderParams::total_columns; i++){
102
+ if ( i != 0 ) result << " , " ;
103
+ result << zero_indices[i] + 4 * permutation_size + 6 ;
103
104
}
104
105
return result.str ();
105
106
}
@@ -995,36 +996,7 @@ namespace nil {
995
996
}
996
997
prepare_U_V_str << " \n " ;
997
998
}
998
- /* for(std::size_t i = 0; i < unique_points.size(); i++){
999
- prepare_U_V_str << "\tV[" << i << "] = getV"<< unique_points[i].size() << "(";
1000
- for(std::size_t j = 0; j < unique_points[i].size(); j++ ){
1001
- if(j != 0) prepare_U_V_str << ", ";
1002
- prepare_U_V_str << "singles[" << singles[unique_points[i][j]] << "]";
1003
- }
1004
- prepare_U_V_str << ");" << std::endl << std::endl;
1005
- }
1006
- for(std::size_t ind = 0; ind < point_ids.size(); ind++){
1007
- std::size_t i = point_ids.size() - 1 - ind;
1008
- prepare_U_V_str << "\ttmp = getU"<< unique_points[point_ids[i]].size() << "(";
1009
- for(std::size_t j = 0; j < unique_points[point_ids[i]].size(); j++ ){
1010
- if(j != 0) prepare_U_V_str << ", ";
1011
- prepare_U_V_str << "singles[" << singles[unique_points[point_ids[i]][j]] << "]";
1012
- }
1013
- for(std::size_t j = 0; j < unique_points[point_ids[i]].size(); j++ ){
1014
- prepare_U_V_str << ", ";
1015
- if( j == unique_points[point_ids[i]].size() - 1 )
1016
- prepare_U_V_str << "proof.z[z_ind]";
1017
- else
1018
- prepare_U_V_str << "proof.z[z_ind - "<< unique_points[point_ids[i]].size() - j - 1 <<" ]";
1019
- }
1020
- prepare_U_V_str << ");" << std::endl;
1021
- prepare_U_V_str << "\tz_ind = z_ind - " << unique_points[point_ids[i]].size() << ";" << std::endl;
1022
- for(std::size_t j = 0; j < unique_points[point_ids[i]].size(); j++ ){
1023
- prepare_U_V_str << "\tcombined_U[" << point_ids[i] << "][" << j << "] = combined_U[" << point_ids[i] << "][" << j << "] + tmp[" << j << "] * theta_acc;" << std::endl;
1024
- }
1025
- prepare_U_V_str << "\ttheta_acc = theta_acc * challenges.lpc_theta;" << std::endl;
1026
- }
1027
- */
999
+
1028
1000
std::stringstream compute_combined_y;
1029
1001
for (std::size_t i = 0 ; i < point_ids.size (); i++){
1030
1002
/* y[0] = y[0] * challenges.lpc_theta;
@@ -1094,7 +1066,7 @@ namespace nil {
1094
1066
reps[" $FINAL_POLYNOMIAL_SIZE$" ] = to_string (std::pow (2 , std::log2 (fri_params.max_degree + 1 ) - fri_params.r + 1 ) - 2 );
1095
1067
reps[" $LAMBDA$" ] = to_string (lambda);
1096
1068
reps[" $PERMUTATION_SIZE$" ] = to_string (permutation_size);
1097
- reps[" $ZERO_INDICES$" ] = zero_indices (common_data.columns_rotations );
1069
+ reps[" $ZERO_INDICES$" ] = zero_indices (common_data.columns_rotations , permutation_size );
1098
1070
reps[" $TOTAL_COLUMNS$" ] = to_string (arithmetization_params::total_columns);
1099
1071
reps[" $ROWS_LOG$" ] = to_string (log2 (rows_amount));
1100
1072
reps[" $ROWS_AMOUNT$" ] = to_string (rows_amount);
0 commit comments