package tezos-protocol-012-Psithaca

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error +=
  1. | Invalid_fitness
  2. | Wrong_fitness
  3. | Outdated_fitness
  4. | Locked_round_not_less_than_round of {
    1. round : Round_repr.t;
    2. locked_round : Round_repr.t;
    }
type t
val encoding : t Data_encoding.t
val pp : Stdlib.Format.formatter -> t -> unit
val create : level:Raw_level_repr.t -> locked_round:Round_repr.t option -> predecessor_round:Round_repr.t -> round:Round_repr.t -> (t, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) Stdlib.result
val create_without_locked_round : level:Raw_level_repr.t -> predecessor_round:Round_repr.t -> round:Round_repr.t -> t
val to_raw : t -> bytes list
val from_raw : bytes list -> (t, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) Stdlib.result

Returns the corresponding protocol fitness if the shell fitness has the expected version, given by Constants_repr.fitness_version_number. If the fitness' version is from a previous protocol version, then it raises an "outdated fitness" error. If the fitness version is higher then it raises an "invalid fitness" error.

val round_from_raw : bytes list -> (Round_repr.t, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) Stdlib.result

Returns the round from a raw fitness. If the fitness is from a previous protocol, the returned value will be Round.zero.

val predecessor_round_from_raw : bytes list -> (Round_repr.t, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) Stdlib.result

Returns the predecessor round from a raw fitness. If the fitness is from a previous protocol, the returned value will be Round.zero.

val check_except_locked_round : t -> level:Raw_level_repr.t -> predecessor_round:Round_repr.t -> (unit, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) Stdlib.result

Validate only the part of the fitness for which information are available during begin_application

val check_locked_round : t -> locked_round:Round_repr.t option -> (unit, Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.error Tezos_protocol_environment_012_Psithaca__Environment.Error_monad.trace) Stdlib.result

Validate the locked_round component of the fitness, which could not be validated during begin_application.

val level : t -> Raw_level_repr.t
val round : t -> Round_repr.t
val locked_round : t -> Round_repr.t option
val predecessor_round : t -> Round_repr.t
OCaml

Innovation. Community. Security.