Skip to content

Commit

Permalink
Remove debug data
Browse files Browse the repository at this point in the history
  • Loading branch information
volhovm committed Feb 28, 2024
1 parent d000246 commit 479421b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
8 changes: 2 additions & 6 deletions msm/src/column_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,13 @@ impl<'a, F: FftField> ColumnEnvironment<'a, F> for MSMColumnEnvironment<'a, F> {
let coefficients_columns_n: usize = self.coefficients.len();
let crate::columns::Column::X(i) = col;
let i = *i;
println!("ColumnEnv::get_column called on column {:?}", i);
if i < witness_columns_n {
let res = &self.witness[i];
println!("Returning result: {:?}", res);
Some(res)
} else if i < witness_columns_n + coefficients_columns_n {
panic!("We don't have constant columns")
//Some(&self.coefficients[i])
Some(&self.coefficients[i])
} else {
panic!("Column index too big")
//None
None
}
}

Expand Down
30 changes: 0 additions & 30 deletions msm/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,6 @@ where
.collect::<WitnessColumns<_>>()
};

println!(
"witness_polys: len {:?},\n [0] elem: degree {:?}, {:?},\n [1] elem: degree {:?}, {:?},\n [2] elem: degree {:?} {:?}",
witness_polys.x.len(),
witness_polys.x[0].degree(),
witness_polys.x[0].coeffs,
witness_polys.x[1].degree(),
witness_polys.x[1].coeffs,
witness_polys.x[2].degree(),
witness_polys.x[2].coeffs,
);

let witness_comms: WitnessColumns<PolyComm<G>> = {
let comm = |poly: &DensePolynomial<G::ScalarField>| srs.commit_non_hiding(poly, 1);
(&witness_polys)
Expand Down Expand Up @@ -134,15 +123,6 @@ where
witness_evals_8.push(eval);
}

//let mut witness_evals_1: Vec<Evaluations<G::ScalarField, D<G::ScalarField>>> = vec![];
//for witness_poly in witness_polys.x.iter() {
// let eval = witness_poly.evaluate_over_domain_by_ref(domain.d1);
// witness_evals_1.push(eval);
//}

//println!("Witness_evals_8: {:?}", witness_evals_8);
//println!("Witness_evals_1: {:?}", witness_evals_1);

////////////////////////////////////////////////////////////////////////////
// Round 2: Creating and committing to the quotient polynomial
////////////////////////////////////////////////////////////////////////////
Expand All @@ -155,8 +135,6 @@ where
//~ 1. Derive $\alpha$ from $\alpha'$ using the endomorphism (TODO: details)
let alpha: G::ScalarField = alpha_chal.to_field(endo_r);

println!("Alpha: {:?}", alpha);

// TODO These should be evaluations of fixed coefficient polys
let coefficient_evals_8: Vec<Evaluations<G::ScalarField, D<G::ScalarField>>> = vec![];

Expand Down Expand Up @@ -194,19 +172,11 @@ where

let combined_expr = Expr::combine_constraints(0..(constraints.len() as u32), constraints);

println!("Combined expression: {:?}", combined_expr);

let expr_evaluation: Evaluations<G::ScalarField, D<G::ScalarField>> =
combined_expr.evaluations(&column_env);
println!("expr_evaluations: {:?}", expr_evaluation);

let expr_evaluation_interpolated = expr_evaluation.interpolate();

println!(
"expr_evaluations_interpolated: is_zero? {:?}, {:?}",
DenseOrSparsePolynomial::from(expr_evaluation_interpolated.clone()).is_zero(),
expr_evaluation_interpolated.clone()
);
// divide contributions with vanishing polynomial
let (quotient, res) = expr_evaluation_interpolated
.divide_by_vanishing_poly(domain.d1)
Expand Down

0 comments on commit 479421b

Please sign in to comment.