Proving

Trait Proving 

pub trait Proving:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn prove(
        &self,
        sdl_id: HashDigest,
        verifiables: &[VerifiableWithDiffs],
        context: &VerificationContext,
        local_laws_input: &dyn Serialize,
    ) -> Result<SDLProof, Box<dyn Error + Sync + Send>>;

    // 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 Methods§

fn prove( &self, sdl_id: HashDigest, verifiables: &[VerifiableWithDiffs], context: &VerificationContext, local_laws_input: &dyn Serialize, ) -> Result<SDLProof, Box<dyn Error + Sync + Send>>

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

§Parameters
  • sdl_id - 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 Client