package tezos-protocol-alpha

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

Datatype for a map from cycle to deposits, where all unslashable cycles are squashed.

Expected to be used for a small number of cycles at a time, typically bounded by preserved_cycles + max_slashing_period plus a small constant.

type t

Storable version.

type squashed = private {
  1. unslashable_cycle : Cycle_repr.t option;
  2. t : t;
}

To be used locally, do not preserve values of this type over cycles.

val empty : unslashable_cycle:Cycle_repr.t option -> squashed
val squash_unslashable : unslashable_cycle:Cycle_repr.t option -> t -> squashed Tezos_protocol_environment_alpha.Error_monad.tzresult

Once read, t must be converted to squashed with squash_unslashable to be used efficiently. For a given unslashable_cycle, squash_unslashable ~unslashable_cycle is idempotent.

OCaml

Innovation. Community. Security.