From 3d45c0575a4d82e9868dedac9aa2a1a918a21077 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 21 Mar 2024 04:55:29 +0100 Subject: [PATCH] avoid resetting chain stall detection on lag spike (#6115) During lag spike, e.g., from state replays, peer count can temporarily drop significantly. Should not have to wait another 60 minutes in that situation just to be back where one started. --- beacon_chain/validators/beacon_validators.nim | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index 73d6d1edda..0514beac98 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -258,10 +258,9 @@ proc syncStatus*(node: BeaconNode, head: BlockRef): ChainSyncStatus = let numPeers = len(node.network.peerPool) if numPeers <= node.config.maxPeers div 4: - # We may have poor connectivity, wait until more peers are available - warn "Chain appears to have stalled, but have low peers", - numPeers, maxPeers = node.config.maxPeers - node.dag.resetChainProgressWatchdog() + # We may have poor connectivity, wait until more peers are available. + # This could also be intermittent, as state replays while chain is degraded + # may take significant amounts of time, during which many peers are lost return ChainSyncStatus.Syncing let