Skip to content

Commit

Permalink
Touch up compute_quotient_polys
Browse files Browse the repository at this point in the history
  • Loading branch information
hratoanina committed Jul 10, 2024
1 parent 20f5102 commit 96d599b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions starky/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,11 @@ where
&get_trace_values_packed,
&get_aux_values_packed,
lookup_challenges.as_ref(),
&lookups,
ctl_data,
public_inputs,
alphas.clone(),
degree_bits,
num_lookup_columns,
&num_ctl_polys,
config,
)
);
Expand Down Expand Up @@ -348,18 +346,16 @@ where

/// Computes the quotient polynomials `(sum alpha^i C_i(x)) / Z_H(x)` for `alpha` in `alphas`,
/// where the `C_i`s are the STARK constraints.
fn compute_quotient_polys<'a, F, P, C, S, const D: usize>(
pub fn compute_quotient_polys<'a, F, P, C, S, const D: usize>(
stark: &S,
get_trace_values_packed: &(dyn Fn(usize, usize) -> Vec<P> + Sync + Send),
get_aux_values_packed: &(dyn Fn(usize, usize) -> Vec<P> + Sync + Send),
lookup_challenges: Option<&'a Vec<F>>,
lookups: &[Lookup<F>],
ctl_data: Option<&CtlData<F>>,
public_inputs: &[F],
alphas: Vec<F>,
degree_bits: usize,
num_lookup_columns: usize,
num_ctl_columns: &[usize],
config: &StarkConfig,
) -> Option<Vec<PolynomialCoeffs<F>>>
where
Expand All @@ -374,6 +370,10 @@ where

let degree = 1 << degree_bits;
let rate_bits = config.fri_config.rate_bits;
let lookups = stark.lookups();
let num_ctl_columns = ctl_data
.map(|data| data.num_ctl_helper_polys())
.unwrap_or_default();
let total_num_helper_cols: usize = num_ctl_columns.iter().sum();

let quotient_degree_bits = log2_ceil(stark.quotient_degree_factor());
Expand Down Expand Up @@ -479,7 +479,7 @@ where
eval_vanishing_poly::<F, F, P, S, D, 1>(
stark,
&vars,
lookups,
&lookups,
lookup_vars,
ctl_vars.as_deref(),
&mut consumer,
Expand Down

0 comments on commit 96d599b

Please sign in to comment.