Skip to content

Commit

Permalink
Rename synthesize to assign_virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltea committed Feb 21, 2024
1 parent 9642044 commit 53daf7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lightclient-circuits/src/committee_update_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct CommitteeUpdateCircuit<S: Spec, F: Field> {
}

impl<S: Spec, F: Field> CommitteeUpdateCircuit<S, F> {
pub fn synthesize(
pub fn assign_virtual(
builder: &mut ShaCircuitBuilder<F, ShaBitGateManager<F>>,
fp_chip: &FpChip<F>,
args: &witness::CommitteeUpdateArgs<S>,
Expand Down Expand Up @@ -235,7 +235,7 @@ impl<S: Spec> AppCircuit for CommitteeUpdateCircuit<S, bn256::Fr> {
let range = builder.range_chip(lookup_bits);
let fp_chip = FpChip::new(&range, LIMB_BITS, NUM_LIMBS);

let assigned_instances = Self::synthesize(&mut builder, &fp_chip, witness)?;
let assigned_instances = Self::assign_virtual(&mut builder, &fp_chip, witness)?;
builder.set_instances(0, assigned_instances);

match stage {
Expand Down
4 changes: 2 additions & 2 deletions lightclient-circuits/src/sync_step_circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub struct StepCircuit<S: Spec + ?Sized, F: Field> {
}

impl<S: Spec, F: Field> StepCircuit<S, F> {
pub fn synthesize(
pub fn assign_virtual(
builder: &mut ShaCircuitBuilder<F, ShaFlexGateManager<F>>,
fp_chip: &FpChip<F>,
args: &witness::SyncStepArgs<S>,
Expand Down Expand Up @@ -412,7 +412,7 @@ impl<S: Spec> AppCircuit for StepCircuit<S, bn256::Fr> {
let range = builder.range_chip(lookup_bits);
let fp_chip = FpChip::new(&range, LIMB_BITS, NUM_LIMBS);

let assigned_instances = Self::synthesize(&mut builder, &fp_chip, args)?;
let assigned_instances = Self::assign_virtual(&mut builder, &fp_chip, args)?;
builder.set_instances(0, assigned_instances);

match stage {
Expand Down
4 changes: 2 additions & 2 deletions lightclient-circuits/tests/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub(crate) fn mock_step_circuit<S: Spec>(
let fp_chip = FpChip::new(&range, LIMB_BITS, NUM_LIMBS);

let assigned_instances =
StepCircuit::<S, bn256::Fr>::synthesize(&mut builder, &fp_chip, args).unwrap();
StepCircuit::<S, bn256::Fr>::assign_virtual(&mut builder, &fp_chip, args).unwrap();
builder.set_instances(0, assigned_instances);

builder.calculate_params(Some(
Expand All @@ -75,7 +75,7 @@ pub(crate) fn mock_committee_update_circuit<S: Spec>(
let fp_chip = FpChip::new(&range, LIMB_BITS, NUM_LIMBS);

let assigned_instances =
CommitteeUpdateCircuit::<S, bn256::Fr>::synthesize(&mut builder, &fp_chip, witness)
CommitteeUpdateCircuit::<S, bn256::Fr>::assign_virtual(&mut builder, &fp_chip, witness)
.unwrap();
builder.set_instances(0, assigned_instances);
builder.calculate_params(Some(
Expand Down

0 comments on commit 53daf7f

Please sign in to comment.