Skip to content

Commit

Permalink
Resolve feedback from @han0110
Browse files Browse the repository at this point in the history
  • Loading branch information
ed255 committed Feb 2, 2024
1 parent fe2e28e commit 134143c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 77 deletions.
1 change: 0 additions & 1 deletion backend/src/plonk/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@ impl<
.chain(vanishing.open(x));

let prover = P::new(params);
println!("DBG create_proof");
prover
.create_proof(rng, self.transcript, instances)
.map_err(|_| Error::ConstraintSystemFailure)?;
Expand Down
73 changes: 0 additions & 73 deletions common/src/plonk/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1617,79 +1617,6 @@ impl<F: Field> From<ConstraintSystem<F>> for ConstraintSystemV2Backend<F> {
}
}

/*
impl<F: Field> Into<ConstraintSystemV2Backend<F>> for ConstraintSystem<F> {
fn into(self) -> ConstraintSystemV2Backend<F> {
ConstraintSystemV2Backend {
num_fixed_columns: self.num_fixed_columns,
num_advice_columns: self.num_advice_columns,
num_instance_columns: self.num_instance_columns,
num_challenges: self.num_challenges,
unblinded_advice_columns: self.unblinded_advice_columns.clone(),
advice_column_phase: self.advice_column_phase.iter().map(|p| p.0).collect(),
challenge_phase: self.challenge_phase.iter().map(|p| p.0).collect(),
gates: self
.gates
.iter()
.map(|g| {
g.polys.clone().into_iter().enumerate().map(|(i, e)| {
let name = match g.constraint_name(i) {
"" => g.name.clone(),
constraint_name => format!("{}:{}", g.name, constraint_name),
};
GateV2Backend {
name,
poly: e.into(),
}
})
})
.flatten()
.collect(),
permutation: self.permutation.clone(),
lookups: self
.lookups
.iter()
.map(|l| halo2_middleware::lookup::ArgumentV2 {
name: l.name.clone(),
input_expressions: l
.input_expressions
.clone()
.into_iter()
.map(|e| e.into())
.collect(),
table_expressions: l
.table_expressions
.clone()
.into_iter()
.map(|e| e.into())
.collect(),
})
.collect(),
shuffles: self
.shuffles
.iter()
.map(|s| halo2_middleware::shuffle::ArgumentV2 {
name: s.name.clone(),
input_expressions: s
.input_expressions
.clone()
.into_iter()
.map(|e| e.into())
.collect(),
shuffle_expressions: s
.shuffle_expressions
.clone()
.into_iter()
.map(|e| e.into())
.collect(),
})
.collect(),
general_column_annotations: self.general_column_annotations.clone(),
}
}
}
*/

/// Collect queries used in gates while mapping those gates to equivalent ones with indexed
/// query references in the expressions.
fn cs2_collect_queries_gates<F: Field>(
Expand Down
1 change: 0 additions & 1 deletion halo2_proofs/src/plonk/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ where
let mut challenges = HashMap::new();
let phases = prover.phases.clone();
for phase in &phases {
println!("DBG phase {}", phase.0);
let mut witnesses = Vec::with_capacity(circuits.len());
for witness_calc in witness_calcs.iter_mut() {
witnesses.push(witness_calc.calc(phase.0, &challenges)?);
Expand Down
7 changes: 5 additions & 2 deletions halo2_proofs/tests/frontend_backend_split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,11 @@ impl<F: Field + From<u64>, const WIDTH_FACTOR: usize> Circuit<F> for MyCircuit<F
config: Vec<MyCircuitConfig>,
mut layouter: impl Layouter<F>,
) -> Result<(), Error> {
// 2 queries from first gate, 3 for permutation argument, 1 for multipoen, 1 for off-by-one
// errors, 1 for off-by-two errors?
// - 2 queries from first gate
// - 3 for permutation argument
// - 1 for multipoen
// - 1 for the last row of grand product poly to check that the product result is 1
// - 1 for off-by-one errors
let unusable_rows = 2 + 3 + 1 + 1 + 1;
let max_rows = 2usize.pow(self.k) - unusable_rows;
for config in &config {
Expand Down

0 comments on commit 134143c

Please sign in to comment.