package octez-l2-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Module for generating and verifying proofs for a context

Parameters

module Hash : sig ... end
module Proof_encoding : sig ... end

Signature

module Tree : Tezos_context_sigs.Context.TREE with type key = string list and type value = bytes and type t = rw_index and type tree = tree

Tree representation for proof generation.

type tree = Tree.tree
type proof

See Sc_rollup_PVM_sem.proof

val hash_tree : tree -> Hash.t

See Sc_rollup_PVM_sem.proof_encoding

val proof_before : proof -> Hash.t

proof_before proof is the hash of the state before the step that generated rpoof.

val proof_after : proof -> Hash.t

proof_after proof is the hash of the state after the step that generated rpoof.

val produce_proof : rw_index -> tree -> (tree -> (tree * 'a) Lwt.t) -> (proof * 'a) option Lwt.t

produce_proof ctxt tree f produces and returns a proof for the execution of f on the state tree.

val verify_proof : proof -> (tree -> (tree * 'a) Lwt.t) -> (tree * 'a) option Lwt.t

verify_proof proof f verifies that f produces the proof proof and returns the resulting tree, or None if the proof cannot be verified.

OCaml

Innovation. Community. Security.