package tezt-tezos

  1. Overview
  2. Docs

Spawn Data-availability-committee (DAC) nodes and control them.

type t

DAC Node state.

val create_legacy : ?path:string -> ?name:string -> ?color:Tezt.Log.Color.t -> ?data_dir:string -> ?event_pipe:string -> ?rpc_host:string -> ?rpc_port:int -> ?reveal_data_dir:string -> threshold:int -> committee_members:string list -> ?committee_member_address:string -> node:Node.t -> client:Client.t -> unit -> t

Creates a DAC node to run in legacy mode, using the specified threshold and list of dac members.

val create_coordinator : ?path:string -> ?name:string -> ?color:Tezt.Log.Color.t -> ?data_dir:string -> ?event_pipe:string -> ?rpc_host:string -> ?rpc_port:int -> ?reveal_data_dir:string -> threshold:int -> committee_members:string list -> node:Node.t -> client:Client.t -> unit -> t

Creates a DAC node to run in coordinator mode, using the specified threshold, list of dac members and operator.

val create_committee_member : ?path:string -> ?name:string -> ?color:Tezt.Log.Color.t -> ?data_dir:string -> ?event_pipe:string -> ?rpc_host:string -> ?rpc_port:int -> ?reveal_data_dir:string -> ?coordinator_rpc_host:string -> ?coordinator_rpc_port:int -> address:string -> node:Node.t -> client:Client.t -> unit -> t

Creates a DAC node to run in committee_member mode, using the specified address, coordinator rpc host and port.

val create_observer : ?path:string -> ?name:string -> ?color:Tezt.Log.Color.t -> ?data_dir:string -> ?event_pipe:string -> ?rpc_host:string -> ?rpc_port:int -> ?reveal_data_dir:string -> ?coordinator_rpc_host:string -> ?coordinator_rpc_port:int -> node:Node.t -> client:Client.t -> unit -> t

Creates a DAC node to run in observer mode, using the specified coordinator rpc host and port.

val name : t -> string

Get the name of an dac node.

val mode : t -> string

Get the mode in which a dac node is configured to run. Returned values can be either "Legacy", "Coordinator", "Commitee_member" or "Observer".

val rpc_host : t -> string

Get the RPC host given as --rpc-addr to an dac node.

val rpc_port : t -> int

Get the RPC port given as --rpc-addr to an dac node.

val endpoint : t -> string

Return the endpoint of the dac node, i.e., http://rpc_host:rpc_port.

val data_dir : t -> string

Get the data-dir of an dac node.

val reveal_data_dir : t -> string

Get the reveal-data-dir of an dac node.

val run : ?wait_ready:bool -> ?env:string Tezt.Base.String_map.t -> t -> unit Lwt.t

run ?wait_ready ?env node launches the given dac node where env is a map of environment variable.

If wait_ready is true, the promise waits for the dac node to be ready. true by default.

val terminate : ?timeout:float -> t -> unit Lwt.t

Send SIGTERM and wait for the process to terminate.

Default timeout is 30 seconds, after which SIGKILL is sent.

val kill : t -> unit Lwt.t

Send SIGKILL and wait for the process to terminate.

val log_events : t -> unit

Shows in stdout every events sent by the node

val wait_for : ?where:string -> t -> string -> (Tezt.JSON.t -> 'a option) -> 'a Lwt.t

See Daemon.Make.wait_for.

val is_running_not_ready : t -> bool

is_running_not_ready dac_node returns true if the given node is running but its status is not ready

Wait until a node terminates and return its status. If the node is not running, make the test fail.

val init_config : t -> string Lwt.t

Run octez-dac-node init-config. Returns the name of the resulting configuration file.

module Config_file : sig ... end

C node configuration files.

OCaml

Innovation. Community. Security.