pub struct CpuDevice<SC> { /* private fields */ }Expand description
Row-major CPU prover device.
Implementations§
Source§impl<SC: StarkProtocolConfig> CpuDevice<SC>
impl<SC: StarkProtocolConfig> CpuDevice<SC>
pub fn params(&self) -> &SystemParams
Trait Implementations§
Source§impl<SC: StarkProtocolConfig> DeviceDataTransporter<SC, CpuBackend<SC>> for CpuDevice<SC>
impl<SC: StarkProtocolConfig> DeviceDataTransporter<SC, CpuBackend<SC>> for CpuDevice<SC>
Source§fn transport_pk_to_device(
&self,
mpk: &MultiStarkProvingKey<SC>,
) -> DeviceMultiStarkProvingKey<CpuBackend<SC>>
fn transport_pk_to_device( &self, mpk: &MultiStarkProvingKey<SC>, ) -> DeviceMultiStarkProvingKey<CpuBackend<SC>>
Transport the proving key to the device, filtering for only the provided
air_ids.fn transport_matrix_to_device( &self, matrix: &ColMajorMatrix<SC::F>, ) -> RowMajorMatrix<SC::F>
Source§fn transport_pcs_data_to_device(
&self,
pcs_data: &StackedPcsData<SC::F, SC::Digest>,
) -> CpuStackedPcsData<SC::F, SC::Digest>
fn transport_pcs_data_to_device( &self, pcs_data: &StackedPcsData<SC::F, SC::Digest>, ) -> CpuStackedPcsData<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: &RowMajorMatrix<SC::F>,
) -> ColMajorMatrix<SC::F>
fn transport_matrix_from_device_to_host( &self, matrix: &RowMajorMatrix<SC::F>, ) -> ColMajorMatrix<SC::F>
Transport a device matrix to host. This should only be used for testing / debugging
purposes.
fn transport_committed_trace_data_to_device( &self, committed_trace: &CommittedTraceData<CpuColMajorBackend<SC>>, ) -> CommittedTraceData<PB>
fn transport_proving_ctx_to_device( &self, ctx: &ProvingContext<CpuColMajorBackend<SC>>, ) -> ProvingContext<PB>
Source§impl<SC, TS> MultiRapProver<CpuBackend<SC>, TS> for CpuDevice<SC>where
SC: StarkProtocolConfig,
SC::EF: TwoAdicField + ExtensionField<SC::F>,
TS: FiatShamirTranscript<SC>,
impl<SC, TS> MultiRapProver<CpuBackend<SC>, TS> for CpuDevice<SC>where
SC: StarkProtocolConfig,
SC::EF: TwoAdicField + ExtensionField<SC::F>,
TS: FiatShamirTranscript<SC>,
Source§type PartialProof = (GkrProof<SC>, BatchConstraintProof<SC>)
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 Artifacts = Vec<<SC as StarkProtocolConfig>::EF>
type Artifacts = Vec<<SC as StarkProtocolConfig>::EF>
Other artifacts of the proof (e.g., sampled randomness) that may be passed to later stages
of the protocol.
type Error = CpuProverError
fn prove_rap_constraints( &self, transcript: &mut TS, mpk: &DeviceMultiStarkProvingKey<CpuBackend<SC>>, ctx: &ProvingContext<CpuBackend<SC>>, _common_main_pcs_data: &CpuStackedPcsData<SC::F, SC::Digest>, ) -> Result<((GkrProof<SC>, BatchConstraintProof<SC>), Vec<SC::EF>), Self::Error>
Source§impl<SC, TS> OpeningProver<CpuBackend<SC>, TS> for CpuDevice<SC>where
SC: StarkProtocolConfig,
SC::F: Ord,
SC::EF: TwoAdicField + ExtensionField<SC::F> + Ord,
TS: FiatShamirTranscript<SC>,
impl<SC, TS> OpeningProver<CpuBackend<SC>, TS> for CpuDevice<SC>where
SC: StarkProtocolConfig,
SC::F: Ord,
SC::EF: TwoAdicField + ExtensionField<SC::F> + Ord,
TS: FiatShamirTranscript<SC>,
Source§type OpeningProof = (StackingProof<SC>, WhirProof<SC>)
type OpeningProof = (StackingProof<SC>, WhirProof<SC>)
PCS opening proof on host. This should not be a reference.
type OpeningPoints = Vec<<SC as StarkProtocolConfig>::EF>
Source§type Error = CpuProverError
type Error = CpuProverError
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.fn prove_openings( &self, transcript: &mut TS, mpk: &DeviceMultiStarkProvingKey<CpuBackend<SC>>, ctx: ProvingContext<CpuBackend<SC>>, common_main_pcs_data: CpuStackedPcsData<SC::F, SC::Digest>, r: Vec<SC::EF>, ) -> Result<(StackingProof<SC>, WhirProof<SC>), Self::Error>
Source§impl<SC, TS> ProverDevice<CpuBackend<SC>, TS> for CpuDevice<SC>where
SC: StarkProtocolConfig,
SC::F: Ord,
SC::EF: TwoAdicField + ExtensionField<SC::F> + Ord,
TS: FiatShamirTranscript<SC>,
impl<SC, TS> ProverDevice<CpuBackend<SC>, TS> for CpuDevice<SC>where
SC: StarkProtocolConfig,
SC::F: Ord,
SC::EF: TwoAdicField + ExtensionField<SC::F> + Ord,
TS: FiatShamirTranscript<SC>,
Auto Trait Implementations§
impl<SC> Freeze for CpuDevice<SC>where
SC: Freeze,
impl<SC> RefUnwindSafe for CpuDevice<SC>where
SC: RefUnwindSafe,
impl<SC> Send for CpuDevice<SC>where
SC: Send,
impl<SC> Sync for CpuDevice<SC>where
SC: Sync,
impl<SC> Unpin for CpuDevice<SC>where
SC: Unpin,
impl<SC> UnsafeUnpin for CpuDevice<SC>where
SC: UnsafeUnpin,
impl<SC> UnwindSafe for CpuDevice<SC>where
SC: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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