Subconfig.Messageinclude Tezos_base.TzPervasives.PRINTABLE with type t := tval pp : Stdlib.Format.formatter -> t -> unitinclude Tezos_base.TzPervasives.COMPARABLE with type t := tval valid :
?message:t ->
message_id:Message_id.t ->
unit ->
[ `Valid | `Unknown | `Outdated | `Invalid ]valid performs an application layer-level validity check on a message id and a message if given.
The message id (and message if any) could either be `Valid in the current context or `Invalid, meaning that it is/they are not valid (in the present time, in the past and in the future). The application layer could also return `Outdated or `Unknown if the message id is outdated or if the application doesn't care about validity. In this case, the application might omit some costly validity checks.
val valid_batch :
(Peer.t * Topic.t * Message_id.t * t * Peer.Set.t) list ->
[ `Valid | `Unknown | `Outdated | `Invalid ] listvalid_batch performs an application layer-level validity check on a message batch.
If the message_handling field of the gossipsub worker is Sequentially, this function is never called. This function is called when the field is In_batches. However, valid is still called even in this case: since message ids are not batched and valid_batch cannot be called without providing a message, valid remains used when processing message ids without the message, especially the IHave events.
The output is a list of the same length as the input, containing the result for each message of the batch.