Module Tezos_raw_protocol_alpha.Cycle_storage

This module hosts cycle functions which depend on the context.

val current : Raw_context.t -> Cycle_repr.t

Current cycle, that is, the cycle of the current level.

val oldest_cycle_with_sampling_data : Raw_context.t -> Cycle_repr.t

The oldest cycle on which the context keeps sampling data.

val cycle_to_clear_of_sampling_data : new_cycle:Cycle_repr.t -> Cycle_repr.t option

The cycle whose sampling data should be cleared when new_cycle starts.

Returns None when the computed cycle would be negative: this means there are no cycles that should be cleared when new_cycle starts.

val greatest_unstake_finalizable_cycle : Raw_context.t -> Cycle_repr.t option

Highest cycle whose unstake requests are currently finalizable.

Returns None when the computed cycle would be negative: this means there are no cycles yet whose unstake request can be finalized.