Struct winter_prover::DefaultTraceLde
source · pub struct DefaultTraceLde<E: FieldElement, H: ElementHasher<BaseField = E::BaseField>> { /* private fields */ }Expand description
Contains all segments of the extended execution trace, the commitments to these segments, the LDE blowup factor, and the TraceInfo.
Segments are stored in two groups:
- Main segment: this is the first trace segment generated by the prover. Values in this segment will always be elements in the base field (even when an extension field is used).
- Auxiliary segments: a list of 0 or more segments for traces generated after the prover commits to the first trace segment. Currently, at most 1 auxiliary segment is possible.
Implementations§
source§impl<E: FieldElement, H: ElementHasher<BaseField = E::BaseField>> DefaultTraceLde<E, H>
impl<E: FieldElement, H: ElementHasher<BaseField = E::BaseField>> DefaultTraceLde<E, H>
sourcepub fn new(
trace_info: &TraceInfo,
main_trace: &ColMatrix<E::BaseField>,
domain: &StarkDomain<E::BaseField>
) -> (Self, TracePolyTable<E>)
pub fn new( trace_info: &TraceInfo, main_trace: &ColMatrix<E::BaseField>, domain: &StarkDomain<E::BaseField> ) -> (Self, TracePolyTable<E>)
Takes the main trace segment columns as input, interpolates them into polynomials in coefficient form, evaluates the polynomials over the LDE domain, commits to the polynomial evaluations, and creates a new DefaultTraceLde with the LDE of the main trace segment and the commitment.
Returns a tuple containing a TracePolyTable with the trace polynomials for the main trace segment and the new DefaultTraceLde.
Trait Implementations§
source§impl<E, H> TraceLde<E> for DefaultTraceLde<E, H>
impl<E, H> TraceLde<E> for DefaultTraceLde<E, H>
source§fn get_main_trace_commitment(&self) -> <Self::HashFn as Hasher>::Digest
fn get_main_trace_commitment(&self) -> <Self::HashFn as Hasher>::Digest
Returns the commitment to the low-degree extension of the main trace segment.
source§fn add_aux_segment(
&mut self,
aux_trace: &ColMatrix<E>,
domain: &StarkDomain<E::BaseField>
) -> (ColMatrix<E>, <Self::HashFn as Hasher>::Digest)
fn add_aux_segment( &mut self, aux_trace: &ColMatrix<E>, domain: &StarkDomain<E::BaseField> ) -> (ColMatrix<E>, <Self::HashFn as Hasher>::Digest)
Takes auxiliary trace segment columns as input, interpolates them into polynomials in coefficient form, evaluates the polynomials over the LDE domain, and commits to the polynomial evaluations.
Returns a tuple containing the column polynomials in coefficient from and the commitment to the polynomial evaluations over the LDE domain.
Panics
This function will panic if any of the following are true:
- the number of rows in the provided
aux_tracedoes not match the main trace. - this segment would exceed the number of segments specified by the trace layout.
source§fn read_main_trace_frame_into(
&self,
lde_step: usize,
frame: &mut EvaluationFrame<E::BaseField>
)
fn read_main_trace_frame_into( &self, lde_step: usize, frame: &mut EvaluationFrame<E::BaseField> )
Reads current and next rows from the main trace segment into the specified frame.
source§fn read_aux_trace_frame_into(
&self,
lde_step: usize,
frame: &mut EvaluationFrame<E>
)
fn read_aux_trace_frame_into( &self, lde_step: usize, frame: &mut EvaluationFrame<E> )
Reads current and next rows from the auxiliary trace segment into the specified frame.
Panics
This currently assumes that there is exactly one auxiliary trace segment, and will panic otherwise.
source§fn query(&self, positions: &[usize]) -> Vec<Queries>
fn query(&self, positions: &[usize]) -> Vec<Queries>
Returns trace table rows at the specified positions along with Merkle authentication paths from the commitment root to these rows.
source§fn blowup(&self) -> usize
fn blowup(&self) -> usize
Returns blowup factor which was used to extend original execution trace into trace LDE.
source§fn trace_layout(&self) -> &TraceLayout
fn trace_layout(&self) -> &TraceLayout
Returns the trace layout of the execution trace.