Tezos_raw_protocol_alpha.Dal_applyThis modules handles all the validation/application/finalisation of any operation related to the DAL.
val validate_attestations :
Alpha_context.t ->
attestation_level:Alpha_context.Raw_level.t ->
Alpha_context.Consensus_key.pk ->
Alpha_context.Dal.Attestations.t ->
unit Tezos_protocol_environment_alpha.Error_monad.tzresultvalidate_attestations ctxt ~attestation_level consensus_key attestations checks whether the DAL attestations attestations emitted at the given attestation_level by the attester with the given consensus_key is valid. If an Error _ is returned, the op is not valid. The checks made are: * the attestations' size does not exceed the maximum; * for all lags, the delegate is in the DAL committee if for a given lag it attached a non-empty attestation.
These are checks done for the DAL part alone, checks on other fields of an attestation (like level, round) are done by the caller.
val apply_attestations :
Alpha_context.t ->
delegate:Tezos_protocol_environment_alpha.Signature.public_key_hash ->
attested_level:Alpha_context.Raw_level.t ->
Alpha_context.Dal.Attestations.t ->
tb_slot:Alpha_context.Slot.t ->
committee_level_to_shard_count:int Alpha_context.Raw_level.Map.t ->
Alpha_context.t Tezos_protocol_environment_alpha.Error_monad.tzresultapply_attestations ctxt ~current_level attestations ~tb_slot ~committee_level_to_shard_count records in the context that the given attestations were issued by the delegate with initial Tenderbake slot tb_slot and the corresponding attester has the for each relevant committee level a number of assigned shards as given by committee_level_to_shard_count.
val validate_publish_commitment :
Alpha_context.t ->
Alpha_context.Dal.Operations.Publish_commitment.t ->
unit Tezos_protocol_environment_alpha.Error_monad.tzresultvalidate_publish_commitment ctxt slot ensures that slot_header is valid and prevents an operation containing slot_header to be refused on top of ctxt. If an Error _ is returned, the slot_header is not valid.
val apply_publish_commitment :
Alpha_context.t ->
Alpha_context.Dal.Operations.Publish_commitment.t ->
source:Alpha_context.Contract.t ->
(Alpha_context.t * Alpha_context.Dal.Slot.Header.t)
Tezos_protocol_environment_alpha.Error_monad.tzresultapply_publish_commitment ctxt slot_header ~source applies the publication of slot header slot_header associated to source on top of ctxt. Fails if the slot already contains a slot header.
val finalisation :
Alpha_context.t ->
(Alpha_context.t * Alpha_context.Dal.Slot_availability.t)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.tfinalisation ctxt should be executed at block finalisation time. A set of slots attested at level ctxt.current_level is returned encapsulated into the attestation data-structure.