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
Required Methods§
fn prove(
&self,
sdl_id: HashDigest,
verifiables: &[VerifiableWithDiffs],
context: &VerificationContext,
local_laws_input: &dyn Serialize,
) -> Result<SDLProof, Box<dyn Error + Sync + Send>>
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 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.