Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
don't ban peers when loading pre-sapling (and pre-blossom) blocks #3670
While syncing the mainnet blockchain from scratch, after reaching the Overwinter activation height, many instances of this began appearing in
Many peers were banned, causing the peer count to become very low, such as 1 or even zero for some time. Sync progress was very slow, but didn't permanently stop and eventually reached Sapling activation with no manual intervention.
Once sync had reached Sapling activation height, the messages (and banning) stopped, and sync rate increased.
This is the same problem that we fixed in #3410, except that fix only applied to pre-Overwinter transactions.
This fix also looks ahead one network upgrade (blossom), and prevents this problem from happening when syncing with pre-blossom (but post-sapling) blocks. Unfortunately, given the way the code is currently structured, there is no easy way to fix this now permanently for all future NUs. So we will encounter this problem again after whatever follows blossom activates.