Skip to content

Commit

Permalink
refactor(chunk-pattern): nipitcks
Browse files Browse the repository at this point in the history
  • Loading branch information
tchataigner committed Feb 20, 2024
1 parent ea83394 commit 0982be6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/chunk/examples/chunk_add_nivc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl<F: PrimeField> ChunkStepCircuit<F> for ChunkStep<F> {
}
}

fn chunk_synthesize<CS: ConstraintSystem<F>>(
fn synthesize<CS: ConstraintSystem<F>>(
&self,
cs: &mut CS,
_pc: Option<&AllocatedNum<F>>,
Expand Down Expand Up @@ -180,7 +180,7 @@ fn main() {
<E1 as Engine>::Scalar::zero(),
];

// number of iterations of MinRoot per Nova's recursive step
// Different instantiations of circuit for each of the nova fold steps
let inner_chunk_circuit = Inner::new(&[
<E1 as Engine>::Scalar::one(),
<E1 as Engine>::Scalar::from(2),
Expand Down
2 changes: 1 addition & 1 deletion crates/chunk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl<F: PrimeField, C: ChunkStepCircuit<F> + Clone, const N: usize> FoldStep<F,
) -> Result<(Option<AllocatedNum<F>>, Vec<AllocatedNum<F>>), SynthesisError> {
let (z_in, chunk_in) = z.split_at(C::arity());

let mut z_out = self.circuit.chunk_synthesize(
let mut z_out = self.circuit.synthesize(
&mut cs.namespace(|| format!("chunk_folding_step_{}", self.step_nbr)),
pc,
z_in,
Expand Down
4 changes: 2 additions & 2 deletions crates/chunk/src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ pub trait ChunkStepCircuit<F: PrimeField>: Clone + Sync + Send + Debug + Partial
1
}

/// `chunk_synthesize` must be the method that performs the computation for a given step.
/// `synthesize` must be the method that performs the computation for a given step.
///
/// # Arguments
/// * `cs` - The constraint system to which the circuit is being added.
/// * `pc` - The program counter value for the current step.
/// * `z` - The accumulator value for the current step.
/// * `chunk_in` - The input values for the current step (which are the output values from the previous step).
fn chunk_synthesize<CS: ConstraintSystem<F>>(
fn synthesize<CS: ConstraintSystem<F>>(
&self,
cs: &mut CS,
pc: Option<&AllocatedNum<F>>,
Expand Down
2 changes: 1 addition & 1 deletion crates/chunk/tests/gadget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<F: PrimeField> ChunkStepCircuit<F> for ChunkStep<F> {
}
}

fn chunk_synthesize<CS: ConstraintSystem<F>>(
fn synthesize<CS: ConstraintSystem<F>>(
&self,
cs: &mut CS,
_pc: Option<&AllocatedNum<F>>,
Expand Down

0 comments on commit 0982be6

Please sign in to comment.