123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153(*****************************************************************************)(* *)(* Open Source License *)(* Copyright (c) 2023 Nomadic Labs, <contact@nomadic-labs.com> *)(* Copyright (c) 2023 Functori, <contact@functori.com> *)(* *)(* Permission is hereby granted, free of charge, to any person obtaining a *)(* copy of this software and associated documentation files (the "Software"),*)(* to deal in the Software without restriction, including without limitation *)(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *)(* and/or sell copies of the Software, and to permit persons to whom the *)(* Software is furnished to do so, subject to the following conditions: *)(* *)(* The above copyright notice and this permission notice shall be included *)(* in all copies or substantial portions of the Software. *)(* *)(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*)(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *)(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *)(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*)(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *)(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *)(* DEALINGS IN THE SOFTWARE. *)(* *)(*****************************************************************************)(** This module defines the default values for simple Gossip parameters and
limits. These values are used or re-defined in the DAL node before
instantiating the Gossipsub worker. *)moduleSpan=Gs_interface.Span(* FIXME: https://gitlab.com/tezos/tezos/-/issues/5559
Document why we choose these default values for GS parameters.
Note: The current default value was copied from The Go implementation *)moduleTopic_score=structlettime_in_mesh_weight=1.0lettime_in_mesh_cap=3600.0lettime_in_mesh_quantum=Span.of_float_s1.0letfirst_message_deliveries_weight=1.0letfirst_message_deliveries_cap=2000letfirst_message_deliveries_decay=0.5(* This part of the score is deactivated because we cannot predict a
delivery weight. *)letmesh_message_deliveries_weight=0.letmesh_message_deliveries_window=Span.of_float_s0.01letmesh_message_deliveries_activation=Span.of_int_s5letmesh_message_deliveries_cap=100letmesh_message_deliveries_threshold=20letmesh_message_deliveries_decay=0.5(* This part of the score is deactivated because we cannot predict a
delivery weight. *)letmesh_failure_penalty_weight=0.letmesh_failure_penalty_decay=0.5letinvalid_message_deliveries_weight=~-.1.letinvalid_message_deliveries_decay=0.3endmoduleScore=structlettopic_score_cap=Some3600.letbehaviour_penalty_weight=~-.10.0letbehaviour_penalty_threshold=0.0letbehaviour_penalty_decay=0.2letapp_specific_weight=10.letdecay_zero=0.1endmoduleLimits=structletmax_recv_ihave_per_heartbeat=10letmax_sent_iwant_per_heartbeat=5000letmax_gossip_retransmission=3letdegree_optimal=6letpublish_threshold=0.letgossip_threshold=0.letdo_px=trueletpeers_to_px=16letaccept_px_threshold=0.letunsubscribe_backoff=Span.of_int_s10letgraft_flood_threshold=Span.of_int_s10letprune_backoff=Span.of_int_s60letretain_duration=Span.of_int_s10letfanout_ttl=Span.of_int_s60letheartbeat_interval=Span.of_int_s1letbackoff_cleanup_ticks=15letscore_cleanup_ticks=1letdegree_low=5letdegree_high=12letdegree_score=4letdegree_out=2letdegree_lazy=6letgossip_factor=0.25lethistory_length=5lethistory_gossip_length=3letopportunistic_graft_ticks=60Lletopportunistic_graft_peers=2letopportunistic_graft_threshold=1.letseen_history_length=120endmodulePeer_filter=structletpeer_filter_peer_action=trueend