package tezos-shell

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
type synchronisation_limits = {
  1. latency : int;
    (*

    latency is the time interval (seconds) used to determine if a node is synchronized with a chain. For instance, a node that knows head with timestamp T is synchronized if T >= now - max_latency. This parameter depends on the baking rate and the latency of the network.

    *)
  2. threshold : int;
    (*

    threshold determines the number of peers the synchronization heuristic looks at to determine if the node is synchronized or not.

    *)
}

Constants parameterizing the bootstrap heuristics.

type limits = {
  1. synchronisation : synchronisation_limits;
  2. worker_limits : Tezos_base.Worker_types.limits;
}
val create : start_prevalidator:bool -> start_testchain:bool -> active_chains:t Tezos_crypto.Chain_id.Table.t -> block_validator_process:Block_validator_process.t -> Peer_validator.limits -> Prevalidator.limits -> Block_validator.t -> State.Block.t Lwt_watcher.input -> (Tezos_crypto.Chain_id.t * bool) Lwt_watcher.input -> Distributed_db.t -> State.Chain.t -> limits -> (t, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
val chain_id : t -> Tezos_crypto.Chain_id.t
val chain_state : t -> State.Chain.t
val sync_status : t -> Synchronisation_heuristic.status
val bootstrapped : t -> unit Lwt.t

Wait for the `synchronisation_status` to be `Synchronised`. Subsequent calls return immediately. In other words, once a node is bootstrapped, it remains bootstrapped until it terminates (except if force_bootstrapped is used).

val is_bootstrapped : t -> bool
val force_bootstrapped : t -> bool -> unit
val prevalidator : t -> Prevalidator.t option
val chain_db : t -> Distributed_db.chain_db
val child : t -> t option
val validate_block : t -> ?force:bool -> Tezos_crypto.Block_hash.t -> Tezos_base.Block_header.t -> Tezos_base.Operation.t list list -> (unit, Tezos_error_monad.TzCore.error list) Stdlib.result Lwt.t
val shutdown : t -> unit Lwt.t
val valid_block_watcher : t -> State.Block.t Lwt_stream.t * Lwt_watcher.stopper
val new_head_watcher : t -> State.Block.t Lwt_stream.t * Lwt_watcher.stopper
val running_workers : unit -> (Tezos_crypto.Chain_id.t * t) list
val pending_requests_length : t -> int
OCaml

Innovation. Community. Security.