package tezos-protocol-014-PtKathma

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

Updating the delegate of a contract.

When calling this function on an "implicit contract" and setting the delegate to the contract manager registers it as a delegate. One cannot unregister a delegate for now. The associate contract is now 'undeletable'.

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

Iterate on all registered delegates.

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

Trigger the context maintenance at the end of cycle 'n', i.e.: unfreeze the endorsing rewards, potentially deactivate delegates. Return the corresponding balances updates and the list of deactivated delegates.

Returns true if the given delegate has already been slashed for double baking for the given level.

Returns true if the given delegate has already been slashed for double preendorsing or double endorsing for the given level.

Returns a delegate's frozen deposits, both the current amount and the initial freezed amount.

A delegate's frozen balance is only composed of frozen deposits; rewards and fees are not frozen, but simply credited at the right moment.

Returns the full 'balance' of the implicit contract associated to a given key, i.e. the sum of the spendable balance (given by balance or Contract_storage.get_balance) and of the frozen balance. The frozen balance is composed of all frozen bonds associated to the contract (given by Contract_storage.get_frozen_bonds) and of the frozen deposits (given by frozen_deposits).

Only use this function for RPCs: this is expensive.

Participation slots potentially associated to accounts. The accounts that didn't place a deposit will be excluded from this list. This function should only be used to compute the deposits to freeze or initialize the protocol while stitching. RPCs can use this function to predict an approximation of long term future slot allocations. It shouldn't be used in the baker.

init_first_cycles ctxt computes and records the distribution of the total active stake among active delegates. This concerns the total active stake involved in the calculation of baking rights for all cycles in the range 0, preserved_cycles.

compute_snapshot_index ctxt cycle max_snapshot_index Returns the index of the selected snapshot for the cycle passed as argument, and for the max index of snapshots taken so far, max_snapshot_index (see Stake_storage.max_snapshot_index.

OCaml

Innovation. Community. Security.