Disconnect nodes with bad messages during IBD #18760

pull rebroad wants to merge 1 commits into bitcoin:master from rebroad:IBDDisconnectBadChecksum changing 1 files +10 −2
  1. rebroad commented at 6:08 AM on April 25, 2020: contributor

    Fixes #18755

  2. fanquake added the label P2P on Apr 25, 2020
  3. Disconnect nodes with bad messages during IBD
    Fixes #18755
    17a1ff0462
  4. rebroad force-pushed on Apr 25, 2020
  5. narichvirus1 commented at 7:38 AM on April 25, 2020: none

    นัม

  6. fanquake deleted a comment on Apr 25, 2020
  7. narichvirus1 approved
  8. MarcoFalke commented at 11:43 AM on April 25, 2020: member

    Can you explain why you'd want to disconnect a good peer during ibd when there was a bit flip during transmission?

  9. MarcoFalke commented at 1:45 PM on April 25, 2020: member

    Also the tests fail

  10. rebroad commented at 4:40 PM on April 27, 2020: contributor

    Also the tests fail

    Thank you. I'll look into this.

    Can you explain why you'd want to disconnect a good peer during ibd when there was a bit flip during transmission?

    because it fixes the issue #18755 in the simplest way possible is the short answer. What would you prefer as a solution?

    The only other options I can see, which is more complex, would be to keep some connected nodes on standby, not downloading during the IBD, so that when something like this happens, they can be ready to respond and provide the blocks needed most urgently (in order not to delay IBD), as the other nodes downloading will be queued up to download more recent blocks.

    Another option, less ideal but simpler, would be to identify the block that failed, and immediately class it as no longer in flight, so that it gets added to the download queue again, albeit delayed as it will need to wait for the more recent blocks to have downloaded first.

    This solution (in this pull request) assumes there is little value in keeping the node that delivered the corrupted block connected. Is there a value in keeping the connection open that I am not aware of?

    For example, there are already places in the code where the simplest way to deal with things is disconnection, e.g. when blocks are requested that have been pruned, and probably other examples also, so disconnection already seems to be an accepted practice in order to expedite IBD when things go wrong.

  11. rebroad commented at 11:29 AM on April 29, 2020: contributor

    closing until tests fixed

  12. rebroad closed this on Apr 29, 2020

  13. 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-22 18:14 UTC

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