Module Tezos_alpha_test_helpers.Dal_helpers

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:

  • setting the given redundancy factor ;
  • dividing the other fields by the given factor.

Returns the slot id of the given cell's content .

Builds a DAL attestation bitset containing the provided slot indexes.

Returns true iff the given delegate has at least one assigned shard at the given level.

module Make (P : sig ... end) : sig ... end

Some global constants.

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.

  • parameter [number_of_slots]

    defaults to Default_parameters.constants_test.dal.number_of_slots.

    Fails when any of the attested slots is negative or greater than or equal to number_of_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.