Skip to content

Commit e5c2c6c

Browse files
committed
fmt
1 parent a191023 commit e5c2c6c

File tree

5 files changed

+9
-21
lines changed

5 files changed

+9
-21
lines changed

spartan_parallel/src/dense_mlpoly.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,7 @@ impl<S: SpartanExtensionField> PolyEvalProof<S> {
382382
let eq = EqPolynomial::new(r.to_vec());
383383
let (L, R) = eq.compute_factored_evals();
384384

385-
let _ = self
386-
.proof
387-
.verify(R.len(), transcript, &R);
385+
let _ = self.proof.verify(R.len(), transcript, &R);
388386

389387
// TODO: Alternative PCS Verification
390388
Ok(())
@@ -394,7 +392,7 @@ impl<S: SpartanExtensionField> PolyEvalProof<S> {
394392
&self,
395393
transcript: &mut Transcript,
396394
r: &[S], // point at which the polynomial is evaluated
397-
_Zr: &S, // evaluation \widetilde{Z}(r)
395+
_Zr: &S, // evaluation \widetilde{Z}(r)
398396
) -> Result<(), ProofVerifyError> {
399397
self.verify(transcript, r);
400398

@@ -862,7 +860,7 @@ impl<S: SpartanExtensionField> PolyEvalProof<S> {
862860
// compute a weighted sum of commitments and L
863861
let LZ = S::field_zero();
864862
L_list.push(L);
865-
R_list.push(R);
863+
R_list.push(R);
866864
LZ_list.push(LZ);
867865
}
868866
}
@@ -873,9 +871,7 @@ impl<S: SpartanExtensionField> PolyEvalProof<S> {
873871
for i in 0..LZ_list.len() {
874872
let R = &R_list[i];
875873

876-
proof_list[i]
877-
.proof
878-
.verify(R.len(), transcript, R)?;
874+
proof_list[i].proof.verify(R.len(), transcript, R)?;
879875
}
880876

881877
Ok(())

spartan_parallel/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1868,7 +1868,6 @@ impl<S: SpartanExtensionField> SNARK<S> {
18681868
(proof, block_challenges)
18691869
};
18701870

1871-
18721871
// Final evaluation on BLOCK
18731872
let (block_inst_evals_bound_rp, block_inst_evals_list, block_r1cs_eval_proof_list) = {
18741873
let [rp, _, rx, ry] = block_challenges;

spartan_parallel/src/r1csproof.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -755,9 +755,7 @@ impl<S: SpartanExtensionField> R1CSProof<S> {
755755
timer_commit_opening.stop();
756756

757757
// verify proof that expected_claim_post_phase2 == claim_post_phase2
758-
self.proof_eq_sc_phase2.verify(
759-
transcript,
760-
)?;
758+
self.proof_eq_sc_phase2.verify(transcript)?;
761759

762760
Ok([rp, rq_rev, rx, [rw, ry].concat()])
763761
}

spartan_parallel/src/sparse_mlpoly.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -831,8 +831,8 @@ impl<S: SpartanExtensionField> HashLayerProof<S> {
831831
let eval_init_addr = IdentityPolynomial::new(rand_mem.len()).evaluate(rand_mem);
832832
let eval_init_val = EqPolynomial::new(r.to_vec()).evaluate(rand_mem);
833833
let hash_init_at_rand_mem =
834-
hash_func(&eval_init_addr, &eval_init_val, &S::field_zero()) - *r_multiset_check;
835-
834+
hash_func(&eval_init_addr, &eval_init_val, &S::field_zero()) - *r_multiset_check;
835+
836836
// verify the claim_last of init chunk
837837
assert_eq!(&hash_init_at_rand_mem, claim_init);
838838

spartan_parallel/src/sumcheck.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl<S: SpartanExtensionField> ZKSumcheckInstanceProof<S> {
9191
for i in 0..num_rounds {
9292
// derive the verifier's challenge for the next round
9393
let r_i = transcript.challenge_scalar(b"challenge_nextround");
94-
94+
9595
// verify the proof of sum-check and evals
9696
let res = {
9797
// produce two weights
@@ -121,12 +121,7 @@ impl<S: SpartanExtensionField> ZKSumcheckInstanceProof<S> {
121121
.collect::<Vec<S>>()
122122
};
123123

124-
self.proofs[i]
125-
.verify(
126-
transcript,
127-
&a,
128-
)
129-
.is_ok()
124+
self.proofs[i].verify(transcript, &a).is_ok()
130125
};
131126

132127
r.push(r_i);

0 commit comments

Comments
 (0)