Skip to main content

ReferenceDevice

Struct ReferenceDevice 

Source
pub struct ReferenceDevice<SC> { /* private fields */ }

Implementations§

Source§

impl<SC> ReferenceDevice<SC>

Source

pub fn config(&self) -> &SC

Source§

impl<SC> ReferenceDevice<SC>

Source

pub fn new(config: SC) -> Self

Constructs a new ReferenceDevice.

Source§

impl<SC: StarkProtocolConfig> ReferenceDevice<SC>

Source

pub fn params(&self) -> &SystemParams

Trait Implementations§

Source§

impl<SC: Clone> Clone for ReferenceDevice<SC>

Source§

fn clone(&self) -> ReferenceDevice<SC>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<SC: StarkProtocolConfig> DeviceDataTransporter<SC, CpuColMajorBackend<SC>> for ReferenceDevice<SC>

Source§

fn transport_pk_to_device( &self, mpk: &MultiStarkProvingKey<SC>, ) -> DeviceMultiStarkProvingKey<CpuColMajorBackend<SC>>

Transport the proving key to the device, filtering for only the provided air_ids.
Source§

fn transport_matrix_to_device( &self, matrix: &ColMajorMatrix<SC::F>, ) -> ColMajorMatrix<SC::F>

Source§

fn transport_pcs_data_to_device( &self, pcs_data: &StackedPcsData<SC::F, SC::Digest>, ) -> StackedPcsData<SC::F, SC::Digest>

The commitment and prover_data are assumed to have been previously computed from the trace.
Source§

fn transport_matrix_from_device_to_host( &self, matrix: &ColMajorMatrix<SC::F>, ) -> ColMajorMatrix<SC::F>

Transport a device matrix to host. This should only be used for testing / debugging purposes.
Source§

fn transport_committed_trace_data_to_device( &self, committed_trace: &CommittedTraceData<CpuColMajorBackend<SC>>, ) -> CommittedTraceData<PB>

Source§

fn transport_proving_ctx_to_device( &self, ctx: &ProvingContext<CpuColMajorBackend<SC>>, ) -> ProvingContext<PB>

Source§

impl<SC, TS> MultiRapProver<CpuColMajorBackend<SC>, TS> for ReferenceDevice<SC>
where SC: StarkProtocolConfig, SC::EF: TwoAdicField + ExtensionField<SC::F>, TS: FiatShamirTranscript<SC>,

Source§

type Artifacts = Vec<<SC as StarkProtocolConfig>::EF>

The random opening point r where the batch constraint sumcheck reduces to evaluation claims of trace matrices T, T_{rot} at r_{n_T}.

Source§

type PartialProof = (GkrProof<SC>, BatchConstraintProof<SC>)

The partial proof is the proof that the trace matrices satisfy all constraints assuming that certain polynomial opening claims are validated. In other words, it is a proof that reduces the constraint satisfaction claim to certain polynomial opening claims.
Source§

type Error = RefProverError

Source§

fn prove_rap_constraints( &self, transcript: &mut TS, mpk: &DeviceMultiStarkProvingKey<CpuColMajorBackend<SC>>, ctx: &ProvingContext<CpuColMajorBackend<SC>>, _common_main_pcs_data: &StackedPcsData<SC::F, SC::Digest>, ) -> Result<((GkrProof<SC>, BatchConstraintProof<SC>), Vec<SC::EF>), Self::Error>

Source§

impl<SC, TS> OpeningProver<CpuColMajorBackend<SC>, TS> for ReferenceDevice<SC>
where SC: StarkProtocolConfig, SC::F: Ord, SC::EF: TwoAdicField + ExtensionField<SC::F> + Ord, TS: FiatShamirTranscript<SC>,

Source§

type OpeningPoints = Vec<<SC as StarkProtocolConfig>::EF>

The shared vector r where each trace matrix T, T_{rot} is opened at r_{n_T}.

Source§

type OpeningProof = (StackingProof<SC>, WhirProof<SC>)

PCS opening proof on host. This should not be a reference.
Source§

type Error = RefProverError

Computes the opening proof. The common_main_pcs_data is the PcsData for the collection of common main trace matrices. It is owned by the function and may be mutated. The pre_cached_pcs_data_per_commit is the PcsData for the preprocessed and cached trace matrices. These are specified by their PcsData per commitment.
Source§

fn prove_openings( &self, transcript: &mut TS, mpk: &DeviceMultiStarkProvingKey<CpuColMajorBackend<SC>>, ctx: ProvingContext<CpuColMajorBackend<SC>>, common_main_pcs_data: StackedPcsData<SC::F, SC::Digest>, r: Vec<SC::EF>, ) -> Result<(StackingProof<SC>, WhirProof<SC>), Self::Error>

Source§

impl<SC, TS> ProverDevice<CpuColMajorBackend<SC>, TS> for ReferenceDevice<SC>
where SC: StarkProtocolConfig, SC::F: Ord, SC::EF: TwoAdicField + ExtensionField<SC::F> + Ord, TS: FiatShamirTranscript<SC>,

Source§

type Error = RefProverError

Source§

type DeviceCtx = ()

Device-specific context (e.g., CUDA stream). Unit () for CPU devices.
Source§

fn device_ctx(&self) -> &()

Source§

impl<'a, SC: StarkProtocolConfig> StackedReductionProver<'a, CpuColMajorBackend<SC>, ReferenceDevice<SC>> for StackedReductionCpu<'a, SC>
where SC::F: TwoAdicField, SC::EF: TwoAdicField + ExtensionField<SC::F>, CpuColMajorBackend<SC>: ProverBackend<Val = SC::F, Challenge = SC::EF, PcsData = StackedPcsData<SC::F, SC::Digest>, Matrix = ColMajorMatrix<SC::F>>,

Source§

fn new( device: &ReferenceDevice<SC>, stacked_per_commit: Vec<&'a StackedPcsData<SC::F, SC::Digest>>, need_rot_per_commit: Vec<Vec<bool>>, r: &[SC::EF], lambda: SC::EF, ) -> Self

We only provide a view to the stacked PcsData per commitment because the WHIR prover will still use the PLE evaluations of the stacked matrices later. The order of stacked_per_commit is common_main, preprocessed for trace_idx=0 (if any), cached_0 for trace_idx=0, ..., preprocessed for trace_idx=1 (if any), .... Read more
Source§

fn batch_sumcheck_uni_round0_poly(&mut self) -> UnivariatePoly<SC::EF>

Return the s_0 batched polynomial from univariate round 0 of sumcheck.
Source§

fn fold_ple_evals(&mut self, u_0: SC::EF)

Source§

fn batch_sumcheck_poly_eval( &mut self, round: usize, _u_prev: SC::EF, ) -> [SC::EF; 2]

Source§

fn fold_mle_evals(&mut self, round: usize, u_round: SC::EF)

Source§

fn into_stacked_openings(self) -> Vec<Vec<SC::EF>>

Source§

impl<SC: StarkProtocolConfig> TraceCommitter<CpuColMajorBackend<SC>> for ReferenceDevice<SC>
where SC::F: Ord,

Source§

type Error = RefProverError

Source§

fn commit( &self, traces: &[&ColMajorMatrix<SC::F>], ) -> Result<(SC::Digest, StackedPcsData<SC::F, SC::Digest>), Self::Error>

Source§

impl<SC, TS> WhirProver<SC, CpuColMajorBackend<SC>, ReferenceDevice<SC>, TS> for ReferenceDevice<SC>
where SC: StarkProtocolConfig, SC::F: TwoAdicField + Ord, SC::EF: TwoAdicField + ExtensionField<SC::F> + Ord, TS: FiatShamirTranscript<SC>,

Source§

type Error = WhirProverError

Source§

fn prove_whir( &self, transcript: &mut TS, common_main_pcs_data: StackedPcsData<SC::F, SC::Digest>, pre_cached_pcs_data_per_commit: Vec<Arc<StackedPcsData<SC::F, SC::Digest>>>, u_cube: &[SC::EF], ) -> Result<WhirProof<SC>, WhirProverError>

Prove the WHIR protocol for a collection of MLE polynomials \hat{q}_j, each in n variables, at a single vector u \in \Fext^n. Read more

Auto Trait Implementations§

§

impl<SC> Freeze for ReferenceDevice<SC>
where SC: Freeze,

§

impl<SC> RefUnwindSafe for ReferenceDevice<SC>
where SC: RefUnwindSafe,

§

impl<SC> Send for ReferenceDevice<SC>
where SC: Send,

§

impl<SC> Sync for ReferenceDevice<SC>
where SC: Sync,

§

impl<SC> Unpin for ReferenceDevice<SC>
where SC: Unpin,

§

impl<SC> UnsafeUnpin for ReferenceDevice<SC>
where SC: UnsafeUnpin,

§

impl<SC> UnwindSafe for ReferenceDevice<SC>
where SC: UnwindSafe,

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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