2017-01-30 22:10:16 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2017-11-14 03:36:14 +04:00
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
2017-01-30 22:10:16 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
|
|
|
type t = {
|
|
|
|
data_dir : string ;
|
|
|
|
net : net ;
|
|
|
|
rpc : rpc ;
|
|
|
|
log : log ;
|
2017-11-11 06:34:12 +04:00
|
|
|
shell : shell ;
|
2017-01-30 22:10:16 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
and net = {
|
|
|
|
expected_pow : float ;
|
|
|
|
bootstrap_peers : string list ;
|
|
|
|
listen_addr : string option ;
|
|
|
|
closed : bool ;
|
|
|
|
limits : P2p.limits ;
|
|
|
|
}
|
|
|
|
|
|
|
|
and rpc = {
|
|
|
|
listen_addr : string option ;
|
|
|
|
cors_origins : string list ;
|
|
|
|
cors_headers : string list ;
|
|
|
|
tls : tls option ;
|
|
|
|
}
|
|
|
|
|
|
|
|
and tls = {
|
|
|
|
cert : string ;
|
|
|
|
key : string ;
|
|
|
|
}
|
|
|
|
|
|
|
|
and log = {
|
|
|
|
output : Logging.Output.t ;
|
|
|
|
default_level : Logging.level ;
|
|
|
|
rules : string option ;
|
|
|
|
template : Logging.template ;
|
|
|
|
}
|
|
|
|
|
2017-11-11 06:34:12 +04:00
|
|
|
and shell = {
|
|
|
|
bootstrap_threshold : int ;
|
|
|
|
}
|
|
|
|
|
2017-01-30 22:10:16 +04:00
|
|
|
val default_data_dir: string
|
|
|
|
val default_net_port: int
|
|
|
|
val default_rpc_port: int
|
|
|
|
val default_net: net
|
|
|
|
val default_config: t
|
|
|
|
|
|
|
|
val update:
|
|
|
|
?data_dir:string ->
|
|
|
|
?min_connections:int ->
|
|
|
|
?expected_connections:int ->
|
|
|
|
?max_connections:int ->
|
|
|
|
?max_download_speed:int ->
|
|
|
|
?max_upload_speed:int ->
|
2017-04-18 20:32:31 +04:00
|
|
|
?binary_chunks_size:int->
|
2017-01-24 17:36:42 +04:00
|
|
|
?peer_table_size:int ->
|
2017-01-30 22:10:16 +04:00
|
|
|
?expected_pow:float ->
|
|
|
|
?bootstrap_peers:string list ->
|
|
|
|
?listen_addr:string ->
|
|
|
|
?rpc_listen_addr:string ->
|
|
|
|
?closed:bool ->
|
|
|
|
?cors_origins:string list ->
|
|
|
|
?cors_headers:string list ->
|
|
|
|
?rpc_tls:tls ->
|
|
|
|
?log_output:Logging.Output.t ->
|
2017-11-11 06:34:12 +04:00
|
|
|
?bootstrap_threshold:int ->
|
2017-09-14 12:26:05 +04:00
|
|
|
t -> t tzresult Lwt.t
|
2017-01-30 22:10:16 +04:00
|
|
|
|
|
|
|
val to_string: t -> string
|
|
|
|
val read: string -> t tzresult Lwt.t
|
|
|
|
val write: string -> t -> unit tzresult Lwt.t
|
|
|
|
|
|
|
|
val resolve_listening_addrs: string -> (P2p_types.addr * int) list Lwt.t
|
|
|
|
val resolve_rpc_listening_addrs: string -> (P2p_types.addr * int) list Lwt.t
|
|
|
|
val resolve_bootstrap_addrs: string list -> (P2p_types.addr * int) list Lwt.t
|
|
|
|
|
|
|
|
val check: t -> unit Lwt.t
|