ABCDEFGHIJKLMNOPQRSTUVWXYZAA
1
Libp2p Gossipsub simulation
2
3
Each sheet in this document contains gossip simulation results with raw data and a number of charts illustrating the most significant values
4
Writeup:
https://hackmd.io/ZMBsjqdqSAK026iFFu_2JQ
5
The simulator is implemented in Kotlin on top of JVM-Libp2p library. It is now resides in Libp2p test module as a set of JUnit tests (this is likely subject to change):
6
https://github.com/libp2p/jvm-libp2p/blob/feature/simulator/src/test/kotlin/io/libp2p/simulate/gossip/Simulation1.kt
7
8
Simulation config:
Reference vals
9
totalPeers10000
The total number of nodes in the network
10
badPeers5000
The number of bad peers. Currently the peer is called 'bad' if it doesn't propagate incoming messages
11
gossipD6
Gossip topic stable mesh target count
12
gossipDLow5
Gossip topic stable mesh low watermark
13
gossipDHigh7
Gossip topic stable mesh high watermark
14
gossipDLazy6
Gossip target - number of topic peers (oustide mesh) which the gossip is sent to
15
gossipAdvertise3
Number of windows to gossip about
16
gossipHistory5
Number of heartbeat intervals to retain message IDs
17
gossipHeartbeat1 sec
Frequency of heartbeat
18
avrgMessageSize32Kb
Gossip message payload size used when calculating network traffic
19
topology
The network topology:
20
RandomNPeers(20)
Each peer is randomly connected to other 20 peers
21
latency1 ms
Latency of message propagation through a connection
22
23
Simulation options:
24
warmUpDelay5 sec
Time to rewind before the first message. After building the network the peers need some time to build own gossip meshes
25
zeroHeartbeatsDelay500ms
The time when message may be delivered directly (without gossiping)
26
manyHeartbeatsDelay30 sec
The maximum time the message may be delivered
27
generatedNetworksCount10
The number of random tolopogies generated for each iteration
28
sentMessageCount10
The number of messages sent (from different peers) for each iteration (The total number of messages per iteration would be [generatedNetworksCount] * [sentMessageCount])
29
startRandomSeed0
Random seed. With the same random seed exactly the same behaviour is observed
30
31
32
Simulation results:
33
0-*
The statistics gathered after [zeroHeartbeatsDelay] time passed after message publication
34
N-*
The final statistics (gathered after [manyHeartbeatsDelay] time passed after message publication)
35
36
*-msgCnt
Single peer message count per one publish
37
*-traffic
Single peer traffic in bytes per one publish
38
*-delivered%
%% of peers received the message
39
*-delay(50%)
Median message delivery delay
40
*-delay(95%)
95% percentile message delivery delay
41
*-delay(max)
Max message delivery delay
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100