diff --git a/src/circuit/circuit_frame.rs b/src/circuit/circuit_frame.rs index aeb113cddd..360d24aec7 100644 --- a/src/circuit/circuit_frame.rs +++ b/src/circuit/circuit_frame.rs @@ -93,27 +93,19 @@ impl<'a, F: LurkField, C: Coprocessor> CircuitFrame<'a, F, C> { impl<'a, F: LurkField, C: Coprocessor> MultiFrame<'a, F, C> { pub fn blank(folding_config: Arc>, meta: Meta) -> Self { - match meta { - Meta::Lurk => Self { - store: None, - input: None, - output: None, - frames: None, - cached_witness: None, - count: folding_config.reduction_count(), - folding_config, - meta, - }, - Meta::Coprocessor(_z_ptr) => Self { - store: None, - input: None, - output: None, - frames: None, - cached_witness: None, - count: 1, - folding_config, - meta, - }, + let count = match meta { + Meta::Lurk => folding_config.reduction_count(), + Meta::Coprocessor(_zptr) => 1, + }; + Self { + store: None, + input: None, + output: None, + frames: None, + cached_witness: None, + count, + folding_config, + meta, } } @@ -141,9 +133,7 @@ impl<'a, F: LurkField, C: Coprocessor> MultiFrame<'a, F, C> { for x in chunk { let circuit_frame = CircuitFrame::from_frame(x, store); - if meta.is_none() { - meta = Some(x.meta); - } + meta.get_or_insert(x.meta); inner_frames.push(circuit_frame); } @@ -471,6 +461,7 @@ impl< type AllocatedIO = (AllocatedPtr, AllocatedPtr, AllocatedContPtr); impl> CircuitFrame<'_, F, C> { + #[tracing::instrument(skip_all, name = "CircuitFrame::synthesize", level = "debug")] pub(crate) fn synthesize>( &self, cs: &mut CS, @@ -483,7 +474,6 @@ impl> CircuitFrame<'_, F, C> { cont_circuit_witness: Option>, ) -> Result, SynthesisError> { let (input_expr, input_env, input_cont) = inputs; - debug!("synthesizing frame"); let reduce = |store| { let cons_circuit_witness = if let Some(ccw) = cons_circuit_witness { ccw diff --git a/src/proof/nova.rs b/src/proof/nova.rs index 08ab382ecb..1c49d0de40 100644 --- a/src/proof/nova.rs +++ b/src/proof/nova.rs @@ -391,7 +391,7 @@ impl<'a, F: LurkField, C: Coprocessor> StepCircuit for MultiFrame<'a, F, C .folding_config .lang() .get_coprocessor_from_zptr(&z_ptr) - .expect("coprocessor missing"); + .expect("coprocessor not found for a frame that requires one"); match self.frames.as_ref() { Some(frames) => { assert_eq!(1, frames.len()); diff --git a/src/proof/supernova.rs b/src/proof/supernova.rs index 7c8a19ee47..2f7180fcfd 100644 --- a/src/proof/supernova.rs +++ b/src/proof/supernova.rs @@ -46,6 +46,7 @@ where { pp: SuperNovaPublicParams, // SuperNova does not yet have a `CompressedSNARK`. + // see https://github.com/lurk-lab/arecibo/issues/27 // pk: ProverKey, G2, C1<'a, F, C>, C2, SS1, SS2>, // vk: VerifierKey, G2, C1<'a, F, C>, C2, SS1, SS2>, _p: PhantomData,