pub struct StarkDomain<B: StarkField> { /* private fields */ }

Implementations§

source§

impl<B: StarkField> StarkDomain<B>

source

pub fn new<A: Air<BaseField = B>>(air: &A) -> Self

Returns a new STARK domain initialized with the provided context.

source

pub fn from_twiddles( trace_twiddles: Vec<B>, blowup_factor: usize, domain_offset: B ) -> Self

Returns a new STARK domain initialized with the provided custom inputs.

source

pub fn trace_length(&self) -> usize

Returns length of the execution trace for this computation.

source

pub fn trace_twiddles(&self) -> &[B]

Returns twiddles which can be used to evaluate trace polynomials.

source

pub fn trace_to_ce_blowup(&self) -> usize

Returns blowup factor from trace to constraint evaluation domain.

source

pub fn trace_to_lde_blowup(&self) -> usize

Returns blowup factor from trace to LDE domain.

source

pub fn ce_domain_size(&self) -> usize

Returns the size of the constraint evaluation domain for this computation.

source

pub fn ce_domain_generator(&self) -> B

Returns the generator of constraint evaluation domain.

source

pub fn ce_to_lde_blowup(&self) -> usize

Returns blowup factor from constraint evaluation to LDE domain.

source

pub fn get_ce_x_at(&self, step: usize) -> B

Returns s * g^step where g is the constraint evaluation domain generator and s is the domain offset.

source

pub fn get_ce_x_power_at(&self, step: usize, power: u64, offset_exp: B) -> B

Returns (s * g^step)^power where g is the constraint evaluation domain generator and s is the domain offset.

The computation is performed without doing exponentiations. offset_exp is assumed to be s^power which is pre-computed elsewhere.

source

pub fn lde_domain_size(&self) -> usize

Returns the size of the low-degree extension domain.

source

pub fn offset(&self) -> B

Returns LDE domain offset.

Auto Trait Implementations§

§

impl<B> RefUnwindSafe for StarkDomain<B>where B: RefUnwindSafe,

§

impl<B> Send for StarkDomain<B>

§

impl<B> Sync for StarkDomain<B>

§

impl<B> Unpin for StarkDomain<B>where B: Unpin,

§

impl<B> UnwindSafe for StarkDomain<B>where B: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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, U> Into<U> for Twhere 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.