package tezos-protocol-017-PtNairob

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

This module re-exports definitions from Level_repr and Level_storage.

type t = private {
  1. level : Raw_level.t;
  2. level_position : int32;
  3. cycle : Cycle.t;
  4. cycle_position : int32;
  5. expected_commitment : bool;
}
include BASIC_DATA with type t := t
include Tezos_protocol_environment_017_PtNairob.Compare.S with type t := t
val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val (>=) : t -> t -> bool
val (>) : t -> t -> bool
val compare : t -> t -> int
val equal : t -> t -> bool
val max : t -> t -> t
val min : t -> t -> t
type level = t
val root : context -> level
val succ : context -> level -> level
val pred : context -> level -> level option
val from_raw : context -> Raw_level.t -> level

Fails with Negative_level_and_offset_sum if the sum of the raw_level and the offset is negative.

val add : context -> level -> int -> level

add c level i i must be positive

val sub : context -> level -> int -> level option

sub c level i i must be positive

val diff : level -> level -> int32
val current : context -> level
val last_level_in_cycle : context -> Cycle.t -> level
val levels_in_cycle : context -> Cycle.t -> level list
val levels_in_current_cycle : context -> ?offset:int32 -> unit -> level list
val last_allowed_fork_level : context -> Raw_level.t
val dawn_of_a_new_cycle : context -> Cycle.t option
val may_snapshot_stake_distribution : context -> bool
val may_compute_randao : context -> bool
OCaml

Innovation. Community. Security.