Skip to content

Commit

Permalink
chore: remove unused committed values DslIr instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-sun committed Jan 12, 2025
1 parent bca69b3 commit e622671
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
10 changes: 0 additions & 10 deletions extensions/native/compiler/src/constraints/halo2/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ impl<C: Config + Debug> Halo2ConstraintCompiler<C> {
let mut felts = HashMap::<u32, AssignedBabyBear>::new();
let mut exts = HashMap::<u32, AssignedBabyBearExt4>::new();

let mut vkey_hash = None;
let mut committed_values_digest = None;
#[cfg(feature = "bench-metrics")]
let mut old_stats = stats_snapshot(ctx, range.clone());
for (instruction, backtrace) in operations {
Expand Down Expand Up @@ -396,14 +394,6 @@ impl<C: Config + Debug> Halo2ConstraintCompiler<C> {
let x = ext_chip.load_witness(ctx, halo2_state.exts[&b]);
exts.insert(a.0, x);
}
DslIr::CircuitCommitVkeyHash(a) => {
assert!(vkey_hash.is_none());
vkey_hash = Some(vars[&a.0]);
}
DslIr::CircuitCommitCommittedValuesDigest(a) => {
assert!(committed_values_digest.is_none());
committed_values_digest = Some(vars[&a.0]);
}
DslIr::CircuitFelts2Ext(a, b) => {
let x = AssignedBabyBearExt4(
a.iter()
Expand Down
8 changes: 0 additions & 8 deletions extensions/native/compiler/src/constraints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,6 @@ impl<C: Config + Debug> ConstraintCompiler<C> {
opcode: ConstraintOpcode::WitnessE,
args: vec![vec![a.id()], vec![b.to_string()]],
}),
DslIr::CircuitCommitVkeyHash(a) => constraints.push(Constraint {
opcode: ConstraintOpcode::CommitVkeyHash,
args: vec![vec![a.id()]],
}),
DslIr::CircuitCommitCommittedValuesDigest(a) => constraints.push(Constraint {
opcode: ConstraintOpcode::CommitCommittedValuesDigest,
args: vec![vec![a.id()]],
}),
DslIr::CircuitFelts2Ext(a, b) => constraints.push(Constraint {
opcode: ConstraintOpcode::CircuitFelts2Ext,
args: vec![
Expand Down
9 changes: 0 additions & 9 deletions extensions/native/compiler/src/ir/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,6 @@ impl<C: Config> Builder<C> {
});
}

pub fn commit_vkey_hash_circuit(&mut self, var: Var<C::N>) {
self.operations.push(DslIr::CircuitCommitVkeyHash(var));
}

pub fn commit_committed_values_digest_circuit(&mut self, var: Var<C::N>) {
self.operations
.push(DslIr::CircuitCommitCommittedValuesDigest(var));
}

pub fn cycle_tracker_start(&mut self, name: &str) {
self.operations
.push(DslIr::CycleTrackerStart(name.to_string()));
Expand Down
6 changes: 0 additions & 6 deletions extensions/native/compiler/src/ir/instructions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,6 @@ pub enum DslIr<C: Config> {
Halt,

// Public inputs for circuits.
/// Asserts that the inputted var is equal the circuit's vkey hash public input. Should only be
/// used when target is a circuit.
CircuitCommitVkeyHash(Var<C::N>),
/// Asserts that the inputted var is equal the circuit's committed values digest public input. Should
/// only be used when target is a circuit.
CircuitCommitCommittedValuesDigest(Var<C::N>),
/// Publish a field element as the ith public value. Should only be used when target is a circuit.
CircuitPublish(Var<C::N>, usize),

Expand Down

0 comments on commit e622671

Please sign in to comment.