package tezos-protocol-010-PtGRANAD

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

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-16.1.tar.gz
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f

doc/tezos-protocol-010-PtGRANAD.raw/Tezos_raw_protocol_010_PtGRANAD/Roll_storage/Delegate/index.html

Module Roll_storage.DelegateSource

add_amount ctxt dlg am performs the following actions:

1. if the delegate dlg is inactive, increase its change chg by am, 2. if the dlg is active, update dlg's number of rolls nr, and change chg so that dlg's number of tokens is increased by am, and equal to nr * tokens_per_roll + chg, where chg < tokens_per_roll.

remove_amount ctxt dlg am performs the following actions:

1. if the delegate dlg is inactive, decrease its change chg by am, 2. if the dlg is active, update dlg's number of rolls nr, and change chg so that dlg's number of tokens is decreased by am, and equal to nr * tokens_per_roll + chg, where chg < tokens_per_roll.

set_inactive ctxt dlg renders delegate dlg inactive and performs the following actions:

1. empty the list of rolls of dlg, 2. increase the change of dlg by nr * tokens_per_roll, where nr is dlg's number of rolls prior to inactivation.

If the delegate dlg is already active then set_active ctxt dlg performs the following sequence of actions:

1. if the delegate is not scheduled to become inactive, then schedule the delegate to become inactive after (preserved_cycles * 2) + 1 cycles, 2. if the delegate is already scheduled to become inactive at cycle ic, then re-schedule it to become inactive at cycle max ic (cc + preserved_cycles + 1), where cc is the current cycle.

If dlg is inactive then this function puts dlg in active state and performs the following actions:

1. if dlg is not scheduled to become inactive, schedule dlg to become inactive after (preserved_cycles * 2) + 1 cycles, 2. if the dlg is already scheduled to become inactive at cycle ic, then re-schedule it to become inactive at cycle max ic (cc + (preserved_cycles * 2) + 1), where cc is the current cycle, 3. dispatch dlg's change chg into nr rolls of size tokens_per_roll so that the total amount managed by dlg is unchanged and equal to (nr * tokens_per_roll) + chg, where chg < tokens_per_roll.

OCaml

Innovation. Community. Security.