package tezos-store

  1. Overview
  2. Docs

Global types used in the store library

type block_descriptor = Tezos_crypto.Block_hash.t * int32

The type used to describe a block pointer i.e. its hash and level.

val block_descriptor_encoding : block_descriptor Data_encoding.t

Encoding for block_descriptor.

type chain_config = {
  1. history_mode : Tezos_shell_services.History_mode.t;
  2. genesis : Tezos_base.Genesis.t;
  3. expiration : Tezos_base.Time.Protocol.t option;
}

The type for chain configuration.

val chain_config_encoding : chain_config Data_encoding.t

Encoding for chain_config.

val pp_block_descriptor : Format.formatter -> block_descriptor -> unit

Pretty-printer for block_descriptor

type invalid_block = {
  1. level : int32;
  2. errors : Tezos_error_monad.TzCore.error list;
}

The type used to store an invalid block's value. We only retain the level and the errors encountered during validation. These values should be indexed by the block's hash.

val invalid_block_encoding : invalid_block Data_encoding.t

Encoding for invalid_block.

Module Block_lru_cache implements a lwt LRU cache map indexed by block hashes.

module Protocol_levels : sig ... end

Module Protocol_levels represents an associative map of protocol levels to corresponding blocks which supposedly activate new protocols, that is to say blocks that acknowledge a protocol change in the next block.

OCaml

Innovation. Community. Security.