2019-08-01 00:09:09 +08:00
|
|
|
from typing import NamedTuple
|
2019-07-27 11:49:03 +08:00
|
|
|
|
|
|
|
FLOODSUB_PROTOCOL_ID = "/floodsub/1.0.0"
|
2019-07-29 12:09:35 +08:00
|
|
|
GOSSIPSUB_PROTOCOL_ID = "/gossipsub/1.0.0"
|
2019-07-27 11:49:03 +08:00
|
|
|
|
2019-08-01 00:09:09 +08:00
|
|
|
|
|
|
|
class GossipsubParams(NamedTuple):
|
|
|
|
degree: int = 10
|
|
|
|
degree_low: int = 9
|
|
|
|
degree_high: int = 11
|
|
|
|
time_to_live: int = 30
|
|
|
|
gossip_window: int = 3
|
|
|
|
gossip_history: int = 5
|
|
|
|
heartbeat_interval: float = 0.5
|
|
|
|
|
|
|
|
|
|
|
|
GOSSIPSUB_PARAMS = GossipsubParams()
|