package tezt-tezos

  1. Overview
  2. Docs
include module type of RPC_legacy
type default_uri_provider = (Dal_node.t, Endpoint.t) Either.t
type local_uri_provider = Dal_node.t
type remote_uri_provider = Endpoint.t
val slot_pages : string -> string list RPC_core.t

slot_pages slot_header gets slot/pages of slot_header

val shard : slot_header:string -> shard_id:int -> string RPC_core.t

shard ~slot_header ~shard_id gets a shard from a given slot header and shard id

val shards : slot_header:string -> int list -> string list RPC_core.t

shards ~slot_header shard_ids gets a subset of shards from a given slot header

type commitment = string
type operator_profile =
  1. | Attester of string
  2. | Producer of int

Profiles that operate on shards/slots.

type operator_profiles = operator_profile list

List of operator profiles.

type profiles =
  1. | Bootstrap
  2. | Operator of operator_profiles
type slot_header = {
  1. slot_level : int;
  2. slot_index : int;
  3. commitment : string;
  4. status : string;
}

Information contained in a slot header fetched from the DAL node.

val slot_header_of_json : Tezt_wrapper.JSON.t -> slot_header

slot_header_of_json json decodes json as a slot header. The function fails if the given json cannot be decoded.

val slot_headers_of_json : Tezt_wrapper.JSON.t -> slot_header list

slot_header_of_json json_ similar to slot_header_of_json, but the input (and output) is expected to be a list.

val post_commitment : Helpers.slot -> commitment RPC_core.t

Call RPC "POST /commitments" to store a slot and retrun the commitment in case of success.

val patch_commitment : commitment -> slot_level:int -> slot_index:int -> unit RPC_core.t

Call RPC "PATCH /commitments" to associate the given level and index to the slot whose commitment is given.

val get_commitment_slot : commitment -> Helpers.slot RPC_core.t

Call RPC "GET /commitments/<commitment>/slot" to retrieve the slot content associated with the given commitment.

val put_commitment_shards : ?with_proof:bool -> commitment -> unit RPC_core.t

Call RPC "PUT /commitments/<commitment>/shards" to compute and store the shards of the slot whose commitment is given, using the current DAL parameters. Note that with_proof, whose default value is false, is provided as input to the RPC.

type commitment_proof = string
val get_commitment_proof : commitment -> commitment_proof RPC_core.t

Call RPC "GET /commitments/<commitment>/proof" to get the proof associated to a commitment.

val get_level_index_commitment : slot_level:int -> slot_index:int -> commitment RPC_core.t

Call RPC "GET /levels/<published_level>/slot_indices/<slot_index>/commitment" to get the commitment associated to the given level and index.

val patch_profiles : operator_profiles -> unit RPC_core.t

Call RPC "PATCH /profiles" to update the list of profiles tracked by the DAL node.

val get_profiles : unit -> profiles RPC_core.t

Call RPC "GET /profiles" to retrieve the list of profiles tracked by the DAL node.

val get_commitment_headers : ?slot_level:int -> ?slot_index:int -> commitment -> slot_header list RPC_core.t

Call RPC "GET /commitments/<commitment>/headers" to get the headers and statuses know about the given commitment. The resulting list can be filtered by a given header publication level and slot index.

val get_assigned_shard_indices : level:int -> pkh:string -> int list RPC_core.t

Call RPC "GET /profiles/<public_key_hash>/attested_levels/<level>/assigned_shard_indices" to get shard ids assigned to the given public key hash at the given level.

val get_published_level_headers : ?status:string -> int -> slot_header list RPC_core.t

Call RPC "GET /levels/<published_level>/headers?status" to get the known headers with the given published level.

type slot_set = bool list
type attestable_slots =
  1. | Not_in_committee
  2. | Attestable_slots of slot_set
val get_attestable_slots : attester:Account.key -> attested_level:int -> attestable_slots RPC_core.t

Call RPC "GET /profiles/<public_key_hash>/attested_levels/<level>/attestable_slots" to get the slots currently attestable by the given public key hash at the given attested level. The result is either a Not_in_committee or a Attestable_slots flags, where flags is a boolean list of length num_slots. A slot is attestable if it is published at level level - attestation_lag) and all the shards assigned to the given attester at level level are available in the DAL node's store.

val delete_p2p_peer_disconnect : peer_id:string -> unit RPC_core.t

Call RPC "DELETE /p2p/peers/disconnect" to disconnect the node whose identity is given.

OCaml

Innovation. Community. Security.