From 6bc83348520fe136b456b7598f8e37cb2b66ebd7 Mon Sep 17 00:00:00 2001 From: Manav Darji Date: Fri, 7 Jun 2024 21:57:19 +0530 Subject: [PATCH] eth/fetcher: modify queue limits for improving sync near chain tip (#1260) --- eth/fetcher/block_fetcher.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/eth/fetcher/block_fetcher.go b/eth/fetcher/block_fetcher.go index 1831b756a3..171c02e217 100644 --- a/eth/fetcher/block_fetcher.go +++ b/eth/fetcher/block_fetcher.go @@ -40,10 +40,15 @@ const ( ) const ( - maxUncleDist = 7 // Maximum allowed backward distance from the chain head - maxQueueDist = 32 // Maximum allowed distance from the chain head to queue - hashLimit = 256 // Maximum number of unique blocks or headers a peer may have announced - blockLimit = 64 // Maximum number of unique blocks a peer may have delivered + maxUncleDist = 7 // Maximum allowed backward distance from the chain head + + // maxQueueDist is increased for bor to allow storing more block announcements + // near chain tip + maxQueueDist = 32 * 6 // Maximum allowed distance from the chain head to queue + hashLimit = 256 // Maximum number of unique blocks or headers a peer may have announced + + // blockLimit is increased for bor to allow storing more unique blocks near chain tip + blockLimit = 64 * 3 // Maximum number of unique blocks a peer may have delivered ) var (