Mavryk_raw_protocol_alpha.Voting_period_reprThe voting period kinds are ordered as follows: Proposal -> Exploration -> Cooldown -> Promotion -> Adoption. This order is the one used be the function succ below.
val kind_encoding : kind Mavryk_protocol_environment_alpha.Data_encoding.ttype voting_period = {index : Mavryk_protocol_environment_alpha.Int32.t;kind : kind;start_position : Mavryk_protocol_environment_alpha.Int32.t;}A voting period can be of several kinds and is uniquely identified by the counter 'index'. The 'start_position' represents the relative position of the first level of the period with respect to the first level of the Alpha family of protocols.
type t = voting_periodtype info = {voting_period : t;position : Mavryk_protocol_environment_alpha.Int32.t;remaining : Mavryk_protocol_environment_alpha.Int32.t;}Information about a block with respect to the voting period it belongs to: the voting period, the position within the voting period and the number of remaining blocks till the end of the period. The following invariant is satisfied: `position + remaining + 1 = blocks_per_voting_period`
val root : start_position:Mavryk_protocol_environment_alpha.Int32.t -> tinclude Mavryk_protocol_environment_alpha.Compare.S
with type t := voting_periodval (=) : voting_period -> voting_period -> boolval (<>) : voting_period -> voting_period -> boolval (<) : voting_period -> voting_period -> boolval (<=) : voting_period -> voting_period -> boolval (>=) : voting_period -> voting_period -> boolval (>) : voting_period -> voting_period -> boolval compare : voting_period -> voting_period -> intval equal : voting_period -> voting_period -> boolval max : voting_period -> voting_period -> voting_periodval min : voting_period -> voting_period -> voting_periodval encoding : t Mavryk_protocol_environment_alpha.Data_encoding.tval info_encoding : info Mavryk_protocol_environment_alpha.Data_encoding.tval pp : Mavryk_protocol_environment_alpha.Format.formatter -> t -> unitval pp_info :
Mavryk_protocol_environment_alpha.Format.formatter ->
info ->
unitval pp_kind :
Mavryk_protocol_environment_alpha.Format.formatter ->
kind ->
unitval raw_reset :
t ->
start_position:Mavryk_protocol_environment_alpha.Int32.t ->
traw_reset period ~start_position increment the index by one and set the kind to Proposal which is the period kind that start the voting process. start_position is the level at wich this voting_period started.
val raw_succ :
t ->
start_position:Mavryk_protocol_environment_alpha.Int32.t ->
traw_succ period ~start_position increment the index by one and set the kind to its successor. start_position is the level at which this voting_period started.
val position_since :
Level_repr.t ->
t ->
Mavryk_protocol_environment_alpha.Int32.tval remaining_blocks :
Level_repr.t ->
t ->
blocks_per_voting_period:Mavryk_protocol_environment_alpha.Int32.t ->
Mavryk_protocol_environment_alpha.Int32.t