Skip to main content

commit_traces

Function commit_traces 

Source
pub fn commit_traces<F, EF, SC>(
    config: &SC,
    traces: Vec<DenseMatrix<F>>,
) -> Committed<F, DenseMatrix<F>, <SC as StarkConfig<F, EF>>::Lmcs>
where F: TwoAdicField, EF: ExtensionField<F>, SC: StarkConfig<F, EF>,
Expand description

Commit multiple trace matrices with lifting: LDE → LMCS tree.

Traces must be sorted by height in ascending order. Each trace is lifted to the max LDE domain using the appropriate nested coset shift.

The DFT output is wrapped in BitReversedMatrixView (zero-cost view) and passed directly to the LMCS — no materialization needed.

Returns a Committed wrapper providing:

§Arguments

  • config: STARK configuration containing PCS params, LMCS, and DFT
  • traces: Trace matrices sorted by height (ascending)

§Panics

  • If traces is empty
  • If trace heights are not powers of two
  • If traces are not sorted by height in ascending order

Lifting note: for a trace of height n embedded into a max height n_max, let r = n_max / n. The commitment should behave as if it contains evaluations of the lifted polynomial f_lift(X) = f(Xʳ) on the max LDE coset. This is achieved by evaluating the original trace on a nested coset with shift gʳ: the map (g·ω)ʳ = gʳ·ωʳ sends the max domain down to the smaller one.