openvm_stark_backend::prover::hal

Trait ProverBackend

Source
pub trait ProverBackend {
    type Val: Copy + Send + Sync + Serialize + DeserializeOwned;
    type Challenge: Copy + Send + Sync + Serialize + DeserializeOwned;
    type OpeningProof: Clone + Send + Sync + Serialize + DeserializeOwned;
    type RapPartialProof: Clone + Send + Sync + Serialize + DeserializeOwned;
    type Commitment: Clone + Send + Sync + Serialize + DeserializeOwned;
    type Challenger: CanObserve<Self::Val> + CanObserve<Self::Commitment>;
    type Matrix: MatrixDimensions + Send + Sync;
    type PcsData: Send + Sync;
    type RapPartialProvingKey: Send + Sync;

    const CHALLENGE_EXT_DEGREE: u8;
}
Expand description

Associated types needed by the prover, in the form of buffers and views, specific to a specific hardware backend.

Memory allocation and copying is not handled by this trait.

Required Associated Constants§

Source

const CHALLENGE_EXT_DEGREE: u8

Extension field degree for the challenge field Self::Challenge over base field Self::Val.

Required Associated Types§

Source

type Val: Copy + Send + Sync + Serialize + DeserializeOwned

Base field type, on host.

Source

type Challenge: Copy + Send + Sync + Serialize + DeserializeOwned

Challenge field (extension field of base field), on host.

Source

type OpeningProof: Clone + Send + Sync + Serialize + DeserializeOwned

PCS opening proof on host (see OpeningProver). This should not be a reference.

Source

type RapPartialProof: Clone + Send + Sync + Serialize + DeserializeOwned

Partial proof for multiple RAPs

Source

type Commitment: Clone + Send + Sync + Serialize + DeserializeOwned

Single commitment on host.

Source

type Challenger: CanObserve<Self::Val> + CanObserve<Self::Commitment>

Challenger to observe commitments. Sampling is left to other trait implementations. We anticipate that the challenger largely operates on the host.

Source

type Matrix: MatrixDimensions + Send + Sync

Single matrix buffer on device together with dimension metadata. Owning this means nothing else has a shared reference to the buffer.

Source

type PcsData: Send + Sync

Owned buffer for the preimage of a PCS commitment on device, together with any metadata necessary for computing opening proofs.

For example, multiple buffers for LDE matrices, their trace domain sizes, and pointer to mixed merkle tree.

Source

type RapPartialProvingKey: Send + Sync

Part of proving key for a single RAP specific for the RAP challenge phases

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<SC: StarkGenericConfig> ProverBackend for CpuBackend<SC>

Source§

const CHALLENGE_EXT_DEGREE: u8 = _

Source§

type Val = <<<SC as StarkGenericConfig>::Pcs as Pcs<<SC as StarkGenericConfig>::Challenge, <SC as StarkGenericConfig>::Challenger>>::Domain as PolynomialSpace>::Val

Source§

type Challenge = <SC as StarkGenericConfig>::Challenge

Source§

type OpeningProof = OpeningProof<<<SC as StarkGenericConfig>::Pcs as Pcs<<SC as StarkGenericConfig>::Challenge, <SC as StarkGenericConfig>::Challenger>>::Proof, <SC as StarkGenericConfig>::Challenge>

Source§

type RapPartialProof = Option<<<SC as StarkGenericConfig>::RapPhaseSeq as RapPhaseSeq<<<<SC as StarkGenericConfig>::Pcs as Pcs<<SC as StarkGenericConfig>::Challenge, <SC as StarkGenericConfig>::Challenger>>::Domain as PolynomialSpace>::Val, <SC as StarkGenericConfig>::Challenge, <SC as StarkGenericConfig>::Challenger>>::PartialProof>

Source§

type Commitment = <<SC as StarkGenericConfig>::Pcs as Pcs<<SC as StarkGenericConfig>::Challenge, <SC as StarkGenericConfig>::Challenger>>::Commitment

Source§

type Challenger = <SC as StarkGenericConfig>::Challenger

Source§

type Matrix = Arc<DenseMatrix<<<<SC as StarkGenericConfig>::Pcs as Pcs<<SC as StarkGenericConfig>::Challenge, <SC as StarkGenericConfig>::Challenger>>::Domain as PolynomialSpace>::Val>>

Source§

type PcsData = PcsData<SC>

Source§

type RapPartialProvingKey = <<SC as StarkGenericConfig>::RapPhaseSeq as RapPhaseSeq<<<<SC as StarkGenericConfig>::Pcs as Pcs<<SC as StarkGenericConfig>::Challenge, <SC as StarkGenericConfig>::Challenger>>::Domain as PolynomialSpace>::Val, <SC as StarkGenericConfig>::Challenge, <SC as StarkGenericConfig>::Challenger>>::PartialProvingKey