Skip to content

Commit 7dbf58f

Browse files
authored
fix: remove repeats in prep trace iteration (#13)
1 parent 032036b commit 7dbf58f

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

Cargo.lock

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stark-middleware/src/prover/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ impl<SC: StarkGenericConfig> PartitionProver<SC> {
188188
) in rap_mains
189189
.iter()
190190
.zip_eq(main_traces_with_domains)
191-
.zip(std::iter::repeat(preprocessed_traces_with_domains.iter()).flatten())
191+
.zip(preprocessed_traces_with_domains.iter())
192192
.zip_eq(&perm_traces_with_domains)
193193
.zip_eq(&cumulative_sums)
194194
{
@@ -235,7 +235,7 @@ impl<SC: StarkGenericConfig> PartitionProver<SC> {
235235
// Prepare the proven RAP trace views
236236
let (raps, trace_views): (Vec<_>, Vec<_>) = rap_mains
237237
.into_iter()
238-
.zip(std::iter::repeat(preps).flatten())
238+
.zip(preps.into_iter())
239239
.zip_eq(cumulative_sums_and_indices)
240240
.map(|(((rap, main), preprocessed), cumulative_sum_and_index)| {
241241
let (permutation, exposed_values) =
@@ -267,7 +267,7 @@ impl<SC: StarkGenericConfig> PartitionProver<SC> {
267267
let quotient_committer = QuotientCommitter::new(pcs, &perm_challenges, alpha);
268268
let quotient_degrees = raps
269269
.iter()
270-
.zip(std::iter::repeat(preprocessed_traces_with_domains.iter()).flatten())
270+
.zip(preprocessed_traces_with_domains.iter())
271271
.map(|(&rap, prep_trace_with_domain)| {
272272
let prep_width = prep_trace_with_domain
273273
.as_ref()

0 commit comments

Comments
 (0)