mirror of
https://github.com/logos-storage/das-research.git
synced 2026-01-07 15:43:08 +00:00
fixup: moving simulator config to resetShape
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
dfacd6bb18
commit
2707269836
@ -22,18 +22,6 @@ class Simulator:
|
|||||||
self.proposerID = 0
|
self.proposerID = 0
|
||||||
self.glob = []
|
self.glob = []
|
||||||
|
|
||||||
# In GossipSub the initiator might push messages without participating in the mesh.
|
|
||||||
# proposerPublishOnly regulates this behavior. If set to true, the proposer is not
|
|
||||||
# part of the p2p distribution graph, only pushes segments to it. If false, the proposer
|
|
||||||
# might get back segments from other peers since links are symmetric.
|
|
||||||
self.proposerPublishOnly = True
|
|
||||||
|
|
||||||
# If proposerPublishOnly == True, this regulates how many copies of each segment are
|
|
||||||
# pushed out by the proposer.
|
|
||||||
# 1: the data is sent out exactly once on rows and once on columns (2 copies in total)
|
|
||||||
# self.shape.netDegree: default behavior similar (but not same) to previous code
|
|
||||||
self.proposerPublishTo = self.shape.netDegree
|
|
||||||
|
|
||||||
def initValidators(self):
|
def initValidators(self):
|
||||||
"""It initializes all the validators in the network."""
|
"""It initializes all the validators in the network."""
|
||||||
self.glob = Observer(self.logger, self.shape)
|
self.glob = Observer(self.logger, self.shape)
|
||||||
@ -132,6 +120,18 @@ class Simulator:
|
|||||||
val.shape.failureRate = shape.failureRate
|
val.shape.failureRate = shape.failureRate
|
||||||
val.shape.chi = shape.chi
|
val.shape.chi = shape.chi
|
||||||
|
|
||||||
|
# In GossipSub the initiator might push messages without participating in the mesh.
|
||||||
|
# proposerPublishOnly regulates this behavior. If set to true, the proposer is not
|
||||||
|
# part of the p2p distribution graph, only pushes segments to it. If false, the proposer
|
||||||
|
# might get back segments from other peers since links are symmetric.
|
||||||
|
self.proposerPublishOnly = True
|
||||||
|
|
||||||
|
# If proposerPublishOnly == True, this regulates how many copies of each segment are
|
||||||
|
# pushed out by the proposer.
|
||||||
|
# 1: the data is sent out exactly once on rows and once on columns (2 copies in total)
|
||||||
|
# self.shape.netDegree: default behavior similar (but not same) to previous code
|
||||||
|
self.proposerPublishTo = self.shape.netDegree
|
||||||
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""It runs the main simulation until the block is available or it gets stucked."""
|
"""It runs the main simulation until the block is available or it gets stucked."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user