Allow a block to be "fully" reconsidered #18701

issue rebroad opened this issue on April 19, 2020
  1. rebroad commented at 2:25 AM on April 19, 2020: contributor

    Currently the reconsider logic doesn't fully reconsider a block it seems, at least not enough for the situation I created.

    I was tinkering with the code, and I allowed ConnectBlock() to abort half-way through, but return true, so that ConnectTip() processed it as if ConnectBlock() was successful.

    However, now the chain is being marked as invalid due to ConnectBlock() reporting inputs missing/spent on that same block.

    I have tried marking it invalid (via RPC), asking it to be reconsidered, and even creating a new rpc to mark the block as not HAVE_DATA so that it got re-downloaded. All of these still end up with the inputs missing/spent issue.

    Any ideas on how to allow the chain to continue downloading, aside from starting from genesis again?

    Thank you!

  2. rebroad added the label Feature on Apr 19, 2020
  3. fanquake removed the label Feature on Apr 19, 2020
  4. fjahr commented at 3:26 PM on April 22, 2020: member

    It sounds like you have created an inconsistent state, basically simulating corrupted data on disk. I would try to use -reindex first but I think that won't be enough and you need to delete the blk*.dat file that the block in question is in and then use -reindex.

    Edit: Sorry, I realized I am not sure if this is a feature request or if you just needed help. The title sounds like a feature request but the description only talks about the problem. Let me know if you are looking for a different solution than I described and how that should look like when implemented.

  5. MarcoFalke commented at 4:13 PM on April 22, 2020: member

    This is not a support channel for modifications of Bitcoin Core.

  6. MarcoFalke closed this on Apr 22, 2020

  7. rebroad commented at 5:07 PM on March 19, 2021: contributor

    @MarcoFalke I think I discovered the cause. I was running v0.14.2, then ran a later version which upgraded the chainstate, and then when running v0.14.2 again it gives these errors.

  8. DrahtBot locked this on Aug 18, 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