Skip to main content

InferenceProofSystem

Trait InferenceProofSystem 

Source
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§

Source

type Proof

Opaque proof artefact.

Required Methods§

Source

fn prove<M: CommittableModel + ?Sized>( &self, model: &M, input: &[f64], nonce: u64, ) -> Self::Proof

Produce a proof that model yields its inference on input.

Source

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".

Implementors§