package tezos-protocol-016-PtMumbai

  1. Overview
  2. Docs
Tezos/Protocol: economic-protocol definition

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-protocol-016-PtMumbai.raw/Tezos_raw_protocol_016_PtMumbai/Stake_storage/index.html

Module Tezos_raw_protocol_016_PtMumbai.Stake_storageSource

This module provides basic operations (accessors and setters) on staking tokens.

It is responsible for maintaining the following tables:

fold ctxt ~f ~order init folds f on the list of active delegates having the minimal required stake. The folding process starts with init. Each element of the list is a pair pkh, stake, where pkh is the public key hash of the delegate and stake is the staking balance of the delegate.

fold_snapshot ctxt ~index ~f ~init folds f on the list of active delegates having the minimal required stake for the given snapshot index. The folding process starts with init. Each element of the list is a pair pkh, stake, where pkh is the public key hash of the delegate and stake is the staking balance of the delegate for the given snapshot index.

max_snapshot_index ctxt returns the index of the last snapshot taken of staking balances and active delegates.

set_selected_distribution_for_cycle ctxt cycle distrib total_stake saves the selected distribution distrib of the total_stake for the given cycle.

Sourceval fold_on_active_delegates_with_minimal_stake : Raw_context.t -> order:[ `Sorted | `Undefined ] -> init:'a -> f: (Tezos_protocol_environment_016_PtMumbai.Signature.Public_key_hash.t -> unit -> 'a -> 'a Tezos_protocol_environment_016_PtMumbai.Lwt.t) -> 'a Tezos_protocol_environment_016_PtMumbai.Lwt.t

Copy the stake distribution for the current cycle (from Storage.Stake.Selected_distribution_for_cycle) in the raw context.

get_total_active_stake ctxt cycle retrieves the amount in Tez of the active stake at cycle from ctxt.

add_contract_stake ctxt contract amount calls Stake_storage.add_stake ctxt delegate amount if contract has a delegate. Otherwise this function does nothing.

remove_contract_stake ctxt contract amount calls Stake_storage.remove_stake ctxt delegate amount if contract has a delegate. Otherwise this function does nothing.

OCaml

Innovation. Community. Security.