package tezos-shell

  1. Overview
  2. Docs

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. user_activated_upgrades : Tezos_base.User_activated.upgrades;
    (*

    user activated upgrades

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

    user activated protocol overrides

    *)
}
type validator_kind =
  1. | Internal : Tezos_store.Store.Chain.chain_store -> validator_kind
  2. | External : {
    1. genesis : Tezos_base.Genesis.t;
    2. data_dir : string;
    3. context_root : string;
    4. protocol_root : string;
    5. process_path : string;
    6. 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

close vp closes the given vp. In the case of an External validator process, we first ask the validator to shutdown. If it is still running after 5 seconds, we notice that the block validation process is unresponsive and we force its termination (using a registered Lwt_exit.clean_up_callback).

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

init_test_chain must only be called on a forking block.

OCaml

Innovation. Community. Security.