Module zk

Source
Expand description

Defines the traits that must be implemented by zkVMs. A zkVM like Risc0 consists of two components, a “guest” and a “host”. The guest is the zkVM program itself, and the host is the physical machine on which the zkVM is running. Both the guest and the host are required to implement the Zkvm trait, in addition to the specialized ZkvmGuest and ZkvmHost trait which is appropriate to that environment.

For a detailed example showing how to implement these traits, see the risc0 adapter maintained by the Sovereign Labs team.

Structs§

StateTransition
The public output of a SNARK proof in Sovereign, this struct makes a claim that the state of the rollup has transitioned from initial_state_root to final_state_root if and only if the condition validity_condition is satisfied.

Traits§

Matches
A trait expressing that two items of a type are (potentially fuzzy) matches. We need a custom trait instead of relying on PartialEq because we allow fuzzy matches.
ValidityCondition
This trait is implemented on the struct/enum which expresses the validity condition
ValidityConditionChecker
This trait expresses that a type can check a validity condition.
Zkvm
A Zk proof system capable of proving and verifying arbitrary Rust code Must support recursive proofs.
ZkvmGuest
A trait which is accessible from within a zkVM program.
ZkvmHost
A trait implemented by the prover (“host”) of a zkVM program.