Skip to content

Commit

Permalink
skip structural witin commitment & PCS(#654):
Browse files Browse the repository at this point in the history
- Modify create_structural_witin() & create_witin() to improve readability
  • Loading branch information
10to4 committed Dec 12, 2024
1 parent 55e3b6b commit 65869f1
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions ceno_zkvm/src/circuit_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,8 @@ impl<E: ExtensionField> ConstraintSystem<E> {
}

pub fn create_witin<NR: Into<String>, N: FnOnce() -> NR>(&mut self, n: N) -> WitIn {
let wit_in = WitIn {
id: {
let id = self.num_witin;
self.num_witin = self.num_witin.strict_add(1);
id
},
};
let wit_in = WitIn { id: self.num_witin };
self.num_witin = self.num_witin.strict_add(1);

let path = self.ns.compute_path(n().into());
self.witin_namespace_map.push(path);
Expand All @@ -248,12 +243,9 @@ impl<E: ExtensionField> ConstraintSystem<E> {
n: N,
) -> StructuralWitIn {
let wit_in = StructuralWitIn {
id: {
let id = self.num_structural_witin;
self.num_structural_witin = self.num_structural_witin.strict_add(1);
id
},
id: self.num_structural_witin,
};
self.num_structural_witin = self.num_structural_witin.strict_add(1);

let path = self.ns.compute_path(n().into());
self.witin_namespace_map.push(path);
Expand Down

0 comments on commit 65869f1

Please sign in to comment.