diff --git a/crypto/src/merkle/mod.rs b/crypto/src/merkle/mod.rs index 3604f9a95..51b4a76dc 100644 --- a/crypto/src/merkle/mod.rs +++ b/crypto/src/merkle/mod.rs @@ -89,8 +89,8 @@ mod tests; /// ``` #[derive(Debug)] pub struct MerkleTree { - pub nodes: Vec, - pub leaves: Vec, + nodes: Vec, + leaves: Vec, } /// Merkle tree opening consisting of a leaf value and a Merkle path leading from this leaf diff --git a/prover/src/constraints/composition_poly.rs b/prover/src/constraints/composition_poly.rs index 78ad5e9e5..444585a68 100644 --- a/prover/src/constraints/composition_poly.rs +++ b/prover/src/constraints/composition_poly.rs @@ -13,7 +13,7 @@ use super::{ColMatrix, StarkDomain}; // ================================================================================================ /// Represents merged evaluations of all constraint evaluations. -pub struct CompositionPolyTrace(pub Vec); +pub struct CompositionPolyTrace(Vec); impl CompositionPolyTrace { /// Returns a new instance of [CompositionPolyTrace] instantiated from the provided evaluations. @@ -62,20 +62,13 @@ impl CompositionPoly { domain.trace_length() < composition_trace.num_rows(), "trace length must be smaller than length of composition polynomial trace" ); - // println!("coset intt in composition poly {} -> len {} cols {}", composition_trace.num_rows(), domain.trace_length(), num_cols); let mut trace = composition_trace.into_inner(); - // println!("trace-before {:?}", trace); - // at this point, combined_poly contains evaluations of the combined constraint polynomial; // we interpolate this polynomial to transform it into coefficient form. let inv_twiddles = fft::get_inv_twiddles::(trace.len()); fft::interpolate_poly_with_offset(&mut trace, &inv_twiddles, domain.offset()); - // fft::interpolate_poly(&mut trace, &inv_twiddles); - - // println!("cpu-trace-after {:?}", trace); - let polys = segment(trace, domain.trace_length(), num_cols); diff --git a/prover/src/lib.rs b/prover/src/lib.rs index 0bfb3d308..fc4d2cbbf 100644 --- a/prover/src/lib.rs +++ b/prover/src/lib.rs @@ -532,45 +532,6 @@ pub trait Prover { ) -> (Self::ConstraintCommitment, CompositionPoly) where E: FieldElement; - - - // , - // { - // // first, build constraint composition polynomial from its trace as follows: - // // - interpolate the trace into a polynomial in coefficient form - // // - "break" the polynomial into a set of column polynomials each of degree equal to - // // trace_length - 1 - // let composition_poly = info_span!( - // "build_composition_poly_columns", - // num_columns = num_constraint_composition_columns - // ) - // .in_scope(|| { - // CompositionPoly::new(composition_poly_trace, domain, num_constraint_composition_columns) - // }); - // assert_eq!(composition_poly.num_columns(), num_constraint_composition_columns); - // assert_eq!(composition_poly.column_degree(), domain.trace_length() - 1); - - // // then, evaluate composition polynomial columns over the LDE domain - // let domain_size = domain.lde_domain_size(); - // let composed_evaluations = info_span!("evaluate_composition_poly_columns").in_scope(|| { - // RowMatrix::evaluate_polys_over::(composition_poly.data(), domain) - // }); - // assert_eq!(composed_evaluations.num_cols(), num_constraint_composition_columns); - // assert_eq!(composed_evaluations.num_rows(), domain_size); - - // // finally, build constraint evaluation commitment - // let constraint_commitment = info_span!( - // "compute_constraint_evaluation_commitment", - // log_domain_size = domain_size.ilog2() - // ) - // .in_scope(|| { - // let commitment = composed_evaluations - // .commit_to_rows::(self.options().partition_options()); - // self.new_constraint_commitment(composed_evaluations, commitment) - // }); - - // (constraint_commitment, composition_poly) - // } #[doc(hidden)] #[instrument(skip_all)] diff --git a/prover/src/matrix/row_matrix.rs b/prover/src/matrix/row_matrix.rs index b5b618004..91c5c04aa 100644 --- a/prover/src/matrix/row_matrix.rs +++ b/prover/src/matrix/row_matrix.rs @@ -44,22 +44,6 @@ impl RowMatrix { // CONSTRUCTORS // -------------------------------------------------------------------------------------------- - /// Returns a new [Matrix] instantiated with the data from the specified rows. - /// - /// # Panics - /// Panics if: - /// * The provided vector of rows is empty. - /// * Not all of the rows have the same number of elements. - /// * Number of columns is smaller than or equal to 1. - /// * Number of columns is not a power of two. - pub fn new(data: Vec, num_columns: usize) -> Self { - Self { - data, - row_width: num_columns * E::EXTENSION_DEGREE, - elements_per_row: num_columns * E::EXTENSION_DEGREE, - } - } - /// Returns a new [RowMatrix] constructed by evaluating the provided polynomials over the /// domain defined by the specified blowup factor. ///