Trait ProverServer

Source
pub trait ProverServer: Sealed {
Show 13 methods // Required methods fn prove_keccak( &self, request: &ProveKeccakRequest, ) -> Result<SuccinctReceipt<Unknown>>; fn prove_with_ctx( &self, env: ExecutorEnv<'_>, ctx: &VerifierContext, elf: &[u8], ) -> Result<ProveInfo>; fn prove_session( &self, ctx: &VerifierContext, session: &Session, ) -> Result<ProveInfo>; fn prove_segment( &self, ctx: &VerifierContext, segment: &Segment, ) -> Result<SegmentReceipt>; fn lift( &self, receipt: &SegmentReceipt, ) -> Result<SuccinctReceipt<ReceiptClaim>>; fn join( &self, a: &SuccinctReceipt<ReceiptClaim>, b: &SuccinctReceipt<ReceiptClaim>, ) -> Result<SuccinctReceipt<ReceiptClaim>>; fn union( &self, a: &SuccinctReceipt<Unknown>, b: &SuccinctReceipt<Unknown>, ) -> Result<SuccinctReceipt<UnionClaim>>; fn resolve( &self, conditional: &SuccinctReceipt<ReceiptClaim>, assumption: &SuccinctReceipt<Unknown>, ) -> Result<SuccinctReceipt<ReceiptClaim>>; fn identity_p254( &self, a: &SuccinctReceipt<ReceiptClaim>, ) -> Result<SuccinctReceipt<ReceiptClaim>>; // Provided methods fn prove(&self, env: ExecutorEnv<'_>, elf: &[u8]) -> Result<ProveInfo> { ... } fn composite_to_succinct( &self, receipt: &CompositeReceipt, ) -> Result<SuccinctReceipt<ReceiptClaim>> { ... } fn succinct_to_groth16( &self, receipt: &SuccinctReceipt<ReceiptClaim>, ) -> Result<Groth16Receipt<ReceiptClaim>> { ... } fn compress(&self, opts: &ProverOpts, receipt: &Receipt) -> Result<Receipt> { ... }
}
Available on crate feature prove and non-target_os="zkvm" only.
Expand description

A ProverServer can execute a given ELF binary and produce a ProveInfo which contains a Receipt that can be used to verify correct computation.

Required Methods§

Source

fn prove_keccak( &self, request: &ProveKeccakRequest, ) -> Result<SuccinctReceipt<Unknown>>

Available on crate feature unstable only.

Prove the specified keccak request

Source

fn prove_with_ctx( &self, env: ExecutorEnv<'_>, ctx: &VerifierContext, elf: &[u8], ) -> Result<ProveInfo>

Prove the specified ELF binary using the specified VerifierContext.

Source

fn prove_session( &self, ctx: &VerifierContext, session: &Session, ) -> Result<ProveInfo>

Prove the specified Session.

Source

fn prove_segment( &self, ctx: &VerifierContext, segment: &Segment, ) -> Result<SegmentReceipt>

Prove the specified Segment.

Source

fn lift( &self, receipt: &SegmentReceipt, ) -> Result<SuccinctReceipt<ReceiptClaim>>

Source

fn join( &self, a: &SuccinctReceipt<ReceiptClaim>, b: &SuccinctReceipt<ReceiptClaim>, ) -> Result<SuccinctReceipt<ReceiptClaim>>

Source

fn union( &self, a: &SuccinctReceipt<Unknown>, b: &SuccinctReceipt<Unknown>, ) -> Result<SuccinctReceipt<UnionClaim>>

Source

fn resolve( &self, conditional: &SuccinctReceipt<ReceiptClaim>, assumption: &SuccinctReceipt<Unknown>, ) -> Result<SuccinctReceipt<ReceiptClaim>>

Resolve an assumption from a conditional SuccinctReceipt by providing a SuccinctReceipt proving the validity of the assumption.

Source

fn identity_p254( &self, a: &SuccinctReceipt<ReceiptClaim>, ) -> Result<SuccinctReceipt<ReceiptClaim>>

Convert a SuccinctReceipt with a Poseidon hash function that uses a 254-bit field

Provided Methods§

Source

fn prove(&self, env: ExecutorEnv<'_>, elf: &[u8]) -> Result<ProveInfo>

Prove the specified ELF binary.

Source

fn composite_to_succinct( &self, receipt: &CompositeReceipt, ) -> Result<SuccinctReceipt<ReceiptClaim>>

Compress a CompositeReceipt into a single SuccinctReceipt.

A CompositeReceipt may contain an arbitrary number of receipts assembled into segments and assumptions. Together, these receipts collectively prove a top-level ReceiptClaim. This function compresses all of the constituent receipts of a CompositeReceipt into a single SuccinctReceipt that proves the same top-level claim. It accomplishes this by iterative application of the recursion programs including lift, join, and resolve.

Source

fn succinct_to_groth16( &self, receipt: &SuccinctReceipt<ReceiptClaim>, ) -> Result<Groth16Receipt<ReceiptClaim>>

Compress a SuccinctReceipt into a Groth16Receipt.

Source

fn compress(&self, opts: &ProverOpts, receipt: &Receipt) -> Result<Receipt>

Compress a receipt into one with a smaller representation.

The requested target representation is determined by the ReceiptKind specified on the provided ProverOpts. If the receipt is already at least as compressed as the requested kind, this is a no-op.

Implementors§