Tezos_dal_node_lib.Message_validationval gossipsub_app_messages_validation :
Node_context.t ->
Tezos_crypto_dal.Cryptobox.t ->
head_level:int32 ->
Tezos_dal_node_services.Types.proto_parameters ->
?message:Tezos_dal_node_services.Types.Message.t ->
message_id:Tezos_dal_node_services.Types.Message_id.t ->
unit ->
[> `Invalid | `Outdated | `Unknown | `Valid ]gossipsub_app_messages_validation ctxt cryptobox head_level proto_parameters ?message ~message_id () validates a Gossipsub message and its associated message ID in the context of the given DAL node.
The validation follows a layered approach:
head_level and proto_parameters.attestation_lag plus some slack), it is marked as `Outdated.`Invalid.`Unknown. accordingly.This function is intended to be registered as the Gossipsub validation hook.
val gossipsub_batch_validation :
Node_context.t ->
Tezos_crypto_dal.Cryptobox.t ->
head_level:int32 ->
Tezos_dal_node_services.Types.proto_parameters ->
(Tezos_dal_node_services.Types.Peer.t
* Tezos_dal_node_services.Types.Topic.t
* Tezos_dal_node_services.Types.Message_id.t
* Tezos_dal_node_services.Types.Message.t
* Tezos_dal_node_services.Types.Peer.Set.t)
list ->
[> `Invalid | `Outdated | `Unknown | `Valid ] listgossipsub_batch_validation ctxt cryptobox head_level proto_parameters batch () validates a batch of Gossipsub messages and their associated message ids in the context of the given DAL node.
The validation follows the same layered approach as gossipsub_app_messages_validation except that after checking the age and validity of the id of a message, each message is affected to a sub-batch with only messages for the same level and slot.
The cryptographic verification is then done per sub-batch.
This function is intended to be registered as the Gossipsub batch validation hook.