add simple gossipsub error model
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
5aa364db8f
commit
80409802f9
|
@ -129,6 +129,8 @@ class Simulator:
|
|||
if not nx.is_connected(G):
|
||||
self.logger.error("Graph not connected for row %d !" % id, extra=self.format)
|
||||
for u, v in G.edges:
|
||||
if (random.randint(0,99) < self.config.gsEdgeFailureRate):
|
||||
continue
|
||||
val1=rowChannels[id][u]
|
||||
val2=rowChannels[id][v]
|
||||
val1.rowNeighbors[id].update({val2.ID : Neighbor(val2, 0, self.shape.blockSize)})
|
||||
|
@ -145,6 +147,8 @@ class Simulator:
|
|||
if not nx.is_connected(G):
|
||||
self.logger.error("Graph not connected for column %d !" % id, extra=self.format)
|
||||
for u, v in G.edges:
|
||||
if (random.randint(0,99) < self.config.gsEdgeFailureRate):
|
||||
continue
|
||||
val1=columnChannels[id][u]
|
||||
val2=columnChannels[id][v]
|
||||
val1.columnNeighbors[id].update({val2.ID : Neighbor(val2, 1, self.shape.blockSize)})
|
||||
|
|
|
@ -48,6 +48,9 @@ blockSizes = range(32,65,16)
|
|||
# Per-topic mesh neighborhood size
|
||||
netDegrees = range(6, 9, 2)
|
||||
|
||||
# percentage of GossipSub mesh link failures
|
||||
gsEdgeFailureRate = 0
|
||||
|
||||
# number of rows and columns a validator is interested in
|
||||
chis = range(2, 5, 2)
|
||||
|
||||
|
|
Loading…
Reference in New Issue