pub struct AirContext<B>where
    B: StarkField,
{ /* private fields */ }
Expand description

STARK parameters and trace properties for a specific execution of a computation.

Implementations

Returns a new instance of AirContext instantiated for computations which require a single execution trace segment.

The list of transition constraint degrees defines the total number of transition constraints and their expected degrees. Constraint evaluations computed by Air::evaluate_transition() function are expected to be in the order defined by this list.

Panics

Panics if

  • transition_constraint_degrees is an empty vector.
  • num_assertions is zero.
  • Blowup factor specified by the provided options is too small to accommodate degrees of the specified transition constraints.
  • trace_info describes a multi-segment execution trace.

Returns a new instance of AirContext instantiated for computations which require multiple execution trace segments.

The lists of transition constraint degrees defines the total number of transition constraints and their expected degrees. Constraint evaluations computed by Air::evaluate_transition() function are expected to be in the order defined by main_transition_constraint_degrees list. Constraint evaluations computed by Air::evaluate_aux_transition() function are expected to be in the order defined by aux_transition_constraint_degrees list.

Panics

Panics if

  • main_transition_constraint_degrees is an empty vector.
  • num_main_assertions is zero.
  • trace_info.is_multi_segment() == true but:
    • aux_transition_constraint_degrees is an empty vector.
    • num_aux_assertions is zero.
  • trace_info.is_multi_segment() == false but:
    • aux_transition_constraint_degrees is a non-empty vector.
    • num_aux_assertions is greater than zero.
  • Blowup factor specified by the provided options is too small to accommodate degrees of the specified transition constraints.

Returns length of the execution trace for an instance of a computation.

Returns degree of trace polynomials for an instance of a computation.

The degree is always trace_length - 1.

Returns size of the constraint evaluation domain.

This is guaranteed to be a power of two, and is equal to trace_length * ce_blowup_factor.

Returns the degree to which all constraint polynomials are normalized before they are composed together.

This degree is always ce_domain_size - 1.

Returns the size of the low-degree extension domain.

This is guaranteed to be a power of two, and is equal to trace_length * lde_blowup_factor.

Returns the number of transition constraints for a computation.

The number of transition constraints is defined by the total number of transition constraint degree descriptors (for both the main and the auxiliary trace constraints). This number is used to determine how many transition constraint coefficients need to be generated for merging transition constraints into a composition polynomial.

Returns the number of transition constraints placed against the main trace segment.

Returns the number of transition constraints placed against all auxiliary trace segments.

Returns the total number of assertions defined for a computation.

The number of assertions consists of the assertions placed against the main segment of an execution trace as well as assertions placed against all auxiliary trace segments.

Returns the number of rows at the end of an execution trace to which transition constraints do not apply.

This is guaranteed to be at least 1 (which is the default value), but could be greater. The maximum number of exemptions is determined by a combination of transition constraint degrees and blowup factor specified for the computation.

Sets the number of transition exemptions for this context.

Panics

Panics if:

  • The number of exemptions is zero.
  • The number of exemptions exceeds half of the trace length.
  • Given the combination of transition constraints degrees and the blowup factor in this context, the number of exemptions is too larger for a valid computation of the constraint composition polynomial.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.