Skip to content

Commit c4024af

Browse files
committed
Pad eq_val
1 parent 06c97fc commit c4024af

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

spartan_parallel/src/r1csproof.rs

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -496,15 +496,23 @@ impl<'a, S: SpartanExtensionField + Send + Sync> R1CSProof<S> {
496496
.into_mle()
497497
);
498498

499+
let max_num_vars_phase2 = ABC_poly.get_num_vars();
500+
501+
let ABC_eval_len = ABC_poly.Z.len();
502+
let eq_eval_len = eq_p_rp_poly.Z.len();
503+
let eq_padding = std::iter::repeat(GoldilocksExt2::ZERO).take(ABC_eval_len - eq_eval_len);
504+
499505
let arc_C: ArcMultilinearExtension<'a, GoldilocksExt2> = Arc::new(
500-
eq_p_rp_poly.Z.iter().cloned().map(|s|
501-
GoldilocksExt2::from_raw_bytes_unchecked(&s.inner().to_raw_bytes())
502-
)
503-
.collect::<Vec<GoldilocksExt2>>()
504-
.into_mle()
506+
eq_p_rp_poly.Z
507+
.into_iter()
508+
.map(|s|
509+
GoldilocksExt2::from_raw_bytes_unchecked(&s.inner().to_raw_bytes())
510+
)
511+
.chain(eq_padding)
512+
.collect::<Vec<GoldilocksExt2>>()
513+
.into_mle()
505514
);
506-
507-
let max_num_vars_phase2 = eq_p_rp_poly.get_num_vars();
515+
508516
let num_threads_phase2 = 8;
509517

510518
let mut virtual_polys =
@@ -557,9 +565,6 @@ impl<'a, S: SpartanExtensionField + Send + Sync> R1CSProof<S> {
557565
let rw = rw.to_vec();
558566
let ry: Vec<S> = ry_rev.iter().copied().rev().collect();
559567

560-
assert_eq!(Z_poly.len(), 1);
561-
assert_eq!(ABC_poly.len(), 1);
562-
563568
// --
564569
// POLY COMMIT
565570
// --

0 commit comments

Comments
 (0)