Skip to main content

prove

Function prove 

Source
pub async fn prove(
    program: &Program,
    stack_inputs: StackInputs,
    advice_inputs: AdviceInputs,
    host: &mut impl Host,
    execution_options: ExecutionOptions,
    proving_options: ProvingOptions,
) -> Result<(StackOutputs, ExecutionProof), ExecutionError>
Expand description

Executes and proves the specified program and returns the result together with a STARK-based proof of the program’s execution.

  • stack_inputs specifies the initial state of the stack for the VM.
  • advice_inputs provides the initial nondeterministic inputs for the VM.
  • host specifies the host environment which contain non-deterministic (secret) inputs for the prover.
  • execution_options defines VM execution parameters such as cycle limits and fragmentation.
  • proving_options defines parameters for STARK proof generation.

§Errors

Returns an error if program execution or STARK proof generation fails for any reason.