Module Store_v2.Protocols

type level =
  1. | First_known of int32
  2. | Activation_level of int32
type proto_info = {
  1. level : level;
    (*

    The level at which we have seen the protocol for the first time, either because we saw its activation or because the first block we saw (at the origination of the rollup) was from this protocol.

    *)
  2. proto_level : int;
    (*

    The protocol level, i.e. its number in the sequence of protocol activations on the chain.

    *)
  3. protocol : Mavryk_base.TzPervasives.Protocol_hash.t;
    (*

    The protocol this information concerns.

    *)
}

Each element of this type represents information we have about a Mavryk protocol regarding its activation.

val proto_info_encoding : proto_info Mavryk_base.TzPervasives.Data_encoding.t
include Mavryk_layer2_store.Indexed_store.SINGLETON_STORE with type value = proto_info list
type +'a t

The type of the singleton store.

type value = proto_info list

The type of values stored in this singleton store.

Load (or initializes) a singleton store in the file path.

val read : [> `Read ] t -> value option Mavryk_base.TzPervasives.tzresult Lwt.t

Reads the current value from the disk. Returns None if the file does not exist.

val write : [> `Write ] t -> value -> unit Mavryk_base.TzPervasives.tzresult Lwt.t

Write the value to disk.

val delete : [> `Write ] t -> unit Mavryk_base.TzPervasives.tzresult Lwt.t

Deletes the value from the disk.

val readonly : [> `Read ] t -> [ `Read ] t

readonly t returns a read only version of the store t.