From d681b919893efde69f1114a571691f5ddae0d391 Mon Sep 17 00:00:00 2001 From: Ethen Pociask Date: Fri, 9 Aug 2024 13:50:56 -0400 Subject: [PATCH] feat: Arbitrator 2mb blob test - cargo fmt --- arbitrator/prover/src/kzgbn254.rs | 11 ++++------- arbitrator/prover/src/main.rs | 4 +++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/arbitrator/prover/src/kzgbn254.rs b/arbitrator/prover/src/kzgbn254.rs index b5fdb6618..17620a633 100644 --- a/arbitrator/prover/src/kzgbn254.rs +++ b/arbitrator/prover/src/kzgbn254.rs @@ -38,9 +38,8 @@ pub fn prove_kzg_preimage_bn254( kzg.calculate_roots_of_unity(preimage.len() as u64)?; // preimage is already padded and is the actual blob data, NOT the IFFT'd form. - let blob_polynomial = - Blob::from_padded_bytes_unchecked(&preimage). - to_polynomial(PolynomialFormat::InCoefficientForm)?; + let blob_polynomial = Blob::from_padded_bytes_unchecked(&preimage) + .to_polynomial(PolynomialFormat::InCoefficientForm)?; let blob_commitment = kzg.commit(&blob_polynomial)?; let mut commitment_bytes = Vec::new(); @@ -113,10 +112,8 @@ 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, - proving_offset as u64 / 32, - )?; + let kzg_proof = + kzg.compute_kzg_proof_with_roots_of_unity(&blob_polynomial, proving_offset as u64 / 32)?; let offset_usize = proving_offset as usize; // This should cause failure when proving past offset. diff --git a/arbitrator/prover/src/main.rs b/arbitrator/prover/src/main.rs index 2b99dd27d..905d3ee6f 100644 --- a/arbitrator/prover/src/main.rs +++ b/arbitrator/prover/src/main.rs @@ -175,7 +175,9 @@ fn main() -> Result<()> { println!( "read preimage of type {:?} with hash 0x{} and size {}", - preimage_ty, hex::encode(hash), size + preimage_ty, + hex::encode(hash), + size ); preimages .entry(preimage_ty)