package tezos-protocol-020-PsParisC
val set_adaptive_issuance_enable :
Raw_context.t ->
Raw_context.t Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
set_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 Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
load_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 Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
update_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 Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
init 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)
Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
update_ema ctxt ~vote
returns the new context with the new EMA
val launch_cycle :
Raw_context.t ->
Cycle_repr.t option
Tezos_protocol_environment_020_PsParisC.Error_monad.tzresult
Tezos_protocol_environment_020_PsParisC.Lwt.t
launch_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 ... end
module Internal_for_tests : sig ... end