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
Required Associated Types§
Required Methods§
fn prove(
&self,
sdl_hash: HashDigest,
verifiables: &[VerifiableWithDiffs],
context: &VerificationContext,
local_laws_input: &[u8],
) -> Result<SDLProof, Self::Error>
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 proveverifiables- verifiable messages related to theStateDiffthat were executed to produce the SDLcontext- verification context providing necessary information for proof generationlocal_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>
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.