Dal_common.RPC
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
Profiles that operate on shards/slots.
type operator_profiles = operator_profile list
List of operator profiles.
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.
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 known 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.
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.
val patch_p2p_peers_by_id :
peer_id:string ->
?acl:string ->
unit ->
unit RPC_core.t
Call RPC "PATCH /p2p/peers/by-id/<peer_id>" to patch the ACL of the node whose identity is given. Ignores the output of the RPC.
val get_topics : unit -> topic list RPC_core.t
Call RPC "GET /p2p/gossipsub/topics" to list the topics
val get_topics_peers : subscribed:bool -> (topic * string list) list RPC_core.t
Call RPC "GET /p2p/gossipsub/topics/peers" to list the peers on each topic.
val get_gossipsub_connections : unit -> Tezt_wrapper.JSON.t RPC_core.t
val get_scores : unit -> peer_score list RPC_core.t
Call RPC "GET /p2p/gossipsub/scores" to list the scores of peers with a known score.
val get_plugin_commitments_history_hash :
hash:string ->
unit ->
Tezt_wrapper.JSON.t RPC_core.t
Call RPC /plugin/commitments_history/hash/hash
.
val get_shard : slot_header:string -> shard_id:int -> string RPC_core.t
Call /shard/<hash>/<shard-id>
module Local : RPC_core.CALLERS with type uri_provider := local_uri_provider
module Remote : RPC_core.CALLERS with type uri_provider := remote_uri_provider