Failing to disconnect a block should result in node shutdown #14341

issue sdaftuar openend this issue on September 27, 2018
  1. sdaftuar commented at 5:04 pm on September 27, 2018: member

    I think that if a reorg fails due to an error while disconnecting blocks, the node should shut down.

    My thought is that if we are trying to switch to a more work chain and something goes wrong before we can even try to validate that more-work chain, then we have a problem that is not related to the chain we’re trying to switch to but instead related to our own hardware or software; shutting down and having the user deal with the issue is better than continuing on, when we know there’s a more work chain that we’re unable to try validating.

    This has recently come up on testnet, where unpatched nodes are unable to reorg from the invalid chain containing the duplicate-input-in-a-transaction block, but rather than crash or shutdown they are continuing on the invalid chain, with messages like this in the debug log:

    0ERROR: DisconnectTip(): DisconnectBlock 00000000210004840364b52bc5e455d888f164e4264a4fec06a514b67e9d5722 failed
    
  2. domob1812 commented at 6:25 am on October 1, 2018: contributor
    Indeed. As you say, this failure then has nothing to do with the new chain, but instead means that we have an inconsistent internal state (somehow). In other situations where this happens, the node already shuts down.
  3. MarcoFalke added the label Consensus on Oct 20, 2018
  4. MarcoFalke added the label Brainstorming on Oct 20, 2018
  5. HashUnlimited commented at 3:01 pm on October 20, 2018: contributor
    Alright, it has already been discovered, didn’t stumble over this one earlier. Is the invalid chain still around anywhere on testnet? As we have seen on several chains out in the wild, this can cause a whole network to freeze because once we actually do have a longer chain, wrong nodes aren’t banned and there for nothing even gets relayed anymore.
  6. fanquake closed this on Jul 25, 2019

  7. fanquake referenced this in commit d5a54ce8f0 on Jul 25, 2019
  8. sidhujag referenced this in commit fd15183645 on Jul 29, 2019
  9. PastaPastaPasta referenced this in commit 3b2b94249a on Jun 27, 2021
  10. PastaPastaPasta referenced this in commit 95c1f3f244 on Jun 28, 2021
  11. PastaPastaPasta referenced this in commit 780d01110d on Jun 29, 2021
  12. PastaPastaPasta referenced this in commit 6ad276567d on Jul 1, 2021
  13. PastaPastaPasta referenced this in commit 0cbf492788 on Jul 1, 2021
  14. PastaPastaPasta referenced this in commit cb15f42793 on Jul 12, 2021
  15. PastaPastaPasta referenced this in commit db4c8cf41e on Jul 13, 2021
  16. DrahtBot locked this on Dec 16, 2021
  17. gades referenced this in commit 6f34eb0cd5 on Apr 19, 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: 2024-10-04 22:12 UTC

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