package tezos-protocol-016-PtMumbai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This modules deals with delegates' participation in consensus.

This module is responsible for maintaining the Storage.Contract.Missed_endorsements table.

val expected_slots_for_given_active_stake : Raw_context.t -> total_active_stake:Tez_repr.t -> active_stake:Tez_repr.t -> int
type level_participation =
  1. | Participated
  2. | Didn't_participate

Record the participation of a delegate as a validator.

Sets 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).

Check 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 = {
  1. expected_cycle_activity : int;
    (*

    The total expected slots to be endorsed in the cycle. (static)

    *)
  2. minimal_cycle_activity : int;
    (*

    The minimal endorsing slots in the cycle to get endorsing rewards. (static)

    *)
  3. missed_slots : int;
    (*

    The number of missed endorsing slots in the cycle. (dynamic)

    *)
  4. missed_levels : int;
    (*

    The number of missed endorsing levels in the cycle. (dynamic)

    *)
  5. remaining_allowed_missed_slots : int;
    (*

    Remaining amount of endorsing slots that can be missed in the cycle before forfeiting the rewards. (dynamic)

    *)
  6. expected_endorsing_rewards : Tez_repr.t;
    (*

    Endorsing 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:

  • "static" information that does not change during the cycle
  • "dynamic" information that may change during the cycle

Only 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".

OCaml

Innovation. Community. Security.