Mavryk_raw_protocol_001_PtAtLas.Delegate_missed_attestations_storageThis modules deals with delegates' participation in consensus.
This module is responsible for maintaining the Storage.Contract.Missed_attestations table.
val expected_slots_for_given_active_stake :
Raw_context.t ->
total_active_stake_weight:int64 ->
active_stake_weight:int64 ->
intval record_attesting_participation :
Raw_context.t ->
delegate:Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
participation:level_participation ->
attesting_power:int ->
Raw_context.t Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tRecord the participation of a delegate as a validator.
val record_baking_activity_and_pay_rewards_and_fees :
Raw_context.t ->
payload_producer:
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
block_producer:
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
baking_reward:Tez_repr.t ->
reward_bonus:Tez_repr.t option ->
(Raw_context.t * Receipt_repr.balance_updates)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tSets the payload and block producer as active. Pays the baking reward and the fees to the payload producer and the reward bonus to the payload producer (if the reward_bonus is not None).
val check_and_reset_delegate_participation :
Raw_context.t ->
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
(Raw_context.t * bool)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tCheck that a delegate participated enough in the last cycle (returns true if it did), and then reset the participation for preparing the next cycle.
type participation_info = {expected_cycle_activity : int;The total expected slots to be attested in the cycle. (static)
*)minimal_cycle_activity : int;The minimal attesting slots in the cycle to get attesting rewards. (static)
*)missed_slots : int;The number of missed attesting slots in the cycle. (dynamic)
*)missed_levels : int;The number of missed attesting levels in the cycle. (dynamic)
*)remaining_allowed_missed_slots : int;Remaining amount of attesting slots that can be missed in the cycle before forfeiting the rewards. (dynamic)
*)expected_attesting_rewards : Tez_repr.t;Attesting rewards that will be distributed at the end of the cycle if activity at that point will be greater than the minimal required. If the activity is already known to be below the required minimum, then the rewards are zero. (dynamic)
*)}Participation information. We denote by:
val participation_info :
Raw_context.t ->
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t ->
participation_info
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.tOnly use this function for RPC: this is expensive.
delegate_participation_info and !val:check_delegate forms the implementation of RPC call "/context/delegates/<pkh>/participation".