Module Store.Shards

A shard of some slot id consist of a shard index (a number between 0 and the number_of_shards protocol parameter) and a share. The shard store is a mapping associating 0 or 1 share to each (slot_id, shard index) pair.

type t
val number_of_shards_available : t -> Tezos_dal_node_services.Types.slot_id -> int list -> int Tezos_base.TzPervasives.tzresult Lwt.t

number_of_shards_available store slot_id shard_indices returns the number of shards stored among the ones given by indexes in shard_indices for the given slot_id.

write_all store slot_id shards adds to the shard store all the given shards of the given slot id.

read store slot_id shard_id gets the shard associated to slot_id at the range shard_id.

Same as read_values but for all possible shards of the given slot id.

count_values store slot_id returns the number of shards which are stored for the given slot id.

remove store slot_id removes the shards associated to the given slot id from the store.