Skip to content

Commit

Permalink
cargo fmt formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
anupsv committed Aug 2, 2024
1 parent 7c4adb6 commit 5e896fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions arbitrator/prover/src/kzgbn254.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn prove_kzg_preimage_bn254(
let blob_commitment = kzg.commit(&blob_polynomial_evaluation_form)?;

let mut commitment_bytes = Vec::new();
blob_commitment.serialize_uncompressed(&mut commitment_bytes)?; // why uncompressed ?
blob_commitment.serialize_uncompressed(&mut commitment_bytes)?; // why uncompressed ?

let mut expected_hash: Bytes32 = Sha256::digest(&*commitment_bytes).into();
expected_hash[0] = 1;
Expand Down Expand Up @@ -114,9 +114,11 @@ pub fn prove_kzg_preimage_bn254(
.clone();
let g2_tau_minus_g2_z = (g2_tau - z_g2).into_affine();

let kzg_proof = kzg
.compute_kzg_proof_with_roots_of_unity(&blob_polynomial_evaluation_form, proving_offset as u64 / 32)?;

let kzg_proof = kzg.compute_kzg_proof_with_roots_of_unity(
&blob_polynomial_evaluation_form,
proving_offset as u64 / 32,
)?;

// This should cause failure when proving past offset.
if !proving_past_end {
// This is required, but confirming what is the right way.
Expand Down

0 comments on commit 5e896fb

Please sign in to comment.