package tezos-legacy-store

  1. Overview
  2. Docs
include module type of struct include Tezos_base.Protocol end
type t = Tezos_base.Protocol.t = {
  1. expected_env : env_version;
  2. components : component list;
}
and component = Tezos_base.Protocol.component = {
  1. name : string;
  2. interface : string option;
  3. implementation : string;
}
and env_version = Tezos_base.Protocol.env_version =
  1. | V0
  2. | V1
  3. | V2
  4. | V3
val component_encoding : component Data_encoding.t
val compare_version : env_version -> env_version -> int

compare_version va vb is negative if va is a less recent version than vb, positive if va is a more recent version than vb, zero if they are the same version.

In less precise but more intuitive terms, compare_version va vb <op> 0 is the same truthness as va <op> vb where <op> is any comparison operator.

E.g., compare_version V0 V1 < 0 is true.

val env_version_encoding : env_version Data_encoding.t
val pp_ocaml : Stdlib.Format.formatter -> t -> unit
include Tezos_base.S.HASHABLE with type t := t and type hash := Tezos_crypto.Protocol_hash.t
include Tezos_base.S.T with type t := t
include Tezos_stdlib.Compare.S with type t := t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val (>=) : t -> t -> bool
val (>) : t -> t -> bool
val compare : t -> t -> int
val equal : t -> t -> bool
val max : t -> t -> t
val min : t -> t -> t
val pp : Stdlib.Format.formatter -> t -> unit
val encoding : t Data_encoding.t
val to_bytes : t -> Stdlib.Bytes.t
val of_bytes : Stdlib.Bytes.t -> t option
val hash_raw : Stdlib.Bytes.t -> Tezos_crypto.Protocol_hash.t
val of_bytes_exn : Stdlib.Bytes.t -> t
val bounded_encoding : ?max_size:int -> unit -> t Data_encoding.t
val module_name_of_env_version : env_version -> string

Is a value stored in the local database ?

Read a value in the local database.

val read_raw : global_state -> Tezos_crypto.Protocol_hash.t -> (Stdlib.Bytes.t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

Read a value in the local database (without parsing).

val read_raw_opt : global_state -> Tezos_crypto.Protocol_hash.t -> Stdlib.Bytes.t option Lwt.t

Remove a value from the local database.

OCaml

Innovation. Community. Security.