Skip to content

Commit

Permalink
PR review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaucube committed Jan 5, 2024
1 parent 9e20fbc commit 191583e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
12 changes: 11 additions & 1 deletion src/folding/nova/decider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,28 @@ where
_c2: PhantomData<C2>,
_gc2: PhantomData<GC2>,

/// E vector's length of the Nova instance witness
pub E_len: usize,
/// E vector's length of the CycleFold instance witness
pub cf_E_len: usize,
/// R1CS of the Augmented Function circuit
pub r1cs: R1CS<C1::ScalarField>,
/// R1CS of the CycleFold circuit
pub cf_r1cs: R1CS<C2::ScalarField>,
pub cf_pedersen_params: PedersenParams<C2>, // CycleFold's Pedersen params
/// CycleFold PedersenParams, over C2
pub cf_pedersen_params: PedersenParams<C2>,
pub poseidon_config: PoseidonConfig<CF1<C1>>,
pub i: Option<CF1<C1>>,
/// initial state
pub z_0: Option<Vec<C1::ScalarField>>,
/// current i-th state
pub z_i: Option<Vec<C1::ScalarField>>,
/// Nova instances
pub u_i: Option<CommittedInstance<C1>>,
pub w_i: Option<Witness<C1>>,
pub U_i: Option<CommittedInstance<C1>>,
pub W_i: Option<Witness<C1>>,
/// CycleFold running instance
pub cf_U_i: Option<CommittedInstance<C2>>,
pub cf_W_i: Option<Witness<C2>>,
}
Expand Down Expand Up @@ -324,6 +333,7 @@ where
)?;

// 3. u_i.cmE==cm(0), u_i.u==1
// Here zero_x & zero_y are the x & y coordinates of the zero point affine representation.
let zero_x = NonNativeFieldVar::<C1::BaseField, C1::ScalarField>::new_constant(
cs.clone(),
C1::BaseField::zero(),
Expand Down
18 changes: 13 additions & 5 deletions src/folding/nova/ivc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,29 @@ where
_gc1: PhantomData<GC1>,
_c2: PhantomData<C2>,
_gc2: PhantomData<GC2>,
/// R1CS of the Augmented Function circuit
pub r1cs: R1CS<C1::ScalarField>,
pub cf_r1cs: R1CS<C2::ScalarField>, // Notice that this is a different set of R1CS constraints than the 'r1cs'. This is the R1CS of the CycleFoldCircuit
/// R1CS of the CycleFold circuit
pub cf_r1cs: R1CS<C2::ScalarField>,
pub poseidon_config: PoseidonConfig<C1::ScalarField>,
pub pedersen_params: PedersenParams<C1>, // PedersenParams over C1
pub cf_pedersen_params: PedersenParams<C2>, // CycleFold PedersenParams, over C2
pub F: FC, // F circuit
/// PedersenParams over C1
pub pedersen_params: PedersenParams<C1>,
/// CycleFold PedersenParams, over C2
pub cf_pedersen_params: PedersenParams<C2>,
/// F circuit, the circuit that is being folded
pub F: FC,
pub i: C1::ScalarField,
/// initial state
pub z_0: Vec<C1::ScalarField>,
/// current i-th state
pub z_i: Vec<C1::ScalarField>,
/// Nova instances
pub w_i: Witness<C1>,
pub u_i: CommittedInstance<C1>,
pub W_i: Witness<C1>,
pub U_i: CommittedInstance<C1>,

// cyclefold running instance
/// CycleFold running instance
pub cf_W_i: Witness<C2>,
pub cf_U_i: CommittedInstance<C2>,
}
Expand Down

0 comments on commit 191583e

Please sign in to comment.