From 1eb0915301105db68238286ef59b788f29cd0b02 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 20 Jan 2021 10:28:12 +0000 Subject: [PATCH] Fix bug from #2163 (#2165) ## Issue Addressed NA ## Proposed Changes Fixes a bug that I missed during a review in #2163. I found this bug by observing that nodes were receiving far less attestations (~1/2 of previous). I'm not certain on *exactly* how this mistake manifested in a reduction in attestations, but the mistake touches so much code that I think it's reasonable to declare that this it the cause of the observed issue (drop in attestations). ## Additional Info NA --- .../eth2_libp2p/src/behaviour/gossipsub_scoring_parameters.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/eth2_libp2p/src/behaviour/gossipsub_scoring_parameters.rs b/beacon_node/eth2_libp2p/src/behaviour/gossipsub_scoring_parameters.rs index ef01f8913..80313938c 100644 --- a/beacon_node/eth2_libp2p/src/behaviour/gossipsub_scoring_parameters.rs +++ b/beacon_node/eth2_libp2p/src/behaviour/gossipsub_scoring_parameters.rs @@ -37,7 +37,7 @@ pub struct PeerScoreSettings { impl PeerScoreSettings { pub fn new(chain_spec: &ChainSpec, gs_config: &GossipsubConfig) -> PeerScoreSettings { - let slot = Duration::from_millis(chain_spec.seconds_per_slot); + let slot = Duration::from_secs(chain_spec.seconds_per_slot); let beacon_attestation_subnet_weight = 1.0 / chain_spec.attestation_subnet_count as f64; let max_positive_score = (MAX_IN_MESH_SCORE + MAX_FIRST_MESSAGE_DELIVERIES_SCORE) * (BEACON_BLOCK_WEIGHT