package octez-shell-libs
Module Protocol_levels
represents an associative map of protocol levels to corresponding blocks which supposedly activate new protocols, that is to say blocks that acknowledge a protocol change in the next block.
include Tezos_base.TzPervasives.Map.S with type key = int
val empty : 'a t
val is_empty : 'a t -> bool
val cardinal : 'a t -> int
val iter_ep :
(key -> 'a -> (unit, 'error Tezos_error_monad.TzTrace.trace) result Lwt.t) ->
'a t ->
(unit, 'error Tezos_error_monad.TzTrace.trace) result Lwt.t
type protocol_info = {
protocol : Tezos_base.TzPervasives.Protocol_hash.t;
activation_block : block_descriptor;
expect_predecessor_context : bool;
}
The type for protocol info.
expect_predecessor_context
is a flag which reflects what is referenced by the context hash of a block, depending on its protocol. If the flag is true, the block contains the predecessors context (context before the application of the block). Otherwise, it contains the resulting context hash of the application of the block. An activation block refers to a block which activated a new protocol N+1
. Thus, the block header related to that activation block will have a protocol level which differs from its predecessor. As this block aims to activate a new protocol, the next_protocol
and protocol
fields from the metadata differs: next_protocol
refers to the hash of the activated protocol. As a consequence, this block handled by protocol N
and is the last block of that protocol.
val equal : protocol_info t -> protocol_info t -> bool
Equality on protocol levels maps.
val encoding : protocol_info t Tezos_base.TzPervasives.Data_encoding.t
Encoding for the protocol level's association map.
module Legacy : sig ... end