package tezos-protocol-alpha

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

This module maintains the storage related to forbidden delegates. It is responsible for maintaining the Storage.Tenderbake.Forbidden_delegates table.

is_forbidden ctxt delegate returns true if the given delegate is forbidden to bake or attest. This means that its current frozen deposit is equal to zero. Returns false otherwise.

may_forbid ctxt delegate ~current_cycle slash_history checks the forbidding criteria based on current_cycle and slash_history and, if required, adds delegate to the set of forbidden delegates and stores the updated set, which prevents this delegate from baking or attesting.

Beside the new context, it returns a boolean that is true if the delegate has actually been forbidden.

load ctxt reads from the storage the saved set of forbidden delegates and sets the raw context's in-memory cached value.

OCaml

Innovation. Community. Security.