package tezos-protocol-010-PtGRANAD

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

See Lazy_storage_kind for an introduction on lazy storage.

This module defines operations on lazy storage types and diffs.

type ('id, 'alloc) init =
  1. | Existing
  2. | Copy of {
    1. src : 'id;
    }
  3. | Alloc of 'alloc
type ('id, 'alloc, 'updates) diff =
  1. | Remove
  2. | Update of {
    1. init : ('id, 'alloc) init;
    2. updates : 'updates;
    }
type diffs_item = private
  1. | Item : ('i, 'a, 'u) Lazy_storage_kind.t * 'i * ('i, 'a, 'u) diff -> diffs_item
val make : ('i, 'a, 'u) Lazy_storage_kind.t -> 'i -> ('i, 'a, 'u) diff -> diffs_item
type diffs = diffs_item list
val encoding : diffs Data_encoding.t
val apply : Raw_context.t -> diffs -> (Raw_context.t * Z.t, Tezos_protocol_environment_010_PtGRANAD__Environment.Error_monad.error Tezos_protocol_environment_010_PtGRANAD__Environment.Error_monad.trace) Stdlib.result Lwt.t

The returned Z.t is the size added by the application of the diffs.

val fresh : ('id, _, _) Lazy_storage_kind.t -> temporary:bool -> Raw_context.t -> (Raw_context.t * 'id, Tezos_protocol_environment_010_PtGRANAD__Environment.Error_monad.error Tezos_protocol_environment_010_PtGRANAD__Environment.Error_monad.trace) Stdlib.result Lwt.t
val init : Raw_context.t -> (Raw_context.t, Tezos_protocol_environment_010_PtGRANAD__Environment.Error_monad.error Tezos_protocol_environment_010_PtGRANAD__Environment.Error_monad.trace) Stdlib.result Lwt.t

Initializes the storage for all lazy storage kind. This is useful for genesis only. Protocol updates need to initialize new lazy storage kinds.

val cleanup_temporaries : Raw_context.t -> Raw_context.t Lwt.t
val cleanup_edo_florence_dangling_lazy_storage : Raw_context.t -> Raw_context.t Lwt.t
OCaml

Innovation. Community. Security.