Function winter_verifier::verify

source ·
pub fn verify<AIR: Air>(
    proof: StarkProof,
    pub_inputs: AIR::PublicInputs
) -> Result<(), VerifierError>
Expand description

Verifies that the specified computation was executed correctly against the specified inputs.

Specifically, for a computation specified by AIR type parameter, verifies that the provided proof attests to the correct execution of the computation against public inputs specified by pub_inputs. If the verification is successful, Ok(()) is returned.

Errors

Returns an error if combination of the provided proof and public inputs does not attest to a correct execution of the computation. This could happen for many various reasons, including:

  • The specified proof was generated for a different computation.
  • The specified proof was generated for this computation but for different public inputs.