Library
Module
Module type
Parameter
Class
Class type
type t = private {
endpoint : Uri.t option;
The node to delegate RPCs to. Name was chosen to be the same as in octez-client
rpc_addr : Uri.t option;
The address that the proxy server serves. Name was chosen to be the same as in tezos-node run
rpc_tls : string option;
A string of the form "crt,key"
where crt
is the path to the TLS certificate to use and key
is the path to the key to use. Name was chosen to be the same as in tezos-node run
sym_block_caching_time : Ptime.span option;
The time during which data for a symbolic block identifier (like head
, head~1
) is kept. Smaller values increase endpoint
's load but yield more up-to-date to clients. Higher values decrease endpoint
's load but make clients observe slightly deprecated values. If omitted, defaulted to time_between_blocks
.
If you are not sure what to do, do not specify it; i.e. do not pass --sym-block-caching-time
. If your node's load is too high, pass a bigger value than time_between_blocks
(if your clients are fine seeing slightly deprecated values)
data_dir : string option;
Path to the data-dir of a running tezos-node. If specified, we use the context
subdirectory to obtain data instead of using the ../raw/bytes
RPC call (hereby reducing the node's IO).
}
This type corresponds to the content of the CONFIG
file, as well as the aggregations of the corresponding command line arguments. Once it is built and, it is transformed into a value of type runtime
which represents what the APIs actually needs.
val pp : Stdlib.Format.formatter -> t -> unit
Pretty printer for t
type runtime = private {
endpoint : Uri.t;
The node to delegate RPCs to.
*)rpc_server_address : Tezos_base.TzPervasives.P2p_addr.t;
The address of the server
*)rpc_server_port : int;
The port of the server
*)rpc_server_tls : (string * string) option;
The paths to the certificate and key to use for TLS
*)sym_block_caching_time : Ptime.span option;
The duration during which data of symbolic blocks is kept
*)data_dir : string option;
Path to the data-dir of a running tezos-node. If specified, we use the context
subdirectory to obtain data instead of using the ../raw/bytes
RPC call (hereby reducing the node's IO).
}
A value of type t
after having been appropriately validated and prepared for being passed to the various APIs that need them (hence some types are slightly different than in t
).
val make :
endpoint:Uri.t option ->
rpc_addr:Uri.t option ->
rpc_tls:string option ->
sym_block_caching_time:Ptime.span option ->
data_dir:string option ->
t
make endpoint rpc_addr rpc_tls sym_block_caching_time
creates an instance of t
from the flags that are available on the command line. See t
for the documentation of parameters.
Encoding of what may happen when deserializing a JSON value whose OCaml type is 'a
val destruct_config :
Tezos_base.TzPervasives.Data_encoding.json ->
t destructed
destruct_config json
returns a t
from raw json
. Returns Ok
in case of success, or Error msg
if validation fails.
merge_right_bias t1 t2
returns the union of data of t1
and t2
(taking the Some
case on fields of type option
). If data is present on both side, take data from t2