diff --git a/pipeline/src/pipeline.rs b/pipeline/src/pipeline.rs index d5efc636e..a342e43d5 100644 --- a/pipeline/src/pipeline.rs +++ b/pipeline/src/pipeline.rs @@ -739,7 +739,7 @@ impl Pipeline { Ok(()) } - fn stage(&self) -> Stage { + pub fn stage(&self) -> Stage { match self.artifact.as_ref().unwrap() { Artifact::AsmFilePath(_) => Stage::AsmFilePath, Artifact::AsmString(_, _) => Stage::AsmString, @@ -824,6 +824,16 @@ impl Pipeline { Ok(pil_with_constants) } + pub fn pil_with_evaluated_fixed_cols_ref( + &mut self, + ) -> Result<&PilWithEvaluatedFixedCols, Vec> { + self.advance_to(Stage::PilWithEvaluatedFixedCols)?; + match self.artifact.as_ref().unwrap() { + Artifact::PilWithEvaluatedFixedCols(pil_with_constants) => Ok(pil_with_constants), + _ => panic!(), + } + } + pub fn generated_witness(mut self) -> Result, Vec> { self.advance_to(Stage::GeneratedWitness)?; let Artifact::GeneratedWitness(generated_witness) = self.artifact.unwrap() else { diff --git a/riscv/src/continuations.rs b/riscv/src/continuations.rs index a80114468..c3a20a812 100644 --- a/riscv/src/continuations.rs +++ b/riscv/src/continuations.rs @@ -64,8 +64,6 @@ where { let num_chunks = bootloader_inputs.len(); - let length = pipeline.optimized_pil_ref().unwrap().degree(); - // Advance the pipeline to the PilWithEvaluatedFixedCols stage and then clone it // for each chunk. This is more efficient, because we'll run all steps until then // only once. @@ -74,6 +72,12 @@ where .advance_to(Stage::PilWithEvaluatedFixedCols) .unwrap(); + let length = pipeline + .pil_with_evaluated_fixed_cols_ref() + .unwrap() + .pil + .degree(); + bootloader_inputs .into_iter() .enumerate()