@@ -20,7 +20,7 @@ class ExperimentParams:
2020
2121
2222def spread_heartbeat_delay (
23- node_count : int , template_gs_params : GossipSubParams
23+ node_count : int , topics : List [ str ], template_gs_params : GossipSubParams
2424) -> List [ScriptInstruction ]:
2525 instructions = []
2626 initial_delay = timedelta (seconds = 0.1 )
@@ -32,7 +32,8 @@ def spread_heartbeat_delay(
3232 instructions .append (
3333 script_instruction .IfNodeIDEquals (
3434 nodeID = i ,
35- instruction = script_instruction .InitGossipSub (gossipSubParams = gs_params ),
35+ # group all the topics in a single bundle
36+ instruction = script_instruction .InitGossipSub (topicBundles = [topics ], gossipSubParams = gs_params ),
3637 )
3738 )
3839 return instructions
@@ -48,9 +49,10 @@ def scenario(
4849 if disable_gossip :
4950 gs_params .Dlazy = 0
5051 gs_params .GossipFactor = 0
51- instructions .extend (spread_heartbeat_delay (node_count , gs_params ))
5252
5353 topic = "a-subnet"
54+ instructions .extend (spread_heartbeat_delay (node_count , [topic ], gs_params ))
55+
5456 blob_count = 48
5557 # According to data gathered by lighthouse, a column takes around
5658 # 5ms.
@@ -78,9 +80,9 @@ def scenario(
7880 if disable_gossip :
7981 gs_params .Dlazy = 0
8082 gs_params .GossipFactor = 0
81- instructions .extend (spread_heartbeat_delay (node_count , gs_params ))
8283 topic_a = "topic-a"
8384 topic_b = "topic-b"
85+ instructions .extend (spread_heartbeat_delay (node_count , [topic_a , topic_b ], gs_params ))
8486 number_of_conns_per_node = 20
8587 if number_of_conns_per_node >= node_count :
8688 number_of_conns_per_node = node_count - 1
0 commit comments