pub fn prove(
    pp: &PublicParams<G1, G2, C1, C2>,
    recursive_snark: &RecursiveSNARK<G1, G2, C1, C2>,
  ) -> Result<Self, NovaError> {
    // fold the primary circuit's instance
    let (nifs_primary, (_f_U_primary, f_W_primary)) = NIFS::prove(
      &pp.r1cs_gens_primary,
      &pp.ro_consts_primary,
      &pp.r1cs_shape_primary,
      &recursive_snark.r_U_primary,
      &recursive_snark.r_W_primary,
      &recursive_snark.l_u_primary,
      &recursive_snark.l_w_primary,
    )?;

    // fold the secondary circuit's instance
    let (nifs_secondary, (_f_U_secondary, f_W_secondary)) = NIFS::prove(
      &pp.r1cs_gens_secondary,
      &pp.ro_consts_secondary,
      &pp.r1cs_shape_secondary,
      &recursive_snark.r_U_secondary,
      &recursive_snark.r_W_secondary,
      &recursive_snark.l_u_secondary,
      &recursive_snark.l_w_secondary,
    )?;

    Ok(Self {
      r_U_primary: recursive_snark.r_U_primary.clone(),
      l_u_primary: recursive_snark.l_u_primary.clone(),
      nifs_primary,
      f_W_primary,

      r_U_secondary: recursive_snark.r_U_secondary.clone(),
      l_u_secondary: recursive_snark.l_u_secondary.clone(),
      nifs_secondary,
      f_W_secondary,

      zn_primary: recursive_snark.zn_primary,
      zn_secondary: recursive_snark.zn_secondary,

      _p_c1: Default::default(),
      _p_c2: Default::default(),
    })
  }
/// Create a new `CompressedSNARK`
Create a new `CompressedSNARK`
Create a new ` CompressedSNARK `
pub fn prove(
    pp: &PublicParams<G1, G2, C1, C2>,
    recursive_snark: &RecursiveSNARK<G1, G2, C1, C2>,
  ) -> Result<Self, NovaError> {
    // fold the primary circuit's instance
    let (nifs_primary, (_f_U_primary, f_W_primary)) = NIFS::prove(
      &pp.r1cs_gens_primary,
      &pp.ro_consts_primary,
      &pp.r1cs_shape_primary,
      &recursive_snark.r_U_primary,
      &recursive_snark.r_W_primary,
      &recursive_snark.l_u_primary,
      &recursive_snark.l_w_primary,
    )?;
    // fold the secondary circuit's instance
    let (nifs_secondary, (_f_U_secondary, f_W_secondary)) = NIFS::prove(
      &pp.r1cs_gens_secondary,
      &pp.ro_consts_secondary,
      &pp.r1cs_shape_secondary,
      &recursive_snark.r_U_secondary,
      &recursive_snark.r_W_secondary,
      &recursive_snark.l_u_secondary,
      &recursive_snark.l_w_secondary,
    )?;
    Ok(Self {
      r_U_primary: recursive_snark.r_U_primary.clone(),
      l_u_primary: recursive_snark.l_u_primary.clone(),
      nifs_primary,
      f_W_primary,
      r_U_secondary: recursive_snark.r_U_secondary.clone(),
      l_u_secondary: recursive_snark.l_u_secondary.clone(),
      nifs_secondary,
      f_W_secondary,
      zn_primary: recursive_snark.zn_primary,
      zn_secondary: recursive_snark.zn_secondary,
      _p_c1: Default::default(),
      _p_c2: Default::default(),
    })
  }
pub fn prove ( pp : & PublicParams < G1 , G2 , C1 , C2 > , recursive_snark : & RecursiveSNARK < G1 , G2 , C1 , C2 > , ) -> Result < Self , NovaError > { // fold the primary circuit's instance let ( nifs_primary , ( _f_U_primary , f_W_primary ) ) = NIFS :: prove ( & pp . r1cs_gens_primary , & pp . ro_consts_primary , & pp . r1cs_shape_primary , & recursive_snark . r_U_primary , & recursive_snark . r_W_primary , & recursive_snark . l_u_primary , & recursive_snark . l_w_primary , ) ? ; // fold the secondary circuit's instance let ( nifs_secondary , ( _f_U_secondary , f_W_secondary ) ) = NIFS :: prove ( & pp . r1cs_gens_secondary , & pp . ro_consts_secondary , & pp . r1cs_shape_secondary , & recursive_snark . r_U_secondary , & recursive_snark . r_W_secondary , & recursive_snark . l_u_secondary , & recursive_snark . l_w_secondary , ) ? ; Ok ( Self { r_U_primary : recursive_snark . r_U_primary . clone ( ) , l_u_primary : recursive_snark . l_u_primary . clone ( ) , nifs_primary , f_W_primary , r_U_secondary : recursive_snark . r_U_secondary . clone ( ) , l_u_secondary : recursive_snark . l_u_secondary . clone ( ) , nifs_secondary , f_W_secondary , zn_primary : recursive_snark . zn_primary , zn_secondary : recursive_snark . zn_secondary , _p_c1 : Default :: default ( ) , _p_c2 : Default :: default ( ) , } ) }
Create a new `CompressedSNARK`
Create a new ` CompressedSNARK `
pp
&PublicParams<G1, G2, C1, C2>
recursive_snark
&RecursiveSNARK<G1, G2, C1, C2>
pp
&PublicParams<G1, G2, C1, C2>
recursive_snark
&RecursiveSNARK<G1, G2, C1, C2>