From 2cd627f21a5ccf972d93a5fe6ea126a17aeaf16b Mon Sep 17 00:00:00 2001 From: Giovanni Petrantoni <7008900+sinkingsugar@users.noreply.github.com> Date: Tue, 2 Feb 2021 23:59:18 +0900 Subject: [PATCH] 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 --- beacon_chain/eth2_network.nim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/beacon_chain/eth2_network.nim b/beacon_chain/eth2_network.nim index 522eea3b4..962e5fae5 100644 --- a/beacon_chain/eth2_network.nim +++ b/beacon_chain/eth2_network.nim @@ -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,