Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gswirski committed Nov 23, 2024
1 parent d83cc0d commit 2e16460
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
4 changes: 3 additions & 1 deletion prover/benches/lagrange_kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ use criterion::{criterion_group, criterion_main, BatchSize, BenchmarkId, Criteri
use crypto::{hashers::Blake3_256, DefaultRandomCoin, MerkleTree, RandomCoin};
use math::{fields::f64::BaseElement, ExtensionOf, FieldElement};
use winter_prover::{
matrix::ColMatrix, CompositionPoly, CompositionPolyTrace, DefaultConstraintCommitment, DefaultConstraintEvaluator, DefaultTraceLde, Prover, ProverGkrProof, StarkDomain, Trace, TracePolyTable
matrix::ColMatrix, CompositionPoly, CompositionPolyTrace, DefaultConstraintCommitment,
DefaultConstraintEvaluator, DefaultTraceLde, Prover, ProverGkrProof, StarkDomain, Trace,
TracePolyTable,
};

const TRACE_LENS: [usize; 2] = [2_usize.pow(16), 2_usize.pow(20)];
Expand Down
18 changes: 9 additions & 9 deletions prover/src/constraints/commitment/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// LICENSE file in the root directory of this source tree.

use alloc::vec::Vec;
use tracing::info_span;
use core::marker::PhantomData;
use tracing::info_span;

use air::{proof::Queries, PartitionOptions};
use crypto::{ElementHasher, VectorCommitment};
Expand Down Expand Up @@ -48,11 +48,14 @@ where
domain: &StarkDomain<E::BaseField>,
partition_options: PartitionOptions,
) -> (Self, CompositionPoly<E>) {

// extend the main execution trace and build a commitment to the extended trace
let (evaluations, commitment, composition_poly) =
build_constraint_commitment::<E, H, V>(composition_poly_trace, num_constraint_composition_columns, domain, partition_options);

let (evaluations, commitment, composition_poly) = build_constraint_commitment::<E, H, V>(
composition_poly_trace,
num_constraint_composition_columns,
domain,
partition_options,
);

assert_eq!(
evaluations.num_rows(),
commitment.domain_len(),
Expand Down Expand Up @@ -142,10 +145,7 @@ where
"compute_constraint_evaluation_commitment",
log_domain_size = domain_size.ilog2()
)
.in_scope(|| {
composed_evaluations
.commit_to_rows::<H, V>(partition_options)
});
.in_scope(|| composed_evaluations.commit_to_rows::<H, V>(partition_options));

(composed_evaluations, commitment, composition_poly)
}
1 change: 0 additions & 1 deletion prover/src/constraints/commitment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use super::RowMatrix;
mod default;
pub use default::DefaultConstraintCommitment;


// CONSTRAINT COMMITMENT
// ================================================================================================

Expand Down
3 changes: 1 addition & 2 deletions prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ use matrix::{ColMatrix, RowMatrix};
mod constraints;
pub use constraints::{
CompositionPoly, CompositionPolyTrace, ConstraintCommitment, ConstraintEvaluator,
DefaultConstraintEvaluator, DefaultConstraintCommitment,
DefaultConstraintCommitment, DefaultConstraintEvaluator,
};

mod composer;
Expand Down Expand Up @@ -153,7 +153,6 @@ pub trait Prover {
where
E: FieldElement<BaseField = Self::BaseField>;


/// Constraints evaluator used to evaluate AIR constraints over the extended execution trace.
type ConstraintEvaluator<'a, E>: ConstraintEvaluator<E, Air = Self::Air>
where
Expand Down
5 changes: 4 additions & 1 deletion winterfell/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ use std::{vec, vec::Vec};
use air::{GkrRandElements, LagrangeKernelRandElements};
use crypto::MerkleTree;
use prover::{
crypto::{hashers::Blake3_256, DefaultRandomCoin, RandomCoin}, math::{fields::f64::BaseElement, ExtensionOf, FieldElement}, matrix::ColMatrix, CompositionPoly, DefaultConstraintCommitment
crypto::{hashers::Blake3_256, DefaultRandomCoin, RandomCoin},
math::{fields::f64::BaseElement, ExtensionOf, FieldElement},
matrix::ColMatrix,
CompositionPoly, DefaultConstraintCommitment,
};

use super::*;
Expand Down

0 comments on commit 2e16460

Please sign in to comment.