package tezos-protocol-013-PtJakart

  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-013-PtJakart.raw/Tezos_raw_protocol_013_PtJakart/Ticket_accounting/index.html

Module Tezos_raw_protocol_013_PtJakart.Ticket_accountingSource

ticket_diffs ctxt ~arg_type_has_tickets ~storage_type_has_tickets arg old_storage new_storage lazy_storage_diff returns a map from ticket-tokens to balance-differences that represents the change in balance for a contract due to changes of tickets in the storage. The assumption is that before calling ticket_diffs, all tickets that are owned by a contract exist either in the old_storage or the arg. After execution, only tickets in new_storage are owned by the contract. Note that this function avoids traversing the lazy part of the storage.

update_ticket_balances ctxt self ~ticket_diffs operations updates the ticket balances according to the ticket_diffs map and the set of operations. The function also returns the storage size diff resulting from updating the ticket-balance table in the context.

Invariant: this function must be called after applying the lazy-storage diffs affecting any contracts in the given operations.

The function fails in case an invalid ticket-token-balance update is detected. The ticket_diffs argument represents the change of ticket-tokens for the self contract. It also specifies a "budget" for outgoing ticket-tokens.

OCaml

Innovation. Community. Security.