Pruned nodes will disconnect peers that are syncing up more than 290 blocks #14508

issue kallewoof opened this issue on October 18, 2018
  1. kallewoof commented at 7:53 AM on October 18, 2018: member

    Right now, nodes which have pruning enabled will drop peers who ask for blocks older than the minimum limit:

    https://github.com/bitcoin/bitcoin/blob/816fab9ccae568612d5ed90378b4587256925a1e/src/net_processing.cpp#L1164-L1173

    However, nodes will also happily ask pruned (limited) peers for blocks beyond this range, despite knowing about it. This results in nodes asking pruned peers for blocks, and promptly being disconnected.

    https://github.com/bitcoin/bitcoin/blob/816fab9ccae568612d5ed90378b4587256925a1e/src/net_processing.cpp#L3693-L3710

    While this is fine and all, it does result in some weird unexpected behavior when a node knows mostly pruned nodes as it will end up inexplicably dropped from a bunch of its peers for no apparent reason.

    I have proposed a fix for this in #14507 which tracks the peer's known best block and avoids asking pruned peers for blocks that would potentially result in violating the limit above, but I figured I should post an issue as well, so we have this tracked.

  2. fanquake added the label P2P on Oct 18, 2018
  3. kallewoof commented at 8:31 AM on January 21, 2020: member

    Don't think anyone cares enough about this to keep this issue open.

  4. kallewoof closed this on Jan 21, 2020

  5. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me