Tezos_alpha_test_helpers.Dal_helpers
val mk_cryptobox :
Tezos_crypto_dal.Cryptobox.parameters ->
Tezos_crypto_dal.Cryptobox.t Tezos_base.TzPervasives.tzresult Lwt.t
Returns an object of type Cryptobox.t
from the given DAL paramters.
val derive_dal_parameters :
Tezos_crypto_dal.Cryptobox.parameters ->
redundancy_factor:int ->
constants_divider:int ->
Tezos_crypto_dal.Cryptobox.parameters
Derive new DAL parameters from the given ones by:
val content_slot_id :
Tezos_protocol_alpha.Protocol.Dal_slot_repr.History.cell_content ->
Tezos_protocol_alpha.Protocol.Dal_slot_repr.Header.id
Returns the slot id of the given cell's content .
val dal_attestation :
Tezos_protocol_alpha.Protocol.Alpha_context.Dal.Slot_index.t list ->
Tezos_protocol_alpha.Protocol.Alpha_context.Dal.Attestation.t
Builds a DAL attestation bitset containing the provided slot indexes.
val has_assigned_shards :
Context.t ->
?level:Tezos_protocol_alpha.Protocol.Alpha_context.Raw_level.t ->
Tezos_protocol_alpha.Protocol.Alpha_context.public_key_hash ->
bool Tezos_base.TzPervasives.tzresult Lwt.t
Returns true
iff the given delegate has at least one assigned shard at the given level.
val dal_content_of_int :
loc:string ->
int ->
Tezos_protocol_alpha.Protocol.Alpha_context.dal_content
Builds a Alpha_context.dal_content
from its integer representation, that is, the sum of powers of two of the indexes of attested slots.
Raises an exception when the given argument is negative.
val dal_content_of_int_list :
?number_of_slots:int ->
int list ->
Tezos_protocol_alpha.Protocol.Alpha_context.dal_content
Builds a Alpha_context.dal_content
from a list of attested slots.
val various_dal_contents :
Tezos_protocol_alpha.Protocol.Alpha_context.dal_content option list
A list of varied dal_content options, for tests where we want to build attestations with different dal contents.
val committee_with_various_dal_contents :
'a list ->
('a * Tezos_protocol_alpha.Protocol.Alpha_context.dal_content option) list
Transform a list of committee members into a list of (member,
dal)
where dal
is picked successively from various_dal_contents
(going back to the beginning of various_dal_contents
if it is shorter than the provided committee.
Depending on when this function is called, 'a
may be e.g. the Signature.public_key_hash
of delegates or their consensus key, or Op.attesting_slot
.