package octez-shell-libs
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
    
    
  sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
    
    
  doc/octez-shell-libs.proxy/Tezos_proxy/Light/index.html
Module Tezos_proxy.LightSource
Code related to the light mode that is protocol-independent. See src/proto_*/lib_client/light.ml files for protocol-dependent code.
type sources_config = private {min_agreement : float;(*A float between 0 (exclusive) and 1 (inclusive), representing the minimum ratio of endpoints that must agree on data for said data to be accepted. 1 means "require all enpoints to agree" (the default).
*)uris : Uri.t list;(*The list of endpoint URIs used for Light mode consensus. This list must contain at least 2 endpoints (one for data retrieval, one for check).
*)
}See mk_sources_config smart constructor to build values.
type sources = private {min_agreement : float;(*A float between 0 (exclusive) and 1 (inclusive), representing the minimum ratio of endpoints that must agree on data for said data to be accepted. 1 means "require all enpoints to agree" (the default).
*)endpoints : (Uri.t * Tezos_rpc.Context.simple) list;(*The list of endpoint URIs used for Light mode consensus. This list must contain at least 2 endpoints (one for data retrieval, one for check).
*)
}See sources_config_to_sources to build values.
An example content of the --sources file
val destruct_sources_config : 
  Tezos_base.TzPervasives.Data_encoding.json ->
  (sources_config, string) resultAd-hoc type safe JSON parsing function until json-data-encoding library provides a result-returning alternative.
sources_config_to_uris sources returns the Uris contained * in sources.
val sources_config_to_sources : 
  (Uri.t -> Tezos_rpc.Context.simple) ->
  sources_config ->
  sourcessources_config_to_sources f config transforms the value config (which was obtained by parsing the CLI) into a value used by core algorithms of the light mode.
val hash_of_block : 
  Tezos_shell_services.Block_services.block ->
  Tezos_base.TzPervasives.Block_hash.t optionNone if the given block is symbolic, otherwise its concrete hash.