Mavryk_raw_protocol_001_PtAtLas.Adaptive_issuance_storageval set_adaptive_issuance_enable :
Raw_context.t ->
Raw_context.t Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tset_adaptive_issuance_enable ctxt sets the feature flag in the in-memory part of the context if the adaptive issuance feature has already launched. This means that the activation vote resulted in an approbation from the stakeholders and this happened sufficiently long ago.
val load_reward_coeff :
Raw_context.t ->
Raw_context.t Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tload_reward_coeff ctxt loads the current cycle's reward coeff from the storage into the context
val update_stored_rewards_at_cycle_end :
Raw_context.t ->
new_cycle:Cycle_repr.t ->
Raw_context.t Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tupdate_stored_rewards_at_cycle_end ctxt ~new_cycle updates Storage.Issuance_coeff with a new coefficient that will be applied preserved_cycles cycles after the given new_cycle. This new coefficient depends on the current Storage.Total_supply, and the total active stake for when this coefficient is computed.
This function also removes obsolete values from Storage.Issuance_coeff, and stores the current cycle's coefficient in the context for faster access.
val init :
Raw_context.t ->
Raw_context.t Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tinit ctxt adds into the context an adaptive issuance vote EMA at 0, and adaptive issuance launch cycle at None.
val update_ema :
Raw_context.t ->
vote:Per_block_votes_repr.per_block_vote ->
(Raw_context.t
* Cycle_repr.t option
* Per_block_votes_repr.Adaptive_issuance_launch_EMA.t)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tupdate_ema ctxt ~vote returns the new context with the new EMA
val launch_cycle :
Raw_context.t ->
Cycle_repr.t option
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tlaunch_cycle ctxt reads from the context the cycle at which the adaptive issuance feature is set to activate.
If this function returns None, then it means the feature has not been voted to be activated (yet).
module For_RPC : sig ... endmodule Internal_for_tests : sig ... end