Module Mavryk_shell_services.History_mode

History modes for the chain history storage

History modes allow a node to require less disk storage. Indeed, depending on the chosen history mode, some parts of the complete chain history can be deleted as they are not required anymore. Three history modes are provided:

type additional_cycles = {
  1. offset : int;
}

The type for defining the number of additional cycles to preserve.

type t =
  1. | Archive
  2. | Full of additional_cycles option
  3. | Rolling of additional_cycles option

The type for defining an history mode.

val default_additional_cycles : additional_cycles

The default value for the number of additional cycles to preserve.

val default_full : t

The default full history mode value. Based on default_additional_cycles.

val default_rolling : t

The default rolling history mode value. Based on default_additional_cycles.

val default : t

The default history mode value.

val encoding : t Mavryk_base.TzPervasives.Data_encoding.t
val equal : t -> t -> bool

Returns true if the modes and the number of additional cycles are equal.

val mode_equality : t -> t -> bool

Returns true if the modes are equal. The number of additional cycles are not checked.

val pp : Stdlib.Format.formatter -> t -> unit
val pp_short : Stdlib.Format.formatter -> t -> unit
module Legacy : sig ... end

The module for handling legacy history modes. It is only used for legacy support, see Mavryk_store.Legacy and Mavryk_store.Snapshots.

val convert : Legacy.t -> t

convert legacy returns the history mode of a given legacy history mode, using the default offset values.