Tezt_tezos.Dal_nodeSpawn Data-availability-layer (DAL) nodes and control them
Period for the shards to be kept in the storage Full : never delete Auto : period depending on the node profile Custom (i) : keeps the shards during i blocks
val create :
?runner:Tezt_wrapper.Runner.t ->
?path:string ->
?name:string ->
?color:Tezt_wrapper.Log.Color.t ->
?data_dir:string ->
?event_pipe:string ->
?rpc_host:string ->
?rpc_port:int ->
?listen_addr:string ->
?public_addr:string ->
?metrics_addr:string ->
?disable_shard_validation:bool ->
?disable_amplification:bool ->
?ignore_pkhs:string list ->
node:Node.t ->
unit ->
tCreates a DAL node
val create_from_endpoint :
?runner:Tezt_wrapper.Runner.t ->
?path:string ->
?name:string ->
?color:Tezt_wrapper.Log.Color.t ->
?data_dir:string ->
?event_pipe:string ->
?rpc_host:string ->
?rpc_port:int ->
?listen_addr:string ->
?public_addr:string ->
?metrics_addr:string ->
?disable_shard_validation:bool ->
?disable_amplification:bool ->
?ignore_pkhs:string list ->
l1_node_endpoint:Endpoint.t ->
unit ->
tval name : t -> stringGet the name of an dal node.
val rpc_host : t -> stringGet the RPC host given as --rpc-addr to an dal node.
val rpc_port : t -> intGet the RPC port given as --rpc-addr to an dal node.
val rpc_endpoint : ?local:bool -> t -> stringReturn the endpoint of the DAL node's RPC server, i.e., http://rpc_host:rpc_port. If local is given (false by default), then Constant.default_host is used (it overrides rpc-addr or the runner argument).
val listen_addr : t -> stringGet the node's point pair "address:port" given as --net-addr to a dal node.
val metrics_addr : t -> stringGet the node's metrics server point pair "address:port" given as --metrics-addr to a dal node.
val metrics_port : t -> intval data_dir : t -> stringGet the data-dir of an dal node.
val identity_file : t -> stringGet the identity file of a dal node.
val run :
?wait_ready:bool ->
?env:string Tezt_wrapper.Base.String_map.t ->
?event_level:Daemon.Level.default_level ->
t ->
unit Lwt.trun ?wait_ready ?env ?event_level node launches the given dal node where env is a map of environment variable.
If wait_ready is true, the promise waits for the dal node to be ready. true by default.
event_level allows to determine the printed levels. By default, it is set to `Info.
val pid : t -> int optionReturn pid of the process if running.
val path : t -> stringReturn the path of the daemon.
val terminate : ?timeout:float -> t -> unit Lwt.tSend SIGTERM and wait for the process to terminate.
Default timeout is 30 seconds, after which SIGKILL is sent.
val kill : t -> unit Lwt.tSend SIGKILL and wait for the process to terminate.
val stop : t -> unit Lwt.tSend SIGSTOP to a daemon. Do not wait for the process to terminate.
val log_events : ?max_length:int -> t -> unitShows in stdout every events sent by the node
val wait_for :
?where:string ->
t ->
string ->
(Tezt_wrapper.JSON.t -> 'a option) ->
'a Lwt.tSee Daemon.Make.wait_for.
val is_running_not_ready : t -> boolis_running_not_ready dal_node returns true if the given node is running but its status is not ready
val check_error :
?exit_code:int ->
?msg:Tezt_wrapper.Base.rex ->
t ->
unit Lwt.tWait until a DAL node terminates and check its status.
If the DAL node is not running, or if the Process.check_error function fails, fail the test.
val wait : t -> Unix.process_status Lwt.tWait until a node terminates and return its status. If the node is not running, make the test fail.
val init_config :
?expected_pow:float ->
?peers:string list ->
?attester_profiles:string list ->
?operator_profiles:int list ->
?observer_profiles:int list ->
?bootstrap_profile:bool ->
?history_mode:history_mode ->
?slots_backup_uris:string list ->
?trust_slots_backup_uris:bool ->
?batching_time_interval:string ->
t ->
unit Lwt.tRun octez-dal-node config init.
expected_pow allows to change the PoW difficulty. Default value is 0.
val update_config :
?expected_pow:float ->
?peers:string list ->
?attester_profiles:string list ->
?operator_profiles:int list ->
?observer_profiles:int list ->
?bootstrap_profile:bool ->
?history_mode:history_mode ->
?slots_backup_uris:string list ->
?trust_slots_backup_uris:bool ->
?batching_time_interval:string ->
t ->
unit Lwt.tmodule Config_file : sig ... endDAL node configuration files.
val read_identity : t -> string Lwt.tRead the peer id from the node's identity file.
val as_rpc_endpoint : t -> Endpoint.tExpose the RPC server address of this node as a foreign endpoint.
val wait_for_connections : t -> int -> unit Lwt.tWait for a node to receive a given number of connections.
wait_for_connections node n waits until node receives n "new_connection.v0" events.
val wait_for_ready : t -> unit Lwt.tWait until the node is ready.
More precisely, wait until a dal_node_is_ready event occurs. If such an event already occurred, return immediately.
val wait_for_disconnection : t -> peer_id:string -> unit Lwt.tWait for a node to receive a disconnection for some peer_id.
wait_for_disconnection node peer_id waits until node receives a "disconnected.v0" event from the given peer id.
val runner : t -> Tezt_wrapper.Runner.t optionval point_str : t -> stringval load_last_finalized_processed_level : t -> int option Lwt.tLoad and return the current value of the last finalized level processed by the crawler and stored in store/last_processed_level KVS file. The function returns None in case of error (e.g. file not found, file locked, ...).
val debug_print_store_schemas :
?path:string ->
?hooks:Tezt_wrapper.Process_hooks.t ->
unit ->
unit Lwt.tdebug_print_store_schemas ?path ?hooks () calls path debug print store schemas where:
path is the provided executable path (defaults to Constant.octez_dal_node),hooks are attached to the process (defaults to None).module Proxy : sig ... endThe Proxy module provides functionality to create a proxy server that can intercept and mock responses for DAL node requests.
module Mockup : sig ... endThis module provides a mock HTTP server for selected RPCs. It responds to registered routes with mock data and fails all other requests. It is similar with the Proxy module.
module Mockup_for_baker : sig ... endThis module provides a mock server for the RPCs needed by the baker. It is based on the Mockup module.