package tezos-shell

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

Block_validator_process is used to validate new blocks. This validation can be

  • internal: the same processus is used to run the node and to validate blocks
  • external: another processus is used to validate blocks This module also ensures the liveness of the operations (see Block_validation:check_liveness).
type validator_environment = {
  1. genesis : Tezos_base.Genesis.t;
    (*

    genesis block of the current chain

    *)
  2. user_activated_upgrades : Tezos_base.User_activated.upgrades;
    (*

    user activated upgrades

    *)
  3. user_activated_protocol_overrides : Tezos_base.User_activated.protocol_overrides;
    (*

    user activated protocol overrides

    *)
}
type validator_kind =
  1. | Internal : Tezos_storage.Context.index -> validator_kind
  2. | External : {
    1. data_dir : string;
    2. context_root : string;
    3. protocol_root : string;
    4. process_path : string;
    5. sandbox_parameters : Data_encoding.json option;
    } -> validator_kind

For performances reasons, it may be interesting to use another processus (from the OS) to validate blocks (External). However, in that case, only one processus has a write access to the context. Currently informations are exchanged via the file system.

type t

Internal representation of the block validator process

val close : t -> unit Lwt.t
val restore_context_integrity : t -> (int option, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

apply_block bvp predecessor header os checks the liveness of the operations and then call Block_validation.apply

val commit_genesis : t -> chain_id:Tezos_crypto.Chain_id.t -> (Tezos_crypto.Context_hash.t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
val init_test_chain : t -> State.Block.t -> (Tezos_base.Block_header.t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t

init_test_chain must only be called on a forking block.

OCaml

Innovation. Community. Security.