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§
Sourceconst CHALLENGE_EXT_DEGREE: u8
const CHALLENGE_EXT_DEGREE: u8
Extension field degree for the challenge field Self::Challenge
over base field Self::Val
.
Required Associated Types§
Sourcetype Challenge: Copy + Send + Sync + Serialize + DeserializeOwned
type Challenge: Copy + Send + Sync + Serialize + DeserializeOwned
Challenge field (extension field of base field), on host.
Sourcetype OpeningProof: Clone + Send + Sync + Serialize + DeserializeOwned
type OpeningProof: Clone + Send + Sync + Serialize + DeserializeOwned
PCS opening proof on host (see OpeningProver). This should not be a reference.
Sourcetype RapPartialProof: Clone + Send + Sync + Serialize + DeserializeOwned
type RapPartialProof: Clone + Send + Sync + Serialize + DeserializeOwned
Partial proof for multiple RAPs
Sourcetype Commitment: Clone + Send + Sync + Serialize + DeserializeOwned
type Commitment: Clone + Send + Sync + Serialize + DeserializeOwned
Single commitment on host.
Sourcetype Challenger: CanObserve<Self::Val> + CanObserve<Self::Commitment>
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.
Sourcetype Matrix: MatrixDimensions + Send + Sync
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.
Sourcetype PcsData: Send + Sync
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.
Sourcetype RapPartialProvingKey: Send + Sync
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.