From 2fe22c97e68abc54028b02dc563814bebb263937 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Wed, 28 Sep 2022 20:56:04 +0200 Subject: [PATCH] update `PeerScore` comments for non-blocks (#4191) PeerScore is not just updated for blocks but also for LC updates. Make documentation comments more generic. --- beacon_chain/networking/peer_scores.nim | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/beacon_chain/networking/peer_scores.nim b/beacon_chain/networking/peer_scores.nim index 974b0888c..fc6165bfa 100644 --- a/beacon_chain/networking/peer_scores.nim +++ b/beacon_chain/networking/peer_scores.nim @@ -12,7 +12,7 @@ else: const NewPeerScore* = 300 - ## Score which will be assigned to new connected Peer + ## Score which will be assigned to newly connected peer PeerScoreLowLimit* = 0 ## Score after which peer will be kicked PeerScoreHighLimit* = 1000 @@ -23,26 +23,25 @@ const PeerScoreNoStatus* = -100 ## Peer did not answer `status` request. PeerScoreStaleStatus* = -50 - ## Peer's `status` answer do not progress in time. + ## Peer's `status` answer did not progress in time. PeerScoreUseless* = -10 ## Peer's latest head is lower then ours. PeerScoreGoodStatus* = 50 ## Peer's `status` answer is fine. PeerScoreNoBlocks* = -100 - ## Peer did not respond in time on `blocksByRange` request. + ## Peer did not respond in time to a request. PeerScoreGoodBlocks* = 100 - ## Peer's `blocksByRange` answer is fine. + ## Peer's answer to our request is fine. PeerScoreBadBlocks* = -1000 - ## Peer's response contains incorrect blocks. + ## Peer's response contains incorrect data. PeerScoreBadResponse* = -1000 ## Peer's response is not in requested range. PeerScoreMissingBlocks* = -25 - ## Peer response contains too many empty blocks - this can happen either + ## Peer response contains too much missing data - this can happen either ## because a long reorg happened or the peer is falsely trying to convince ## us that a long reorg happened. - ## Peer's `blocksByRange` answer is fine. PeerScoreUnviableFork* = -200 - ## Peer responded with blocks from an unviable fork - are they on a + ## Peer responded with data from an unviable fork - are they on a ## different chain? type