Proving

Trait Proving 

pub trait Proving:
    Send
    + Sync
    + 'static {
    type Error: Error + Send + Sync;

    // Required method
    fn prove(
        &self,
        sdl_hash: HashDigest,
        verifiables: &[VerifiableWithDiffs],
        context: &VerificationContext,
        local_laws_input: &[u8],
    ) -> Result<SDLProof, Self::Error>;

    // Provided method
    fn local_laws_vkey(&self) -> Option<HashDigest> { ... }
}
Expand description

§Proof Generation

The Proving trait defines a generic interface for generating zero-knowledge SDLProofs.

See available implementations.

Required Associated Types§

type Error: Error + Send + Sync

Error type that can occur when proving

Required Methods§

fn prove( &self, sdl_hash: HashDigest, verifiables: &[VerifiableWithDiffs], context: &VerificationContext, local_laws_input: &[u8], ) -> Result<SDLProof, Self::Error>

Generate a proof for the SDL specified by sdl_hash, using the verifiables and context.

§Parameters
  • sdl_hash - hash of the SDL to prove
  • verifiables - verifiable messages related to the StateDiff that were executed to produce the SDL
  • context - verification context providing necessary information for proof generation
  • local_laws_input - additional input provided to the local laws program
§Returns

A Result containing either the generated SDLProof or an error.

§Notes

This method is allowed to block the thread with CPU-bound computation, as proof generation is typically a resource-intensive process.

Provided Methods§

fn local_laws_vkey(&self) -> Option<HashDigest>

Return the verification key of the enforced local laws, if configured.

The verification key is a 32 byte hash which needs to be the same as the field on SDLProof.

Implementors§

§

impl Proving for delta_domain_sdk::proving::mock::Client

§

type Error = Error

§

impl Proving for delta_domain_sdk::proving::sp1::Client

§

type Error = Error