DefaultTraceLde

Struct DefaultTraceLde 

Source
pub struct DefaultTraceLde<E: FieldElement, H: ElementHasher<BaseField = E::BaseField>, V: VectorCommitment<H>> { /* 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, H, V> DefaultTraceLde<E, H, V>
where E: FieldElement, H: ElementHasher<BaseField = E::BaseField>, V: VectorCommitment<H>,

Source

pub fn new( trace_info: &TraceInfo, main_trace: &ColMatrix<E::BaseField>, domain: &StarkDomain<E::BaseField>, partition_options: PartitionOptions, ) -> (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, V> TraceLde<E> for DefaultTraceLde<E, H, V>
where E: FieldElement, H: ElementHasher<BaseField = E::BaseField> + Sync, V: VectorCommitment<H> + Sync,

Source§

fn get_main_trace_commitment(&self) -> H::Digest

Returns the commitment to the low-degree extension of the main trace segment.

Source§

fn set_aux_trace( &mut self, aux_trace: &ColMatrix<E>, domain: &StarkDomain<E::BaseField>, ) -> (ColMatrix<E>, H::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. Depending on whether num_partitions is equal to 1 or is greater than 1, committing to the polynomial evaluations row-wise is done either in one go in the former or in num_partition steps which are then combined in the latter.

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.
  • the auxiliary trace has been previously set already.
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 an opening proof to these rows againt the already computed commitment.

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_info(&self) -> &TraceInfo

Returns the trace info of the execution trace.

Source§

type HashFn = H

The hash function used for hashing the rows of trace segment LDEs.
Source§

type VC = V

The vector commitment scheme used for commiting to the trace.

Auto Trait Implementations§

§

impl<E, H, V> Freeze for DefaultTraceLde<E, H, V>
where V: Freeze,

§

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

§

impl<E, H, V> Send for DefaultTraceLde<E, H, V>
where V: Send, H: Send,

§

impl<E, H, V> Sync for DefaultTraceLde<E, H, V>
where V: Sync, H: Sync,

§

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

§

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

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

Source§

type Output = T

Should always be Self
Source§

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

Source§

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

Source§

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