Upgrading bitcoin core version after a fork does not validate previous blocks #6376

issue Gabrola opened this issue on July 4, 2015
  1. Gabrola commented at 4:25 AM on July 4, 2015: none

    I was running bitcoin core version 0.9 which accepted an invalid chain not adhering to the BIP66 protocol changes. This prompted me to upgrade immediately, however the new version is taking the already accepted blocks as already verified.

    I suggest some kind of check to be made on the first run of the new version which checks if the version that was last used was one that did not adhere to some protocol changes, it would revalidate the last x-blocks on the disk.

    Not a major issue, but could cause some minor problems in later forks.

  2. laanwj added the label RPC on Jul 6, 2015
  3. laanwj commented at 3:43 PM on July 6, 2015: member

    You can do the following:

    • RPC invalidateblock with the first invalid block, this should make the node end up on the right fork
    • RPC invalidateblock then reconsiderblock of the last valid block (or one before there), this will cause the blocks after that to be rechecked
  4. Gabrola commented at 3:00 AM on July 7, 2015: none

    I'm aware of being able to do this manually. My proposal is to automatically run something similar to verifychain on the first-run of a new version following a fork.

  5. laanwj commented at 8:12 AM on July 7, 2015: member

    Right - there's obviously a limit to automatically detecting forks which are already behind you, but maybe functionality like that could be added to the startup checkblocks check, which already descends a certain depth into the chain.

  6. Sjors commented at 7:17 PM on March 16, 2018: member

    This was handled better with SegWit IIRC, @sdaftuar?

  7. sdaftuar commented at 1:59 PM on March 17, 2018: member

    Yes I think we can close this issue now. A comment memorializing this concern was added in #11737.

  8. fanquake closed this on Mar 17, 2018

  9. MarcoFalke added the label Consensus on Mar 17, 2018
  10. MarcoFalke removed the label RPC/REST/ZMQ on Mar 17, 2018
  11. DrahtBot locked this on Sep 8, 2021

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-26 03:16 UTC

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