package tezos-protocol-008-PtEdoTez

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = private {
  1. level : Raw_level_repr.t;
    (*

    The level of the block relative to genesis. This is also the Shell's notion of level.

    *)
  2. level_position : int32;
    (*

    The level of the block relative to the block that started the first version of protocol alpha.

    *)
  3. cycle : Cycle_repr.t;
    (*

    The current cycle's number. Note that cycles are a protocol-specific notion. As a result, the cycle number starts at 0 with the first block of the first version of protocol alpha.

    *)
  4. cycle_position : int32;
    (*

    The current level of the block relative to the first block of the current cycle.

    *)
  5. expected_commitment : bool;
}
type level = t
val (=) : level -> level -> bool
val (<>) : level -> level -> bool
val (<) : level -> level -> bool
val (<=) : level -> level -> bool
val (>=) : level -> level -> bool
val (>) : level -> level -> bool
val compare : level -> level -> int
val equal : level -> level -> bool
val max : level -> level -> level
val min : level -> level -> level
val encoding : level Data_encoding.t
val pp : Stdlib.Format.formatter -> level -> unit
val pp_full : Stdlib.Format.formatter -> level -> unit
val root_level : Raw_level_repr.t -> level
val level_from_raw : first_level:Raw_level_repr.t -> blocks_per_cycle:int32 -> blocks_per_commitment:int32 -> Raw_level_repr.t -> level
val diff : level -> level -> int32
type compat_t = {
  1. level : Raw_level_repr.t;
  2. level_position : int32;
  3. cycle : Cycle_repr.t;
  4. cycle_position : int32;
  5. voting_period : int32;
  6. voting_period_position : int32;
  7. expected_commitment : bool;
}

Compatibility module with Level_repr.t from protocol 007. In this version, the voting_period and voting_period_position fields are deprecated and replaced by a new RPC endpoint at Voting_services.voting_period

val compat_encoding : compat_t Data_encoding.t
val to_deprecated_type : t -> voting_period_index:int32 -> voting_period_position:int32 -> compat_t
OCaml

Innovation. Community. Security.