From 50b00dff7191a31b40310cc016a9543892669d67 Mon Sep 17 00:00:00 2001 From: William Banfield <4561443+williambanfield@users.noreply.github.com> Date: Fri, 9 Jul 2021 17:20:25 -0400 Subject: [PATCH] statesync: keep peer despite lightblock query fail (#6692) When a peer responds with no lightblock for the height we queried, we call the [removePeer method](https://github.com/tendermint/tendermint/blob/master/internal/statesync/reactor.go#L339). This removes the peer from the [dispatcher's list of called peer's](https://github.com/tendermint/tendermint/blob/ad6588315256162a9ef799a5a77ab7237cd46f38/internal/statesync/dispatcher.go#L159). When the dispatcher then receives responses from the removed peer, it [drops their responses](https://github.com/tendermint/tendermint/blob/ad6588315256162a9ef799a5a77ab7237cd46f38/internal/statesync/dispatcher.go#L130). These responses may be meaningful or contain a block or data that will help statesync proceed. [The logs](https://gist.github.com/tychoish/34a1f61eaae3c36c23efc7d0001e805c), when this change is applied, show an additional 3 networking testnets passing. addresses: #6691 --- internal/statesync/reactor.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/internal/statesync/reactor.go b/internal/statesync/reactor.go index 741466743..7bddb0eae 100644 --- a/internal/statesync/reactor.go +++ b/internal/statesync/reactor.go @@ -338,9 +338,6 @@ func (r *Reactor) backfill( if lb == nil { r.Logger.Info("backfill: peer didn't have block, fetching from another peer", "height", height) queue.retry(height) - // as we are fetching blocks backwards, if this node doesn't have the block it likely doesn't - // have any prior ones, thus we remove it from the peer list - r.dispatcher.removePeer(peer) continue }