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>

source

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>
where E: FieldElement, H: ElementHasher<BaseField = E::BaseField>,

source§

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)

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_trace does 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> )

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> )

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>

Returns trace table rows at the specified positions along with Merkle authentication paths from the commitment root to these rows.

source§

fn trace_len(&self) -> usize

Returns the number of rows in the execution trace.

source§

fn blowup(&self) -> usize

Returns blowup factor which was used to extend original execution trace into trace LDE.

source§

fn trace_layout(&self) -> &TraceLayout

Returns the trace layout of the execution trace.

§

type HashFn = H

The hash function used for building the Merkle tree commitments to trace segment LDEs.

Auto Trait Implementations§

§

impl<E, H> RefUnwindSafe for DefaultTraceLde<E, H>

§

impl<E, H> Send for DefaultTraceLde<E, H>

§

impl<E, H> Sync for DefaultTraceLde<E, H>

§

impl<E, H> Unpin for DefaultTraceLde<E, H>
where <E as FieldElement>::BaseField: Unpin, <H as Hasher>::Digest: Unpin,

§

impl<E, H> UnwindSafe for DefaultTraceLde<E, H>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more