Module Tezos_shell_services.History_modeSource

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:

Sourcetype additional_cycles = {
  1. offset : int;
}

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

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

The type for defining an history mode.

Sourceval default_additional_cycles : additional_cycles

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

Sourceval default_full : t

The default full history mode value. Based on default_additional_cycles.

Sourceval default_rolling : t

The default rolling history mode value. Based on default_additional_cycles.

Sourceval default : t

The default history mode value.

Sourceval encoding : t Tezos_base.TzPervasives.Data_encoding.t
Sourceval equal : t -> t -> bool

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

Sourceval mode_equality : t -> t -> bool

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

Sourceval pp : Format.formatter -> t -> unit
Sourceval pp_short : Format.formatter -> t -> unit
Sourceval tag : t Tezos_base.TzPervasives.Tag.def
Sourcemodule Legacy : sig ... end

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

Sourceval convert : Legacy.t -> t

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