Mavryk_raw_protocol_alpha.Adaptive_issuance_storageval set_adaptive_issuance_enable :
Raw_context.t ->
Raw_context.t Mavryk_protocol_environment_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.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_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.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_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.Lwt.tupdate_stored_rewards_at_cycle_end ctxt ~new_cycle updates Storage.Issuance_coeff with a new coefficient that will be applied consensus_rights_delay 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_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.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_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.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_alpha.Error_monad.tzresult
Mavryk_protocol_environment_alpha.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