Fixes #18755
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-
rebroad commented at 6:08 AM on April 25, 2020: contributor
- fanquake added the label P2P on Apr 25, 2020
-
17a1ff0462
Disconnect nodes with bad messages during IBD
Fixes #18755
- rebroad force-pushed on Apr 25, 2020
-
narichvirus1 commented at 7:38 AM on April 25, 2020: none
นัม
- fanquake deleted a comment on Apr 25, 2020
- narichvirus1 approved
-
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?
-
MarcoFalke commented at 1:45 PM on April 25, 2020: member
Also the tests fail
-
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.
-
rebroad commented at 11:29 AM on April 29, 2020: contributor
closing until tests fixed
- rebroad closed this on Apr 29, 2020
- DrahtBot locked this on Feb 15, 2022