Skip to content

Commit

Permalink
somehow it works?
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanting Zhang committed Jan 11, 2024
1 parent 73f19ae commit cc9de14
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/proof/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ where

/// Generate the recursive SNARK, encoded in `ProveOutput`
fn prove_recursively(
pp: &Self::PublicParams,
pp: &'a Self::PublicParams,
z0: &[F],
steps: Vec<C1LEM<'a, F, C>>,
store: &'a Store<F>,
Expand Down Expand Up @@ -174,7 +174,7 @@ pub trait Prover<'a, F: CurveCycleEquipped, C: Coprocessor<F> + 'a> {
/// Generate a proof from a sequence of frames
fn prove(
&self,
pp: &Self::PublicParams,
pp: &'a Self::PublicParams,
frames: &[Frame],
store: &'a Store<F>,
) -> Result<(Self::RecursiveSnark, Vec<F>, Vec<F>, usize), ProofError> {
Expand Down Expand Up @@ -205,7 +205,7 @@ pub trait Prover<'a, F: CurveCycleEquipped, C: Coprocessor<F> + 'a> {
/// Evaluate an expression with an environment and then generate the corresponding proof
fn evaluate_and_prove(
&self,
pp: &Self::PublicParams,
pp: &'a Self::PublicParams,
expr: Ptr,
env: Ptr,
store: &'a Store<F>,
Expand Down
6 changes: 3 additions & 3 deletions src/proof/nova.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ where
/// A proof for the intermediate steps of a recursive computation along with
/// the number of steps used for verification
Recursive(
Box<RecursiveSNARK<E1<F>, E2<F>, C1LEM<'a, F, C>, C2<F>>>,
Box<RecursiveSNARK<'a, E1<F>, E2<F>, C1LEM<'a, F, C>, C2<F>>>,
usize,
PhantomData<&'a C>,
),
Expand Down Expand Up @@ -234,7 +234,7 @@ where

#[tracing::instrument(skip_all, name = "nova::prove_recursively")]
fn prove_recursively(
pp: &PublicParams<F, C1LEM<'a, F, C>>,
pp: &'a PublicParams<F, C1LEM<'a, F, C>>,
z0: &[F],
steps: Vec<C1LEM<'a, F, C>>,
store: &'a Store<F>,
Expand All @@ -257,7 +257,7 @@ where
tracing::debug!("steps.len: {num_steps}");

// produce a recursive SNARK
let mut recursive_snark: Option<RecursiveSNARK<E1<F>, E2<F>, C1LEM<'a, F, C>, C2<F>>> =
let mut recursive_snark: Option<RecursiveSNARK<'_, E1<F>, E2<F>, C1LEM<'a, F, C>, C2<F>>> =
None;

// the shadowing here is voluntary
Expand Down
6 changes: 3 additions & 3 deletions src/proof/supernova.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ where
<<E2<F> as Engine>::Scalar as ff::PrimeField>::Repr: Abomonation,
{
/// A proof for the intermediate steps of a recursive computation
Recursive(Box<RecursiveSNARK<E1<F>, E2<F>>>),
Recursive(Box<RecursiveSNARK<'a, E1<F>, E2<F>>>),
/// A proof for the final step of a recursive computation
Compressed(
Box<CompressedSNARK<E1<F>, E2<F>, C1LEM<'a, F, C>, C2<F>, SS1<F>, SS2<F>>>,
Expand Down Expand Up @@ -177,14 +177,14 @@ where

#[tracing::instrument(skip_all, name = "supernova::prove_recursively")]
fn prove_recursively(
pp: &PublicParams<F, C1LEM<'a, F, C>>,
pp: &'a PublicParams<F, C1LEM<'a, F, C>>,
z0: &[F],
steps: Vec<C1LEM<'a, F, C>>,
store: &'a Store<F>,
_reduction_count: usize,
_lang: Arc<Lang<F, C>>,
) -> Result<Self, ProofError> {
let mut recursive_snark_option: Option<RecursiveSNARK<E1<F>, E2<F>>> = None;
let mut recursive_snark_option: Option<RecursiveSNARK<'_, E1<F>, E2<F>>> = None;

let z0_primary = z0;
let z0_secondary = Self::z0_secondary();
Expand Down

0 comments on commit cc9de14

Please sign in to comment.