package tezt-tezos
include module type of RPC_legacy
val slot_pages : string -> (Dal_node.t, string list) RPC_core.t
slot_pages slot_header
gets slot/pages of slot_header
val shard :
slot_header:string ->
shard_id:int ->
(Dal_node.t, 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 ->
(Dal_node.t, string list) RPC_core.t
shards ~slot_header shard_ids
gets a subset of shards from a given slot header
Information contained in a slot header fetched from the DAL node.
val slot_header_of_json : Tezt.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.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 : slot -> (Dal_node.t, 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 ->
(Dal_node.t, 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 -> (Dal_node.t, 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 ->
(Dal_node.t, 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.
val get_commitment_proof :
commitment ->
(Dal_node.t, 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 ->
(Dal_node.t, 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_profile : profile -> (Dal_node.t, unit) RPC_core.t
Call RPC "PATCH /profiles" to update the list of profiles tracked by the DAL node.
val get_profiles : unit -> (Dal_node.t, profile list) 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 ->
(Dal_node.t, 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 ->
(Dal_node.t, 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 ->
(Dal_node.t, slot_header list) RPC_core.t
Call RPC "GET /levels/<published_level>/headers?status" to get the known headers with the given published level.
val get_attestable_slots :
attestor:Account.key ->
attested_level:int ->
(Dal_node.t, 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 attestor at level level
are available in the DAL node's store.