Module Mavryk_raw_protocol_001_PtAtLas.Delegate_storage

This module groups everything related to delegate registration. For the invariants maintained, see the submodule Contract.

It also groups "trivial" getters/setters related to delegates.

It is responsible for maintaining the following tables:

module Contract : sig ... end

This module ensures the following invariants:

Has a delegate been registered in the delegate table?

Iterate on all registered delegates.

List all registered delegates.

Returns a delegate's initial frozen deposits at the beginning of cycle.

Returns a delegate's initial frozen deposits at the beginning of the previous cycle.

Fails with No_previous_cycle if there is no previous cycle.

Returns a delegate's current frozen deposits.

module For_RPC : sig ... end

The functions in this module are considered too costly to be used in the protocol. They are meant to be used only to answer RPC calls.