diff --git a/Dockerfile b/Dockerfile index c6802506af..48bc652dcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ RUN /dist/files/build/install.sh \ -b "${BRANCH}" \ -s "${SHA}" -FROM debian:bookworm-20230703-slim as final +FROM debian:bookworm-20240311-slim as final ENV PATH="/node/bin:${PATH}" ALGOD_PORT="8080" KMD_PORT="7833" ALGORAND_DATA="/algod/data" diff --git a/buildnumber.dat b/buildnumber.dat index 573541ac97..d00491fd7e 100644 --- a/buildnumber.dat +++ b/buildnumber.dat @@ -1 +1 @@ -0 +1 diff --git a/catchup/catchpointService.go b/catchup/catchpointService.go index 3c11d0db73..3954c1cd6c 100644 --- a/catchup/catchpointService.go +++ b/catchup/catchpointService.go @@ -824,6 +824,8 @@ func (cs *CatchpointCatchupService) checkLedgerDownload() error { if err == nil { return nil } + // a non-nil error means that the catchpoint is not available, so we should rank it accordingly + cs.blocksDownloadPeerSelector.rankPeer(psp, peerRankNoCatchpointForRound) } return fmt.Errorf("checkLedgerDownload(): catchpoint '%s' unavailable from peers: %s", cs.stats.CatchpointLabel, err) } diff --git a/catchup/peerSelector.go b/catchup/peerSelector.go index 05556bb24b..a8eefb0958 100644 --- a/catchup/peerSelector.go +++ b/catchup/peerSelector.go @@ -55,6 +55,10 @@ const ( // This indicates a peer is either behind or a block has not happened yet, or does not have a block that is old enough. peerRankNoBlockForRound = 2000 + // peerRankNoCatchpointForRound is used for responses failed because of no catchpoint for round + // This indicates a peer is either behind or a catchpoint has not been produced, or this node did not retain this catchpoint (aged out). + peerRankNoCatchpointForRound = 2000 + // peerRankDownloadFailed is used for responses which could be temporary, such as missing files, or such that we don't // have clear resolution peerRankDownloadFailed = 10000