pub trait InferenceProofSystem {
type Proof;
// Required methods
fn prove<M: CommittableModel + ?Sized>(
&self,
model: &M,
input: &[f64],
nonce: u64,
) -> Self::Proof;
fn verify(
&self,
proof: &Self::Proof,
expected: &InferenceAttestation,
) -> bool;
}Expand description
Seam for pluggable inference-proof backends. The reference implementation
(ReexecutionProofSystem) proves by deterministic re-execution; a future
implementation can produce a succinct zk-SNARK over the same attestation
without changing VerifiedBond.
Required Associated Types§
Required Methods§
Sourcefn prove<M: CommittableModel + ?Sized>(
&self,
model: &M,
input: &[f64],
nonce: u64,
) -> Self::Proof
fn prove<M: CommittableModel + ?Sized>( &self, model: &M, input: &[f64], nonce: u64, ) -> Self::Proof
Produce a proof that model yields its inference on input.
Sourcefn verify(&self, proof: &Self::Proof, expected: &InferenceAttestation) -> bool
fn verify(&self, proof: &Self::Proof, expected: &InferenceAttestation) -> bool
Verify a proof binds to expected.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".