hotfix gossip scoring (#2286)

* hotfix gossip scoring

* skip gossip scoring parameters validation as they violate for now (but does not matter cos we don't score)

* workaround again gossip validation
This commit is contained in:
Giovanni Petrantoni 2021-02-02 23:59:18 +09:00 committed by GitHub
parent 707fcd99cb
commit 2cd627f21a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -1568,7 +1568,6 @@ proc createEth2Node*(rng: ref BrHmacDrbgContext,
p.historyGossip = 3
p.seenTTL = 385.seconds
p.gossipFactor = 0.05
p.validateParameters().tryGet()
p
pubsub = GossipSub.init(
switch = switch,
@ -1579,6 +1578,14 @@ proc createEth2Node*(rng: ref BrHmacDrbgContext,
anonymize = true,
parameters = params)
# disable any extra scoring weight
# do this after validation (done inside init())
# this is a scoring violation for validation
# but we don't want to use scores for now
pubsub.parameters.behaviourPenaltyWeight = 0.0
pubsub.parameters.appSpecificWeight = 0.0
pubsub.parameters.ipColocationFactorWeight = 0.0
switch.mount(pubsub)
result = Eth2Node.init(conf, enrForkId, switch, pubsub,