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

Commit 11a1088

Browse files
committed
Remove comments with old code #65
1 parent 6b4a6f3 commit 11a1088

File tree

1 file changed

+0
-125
lines changed

1 file changed

+0
-125
lines changed

include/nil/blueprint/transpiler/templates/recursive_verifier.hpp

-125
Original file line numberDiff line numberDiff line change
@@ -794,131 +794,6 @@ typedef __attribute__((ext_vector_type(2)))
794794
__builtin_assigner_exit_check(interpolant == y[1]);
795795
}
796796
return true;
797-
798-
/*
799-
std::array<std::array<pallas::base_field_type::value_type, 4>, unique_points> V;
800-
std::array<std::array<pallas::base_field_type::value_type, 3>, poly_num> U;
801-
std::array<std::array<pallas::base_field_type::value_type, 3>, unique_points> combined_U;
802-
std::size_t z_ind = points_num - 1;
803-
pallas::base_field_type::value_type theta_acc(1);
804-
std::array<pallas::base_field_type::value_type, 3> tmp;
805-
806-
for(std::size_t u = 0; u < unique_points; u++){
807-
combined_U[u][0] = pallas::base_field_type::value_type(0);
808-
combined_U[u][1] = pallas::base_field_type::value_type(0);
809-
combined_U[u][2] = pallas::base_field_type::value_type(0);
810-
}
811-
812-
std::array<std::array<typename pallas::base_field_type::value_type, 3>, D0_log> res;
813-
std::size_t round_proof_ind = 0;
814-
std::size_t initial_proof_ind = 0;
815-
std::size_t initial_proof_hash_ind = 0;
816-
pallas::base_field_type::value_type interpolant;
817-
std::size_t cur_val = 0;
818-
std::size_t round_proof_hash_ind = 0;
819-
820-
for(std::size_t i = 0; i < lambda; i++){
821-
__builtin_assigner_fri_cosets(res.data(), D0_log, D0_omega, challenges.fri_x_indices[i]);
822-
823-
pallas::base_field_type::value_type hash_state;
824-
for(std::size_t b = 0; b < batches_num; b++){
825-
pallas::base_field_type::value_type hash_state(0);
826-
if(res[0][2] == pallas::base_field_type::value_type(0)){
827-
hash_state = calculate_leaf_hash(proof.initial_proof_values, cur_val, batches_amount_list[b] *2);
828-
} else if(res[0][2] == pallas::base_field_type::value_type(1)){
829-
hash_state = calculate_reversed_leaf_hash(proof.initial_proof_values, cur_val, batches_amount_list[b] *2);
830-
}
831-
cur_val += batches_amount_list[b] *2;
832-
for(std::size_t r = i * initial_merkle_proofs_position_num/lambda; r < (i + 1)* initial_merkle_proofs_position_num/lambda ; r++){
833-
if(proof.initial_proof_positions[r] == 1){
834-
hash_state = __builtin_assigner_poseidon_pallas_base({0, hash_state, proof.initial_proof_hashes[initial_proof_hash_ind]})[2];
835-
} else{
836-
hash_state = __builtin_assigner_poseidon_pallas_base({0, proof.initial_proof_hashes[initial_proof_hash_ind], hash_state})[2];
837-
}
838-
initial_proof_hash_ind ++;
839-
}
840-
if(b == 0)
841-
__builtin_assigner_exit_check(hash_state == vk[1]);
842-
else
843-
__builtin_assigner_exit_check(hash_state == proof.commitments[b-1]);
844-
}
845-
846-
std::array<pallas::base_field_type::value_type, 2> y;
847-
y[0] = pallas::base_field_type::value_type(0);
848-
y[1] = pallas::base_field_type::value_type(0);
849-
std::array<std::array<pallas::base_field_type::value_type, 2>, unique_points> V_evals;
850-
std::size_t ind = 0;
851-
pallas::base_field_type::value_type theta_acc(1);
852-
853-
for(std::size_t u = 0; u < unique_points; u++){
854-
V_evals[u][0] = pallas::base_field_type::value_type(1) / eval4(V[u], res[0][0]);
855-
V_evals[u][1] = pallas::base_field_type::value_type(1) / eval4(V[u], res[0][1]);
856-
y[0] = y[0] - eval3(combined_U[u], res[0][0]) * V_evals[u][0];
857-
y[1] = y[1] - eval3(combined_U[u], res[0][1]) * V_evals[u][1];
858-
}
859-
860-
initial_proof_ind = initial_proof_ind + poly_num * 2;
861-
std::size_t in = initial_proof_ind - 1;
862-
for(int k = poly_num; k > 0;){
863-
k--;
864-
y[0] = y[0] + theta_acc * proof.initial_proof_values[in-1] * V_evals[point_ids[k]][0];
865-
y[1] = y[1] + theta_acc * proof.initial_proof_values[in] * V_evals[point_ids[k]][1];
866-
in -= 2;
867-
theta_acc = theta_acc * challenges.lpc_theta;
868-
}
869-
870-
std::size_t D = D0_log - 1;
871-
pallas::base_field_type::value_type rhash;
872-
for(std::size_t j = 0; j < fri_rounds; j++){
873-
if(res[j][2] == pallas::base_field_type::value_type(0)){
874-
rhash = __builtin_assigner_poseidon_pallas_base({0, y[0], y[1]})[2];
875-
} else {
876-
rhash = __builtin_assigner_poseidon_pallas_base({0, y[1], y[0]})[2];
877-
}
878-
for( std::size_t d = 0; d < D; d++){
879-
if(proof.round_merkle_proof_positions[round_proof_hash_ind] == 1){
880-
rhash = __builtin_assigner_poseidon_pallas_base({0, rhash, proof.round_proof_hashes[round_proof_hash_ind]})[2];
881-
} else {
882-
rhash = __builtin_assigner_poseidon_pallas_base({0, proof.round_proof_hashes[round_proof_hash_ind], rhash})[2];
883-
}
884-
round_proof_hash_ind++;
885-
}
886-
__builtin_assigner_exit_check(rhash == proof.fri_roots[j]);
887-
D--;
888-
889-
interpolant = __builtin_assigner_fri_lin_inter(
890-
res[j][0],
891-
y[0],
892-
y[1],
893-
challenges.fri_alphas[j]
894-
);
895-
__builtin_assigner_exit_check(interpolant == proof.round_proof_values[round_proof_ind]);
896-
y[0] = proof.round_proof_values[round_proof_ind];
897-
y[1] = proof.round_proof_values[round_proof_ind + 1];
898-
899-
pallas::base_field_type::value_type rhash;
900-
round_proof_ind += 2;
901-
}
902-
903-
interpolant = pallas::base_field_type::value_type(0);
904-
pallas::base_field_type::value_type x = res[fri_rounds][0];
905-
pallas::base_field_type::value_type factor = pallas::base_field_type::value_type(1);
906-
for(std::size_t j = 0; j < final_polynomial_size; j++){
907-
interpolant = interpolant + proof.final_polynomial[j] * factor;
908-
factor = factor * x;
909-
}
910-
__builtin_assigner_exit_check(interpolant == y[0]);
911-
912-
interpolant = pallas::base_field_type::value_type(0);
913-
x = res[fri_rounds][1];
914-
factor = pallas::base_field_type::value_type(1);
915-
for(std::size_t j = 0; j < final_polynomial_size; j++){
916-
interpolant = interpolant + proof.final_polynomial[j] * factor;
917-
factor = factor * x;
918-
}
919-
__builtin_assigner_exit_check(interpolant == y[1]);
920-
}*/
921-
return true;
922797
}
923798
924799
}

0 commit comments

Comments
 (0)