package tezos-proxy

  1. Overview
  2. Docs
Tezos: proxy

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-17.3.tar.gz
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc

doc/tezos-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.

Sourcetype sources_config = private {
  1. 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).

    *)
  2. 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.

Sourcetype sources = private {
  1. 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).

    *)
  2. 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.

Sourceval example_sources : string

An example content of the --sources file

Sourceval destruct_sources_config : Tezos_base.TzPervasives.Data_encoding.json -> (sources_config, string) result

Ad-hoc type safe JSON parsing function until json-data-encoding library provides a result-returning alternative.

Sourceval sources_config_to_uris : sources_config -> Uri.t list

sources_config_to_uris sources returns the Uris contained * in sources.

Sourceval sources_config_to_sources : (Uri.t -> Tezos_rpc.Context.simple) -> sources_config -> sources

sources_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.

Sourceval hash_of_block : Tezos_shell_services.Block_services.block -> Tezos_base.TzPervasives.Block_hash.t option

None if the given block is symbolic, otherwise its concrete hash.

OCaml

Innovation. Community. Security.