Skip to content

Commit

Permalink
fix: removed unused contract interfaces; refactor round
Browse files Browse the repository at this point in the history
  • Loading branch information
sifnoc committed Feb 27, 2024
1 parent 6dbc747 commit 1baac95
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7,183 deletions.
11 changes: 1 addition & 10 deletions backend/src/apis/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,7 @@ where
let mut vec_f_poly = f_poly.to_vec();
best_fft(&mut vec_f_poly, omega, f_poly.len().trailing_zeros());

// Summing all f_poly values
let mut total_balance = Fp::zero();
vec_f_poly.iter().for_each(|x| total_balance += x);

let total_balance_from_sum = vec_f_poly.iter().sum();
assert_eq!(
total_balance, total_balance_from_sum,
"Sum of f_poly values is not equal to the total balance"
);

let total_balance: Fp = vec_f_poly.iter().sum();
let z = total_balance * Fp::from(f_poly.len() as u64).invert().unwrap();

let kzg_proof = create_naive_kzg_proof::<KZGCommitmentScheme<Bn256>>(
Expand Down
Loading

0 comments on commit 1baac95

Please sign in to comment.