mirror of https://github.com/waku-org/nwaku.git
using libp2p defaults for parameters not specified
This commit is contained in:
parent
76dbee4b45
commit
7dd1b8540e
|
@ -60,58 +60,59 @@ const TopicParameters = TopicParams(
|
||||||
)
|
)
|
||||||
|
|
||||||
# see: https://rfc.vac.dev/spec/29/#gossipsub-v10-parameters
|
# see: https://rfc.vac.dev/spec/29/#gossipsub-v10-parameters
|
||||||
const GossipsubParameters = GossipSubParams(
|
|
||||||
explicit: true,
|
const GossipsubParameters = GossipSubParams.init(
|
||||||
pruneBackoff: chronos.minutes(1),
|
explicit = true,
|
||||||
unsubscribeBackoff: chronos.seconds(5),
|
pruneBackoff = chronos.minutes(1),
|
||||||
floodPublish: true,
|
unsubscribeBackoff = chronos.seconds(5),
|
||||||
gossipFactor: 0.25,
|
floodPublish = true,
|
||||||
d: 6,
|
gossipFactor = 0.25,
|
||||||
dLow: 4,
|
d = 6,
|
||||||
dHigh: 8,
|
dLow = 4,
|
||||||
dScore: 6,
|
dHigh = 8,
|
||||||
dOut: 3,
|
dScore = 6,
|
||||||
dLazy: 6,
|
dOut = 3,
|
||||||
heartbeatInterval: chronos.seconds(1),
|
dLazy = 6,
|
||||||
historyLength: 6,
|
heartbeatInterval = chronos.seconds(1),
|
||||||
historyGossip: 3,
|
historyLength = 6,
|
||||||
fanoutTTL: chronos.minutes(1),
|
historyGossip = 3,
|
||||||
seenTTL: chronos.minutes(2),
|
fanoutTTL = chronos.minutes(1),
|
||||||
|
seenTTL = chronos.minutes(2),
|
||||||
|
|
||||||
# no gossip is sent to peers below this score
|
# no gossip is sent to peers below this score
|
||||||
gossipThreshold: -100,
|
gossipThreshold = -100,
|
||||||
|
|
||||||
# no self-published msgs are sent to peers below this score
|
# no self-published msgs are sent to peers below this score
|
||||||
publishThreshold: -1000,
|
publishThreshold = -1000,
|
||||||
|
|
||||||
# used to trigger disconnections + ignore peer if below this score
|
# used to trigger disconnections + ignore peer if below this score
|
||||||
graylistThreshold: -10000,
|
graylistThreshold = -10000,
|
||||||
|
|
||||||
# grafts better peers if the mesh median score drops below this. unset.
|
# grafts better peers if the mesh median score drops below this. unset.
|
||||||
opportunisticGraftThreshold: 0,
|
opportunisticGraftThreshold = 0,
|
||||||
|
|
||||||
# how often peer scoring is updated
|
# how often peer scoring is updated
|
||||||
decayInterval: chronos.seconds(12),
|
decayInterval = chronos.seconds(12),
|
||||||
|
|
||||||
# below this we consider the parameter to be zero
|
# below this we consider the parameter to be zero
|
||||||
decayToZero: 0.01,
|
decayToZero = 0.01,
|
||||||
|
|
||||||
# remember peer score during x after it disconnects
|
# remember peer score during x after it disconnects
|
||||||
retainScore: chronos.minutes(10),
|
retainScore = chronos.minutes(10),
|
||||||
|
|
||||||
# p5: application specific, unset
|
# p5: application specific, unset
|
||||||
appSpecificWeight: 0.0,
|
appSpecificWeight = 0.0,
|
||||||
|
|
||||||
# p6: penalizes peers sharing more than threshold ips
|
# p6: penalizes peers sharing more than threshold ips
|
||||||
ipColocationFactorWeight: -50.0,
|
ipColocationFactorWeight = -50.0,
|
||||||
ipColocationFactorThreshold: 5.0,
|
ipColocationFactorThreshold = 5.0,
|
||||||
|
|
||||||
# p7: penalizes bad behaviour (weight and decay)
|
# p7: penalizes bad behaviour (weight and decay)
|
||||||
behaviourPenaltyWeight: -10.0,
|
behaviourPenaltyWeight = -10.0,
|
||||||
behaviourPenaltyDecay: 0.986,
|
behaviourPenaltyDecay = 0.986,
|
||||||
|
|
||||||
# triggers disconnections of bad peers aka score <graylistThreshold
|
# triggers disconnections of bad peers aka score <graylistThreshold
|
||||||
disconnectBadPeers: true,
|
disconnectBadPeers = true,
|
||||||
)
|
)
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
Loading…
Reference in New Issue