package tezos-dal-node-lib

  1. Overview
  2. Docs
module Peer : sig ... end
module Topic : sig ... end
module Message_id : sig ... end
module Message : sig ... end
module Time : sig ... end
module Span : sig ... end
module Score : sig ... end
type message = Message.t
type span = Span.t
type state
type add_peer = {
  1. direct : bool;
  2. outbound : bool;
  3. peer : Peer.t;
}
type remove_peer = {
  1. peer : Peer.t;
}
type ihave = {
  1. peer : Peer.t;
  2. topic : Topic.t;
  3. message_ids : Message_id.t list;
}
type iwant = {
  1. peer : Peer.t;
  2. message_ids : Message_id.t list;
}
type graft = {
  1. peer : Peer.t;
  2. topic : Topic.t;
}
type prune = {
  1. peer : Peer.t;
  2. topic : Topic.t;
  3. px : Peer.t Tezos_base.TzPervasives.Seq.t;
  4. backoff : span;
}
type publish_message = {
  1. topic : Topic.t;
  2. message_id : Message_id.t;
  3. message : message;
}
type receive_message = {
  1. sender : Peer.t;
  2. topic : Topic.t;
  3. message_id : Message_id.t;
  4. message : message;
}
type join = {
  1. topic : Topic.t;
}
type leave = {
  1. topic : Topic.t;
}
type subscribe = {
  1. topic : Topic.t;
  2. peer : Peer.t;
}
type unsubscribe = {
  1. topic : Topic.t;
  2. peer : Peer.t;
}
type set_application_score = {
  1. peer : Peer.t;
  2. score : float;
}
type !_ output =
  1. | Ihave_from_peer_with_low_score : {
    1. score : Score.t;
    2. threshold : float;
    } -> [ `IHave ] output
  2. | Too_many_recv_ihave_messages : {
    1. count : int;
    2. max : int;
    } -> [ `IHave ] output
  3. | Too_many_sent_iwant_messages : {
    1. count : int;
    2. max : int;
    } -> [ `IHave ] output
  4. | Message_topic_not_tracked : [ `IHave ] output
  5. | Message_requested_message_ids : Message_id.t list -> [ `IHave ] output
  6. | Invalid_message_id : [ `IHave ] output
  7. | Iwant_from_peer_with_low_score : {
    1. score : Score.t;
    2. threshold : float;
    } -> [ `IWant ] output
  8. | On_iwant_messages_to_route : {
    1. routed_message_ids : [ `Ignored | `Message of message | `Not_found | `Too_many_requests ] Message_id.Map.t;
    } -> [ `IWant ] output
  9. | Peer_filtered : [ `Graft ] output
  10. | Unsubscribed_topic : [ `Graft ] output
  11. | Peer_already_in_mesh : [ `Graft ] output
  12. | Grafting_direct_peer : [ `Graft ] output
  13. | Unexpected_grafting_peer : [ `Graft ] output
  14. | Grafting_peer_with_negative_score : [ `Graft ] output
  15. | Grafting_successfully : [ `Graft ] output
  16. | Peer_backed_off : [ `Graft ] output
  17. | Mesh_full : [ `Graft ] output
  18. | Prune_topic_not_tracked : [ `Prune ] output
  19. | Peer_not_in_mesh : [ `Prune ] output
  20. | Ignore_PX_score_too_low : Score.t -> [ `Prune ] output
  21. | No_PX : [ `Prune ] output
  22. | PX : Peer.Set.t -> [ `Prune ] output
  23. | Publish_message : {
    1. to_publish : Peer.Set.t;
    } -> [ `Publish_message ] output
  24. | Already_published : [ `Publish_message ] output
  25. | Route_message : {
    1. to_route : Peer.Set.t;
    } -> [ `Receive_message ] output
  26. | Already_received : [ `Receive_message ] output
  27. | Not_subscribed : [ `Receive_message ] output
  28. | Invalid_message : [ `Receive_message ] output
  29. | Unknown_validity : [ `Receive_message ] output
  30. | Already_joined : [ `Join ] output
  31. | Joining_topic : {
    1. to_graft : Peer.Set.t;
    } -> [ `Join ] output
  32. | Not_joined : [ `Leave ] output
  33. | Leaving_topic : {
    1. to_prune : Peer.Set.t;
    2. noPX_peers : Peer.Set.t;
    } -> [ `Leave ] output
  34. | Heartbeat : {
    1. to_graft : Topic.Set.t Peer.Map.t;
    2. to_prune : Topic.Set.t Peer.Map.t;
    3. noPX_peers : Peer.Set.t;
    } -> [ `Heartbeat ] output
  35. | Peer_added : [ `Add_peer ] output
  36. | Peer_already_known : [ `Add_peer ] output
  37. | Removing_peer : [ `Remove_peer ] output
  38. | Subscribed : [ `Subscribe ] output
  39. | Subscribe_to_unknown_peer : [ `Subscribe ] output
  40. | Unsubscribed : [ `Unsubscribe ] output
  41. | Unsubscribe_from_unknown_peer : [ `Unsubscribe ] output
  42. | Set_application_score : [ `Set_application_score ] output
val make : Random.State.t -> (Topic.t, Peer.t, Message_id.t, span) Tezos_gossipsub__Gossipsub_intf.limits -> (Peer.t, Message_id.t) Tezos_gossipsub__Gossipsub_intf.parameters -> state
val add_peer : add_peer -> state -> state * [ `Add_peer ] output
val remove_peer : remove_peer -> state -> state * [ `Remove_peer ] output
val handle_subscribe : subscribe -> state -> state * [ `Subscribe ] output
val handle_unsubscribe : unsubscribe -> state -> state * [ `Unsubscribe ] output
val handle_ihave : ihave -> state -> state * [ `IHave ] output
val handle_iwant : iwant -> state -> state * [ `IWant ] output
val handle_graft : graft -> state -> state * [ `Graft ] output
val handle_prune : prune -> state -> state * [ `Prune ] output
val handle_receive_message : receive_message -> state -> state * [ `Receive_message ] output
val publish_message : publish_message -> state -> state * [ `Publish_message ] output
val heartbeat : state -> state * [ `Heartbeat ] output
val join : join -> state -> state * [ `Join ] output
val leave : leave -> state -> state * [ `Leave ] output
val set_application_score : set_application_score -> state -> state * [ `Set_application_score ] output
val select_px_peers : state -> peer_to_prune:Peer.t -> Topic.t -> noPX_peers:Peer.Set.t -> Peer.t list
val select_gossip_messages : state -> ihave list
val pp_add_peer : Format.formatter -> add_peer -> unit
val pp_remove_peer : Format.formatter -> remove_peer -> unit
val pp_ihave : Format.formatter -> ihave -> unit
val pp_iwant : Format.formatter -> iwant -> unit
val pp_graft : Format.formatter -> graft -> unit
val pp_prune : Format.formatter -> prune -> unit
val pp_receive_message : Format.formatter -> receive_message -> unit
val pp_publish_message : Format.formatter -> publish_message -> unit
val pp_join : Format.formatter -> join -> unit
val pp_leave : Format.formatter -> leave -> unit
val pp_subscribe : Format.formatter -> subscribe -> unit
val pp_unsubscribe : Format.formatter -> unsubscribe -> unit
val pp_set_application_score : Format.formatter -> set_application_score -> unit
val pp_output : Format.formatter -> 'a output -> unit
module Introspection : sig ... end
OCaml

Innovation. Community. Security.