Ability to recover a broken blockchain #19121

issue arbitrary-dev opened this issue on May 31, 2020
  1. arbitrary-dev commented at 8:37 AM on May 31, 2020: none

    Is your feature request related to a problem? Please describe.

    I'm always frustrated when almost half of a blockchain was downloaded and verified, and then happens a failure in a single block, which prevents the sync from proceeding forward…

    2020-05-31T07:54:31Z Bitcoin Core version v0.19.0.1-gentoo (release build)
    ...
    2020-05-31T07:54:40Z Loaded best chain: hashBestChain=000000000000000000be77bcc38cab3ec75b1918c4ce20904c9e48bacfd842c6 height=468087 date=2017-05-25T15:41:40Z progress=0.418393
    2020-05-31T07:54:40Z init message: Rewinding blocks...
    2020-05-31T07:54:41Z init message: Verifying blocks...
    2020-05-31T07:54:41Z Verifying last 6 blocks at level 3
    2020-05-31T07:54:41Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].
    2020-05-31T07:54:42Z No coin database inconsistencies in last 6 blocks (14028 transactions)
    ...
    2020-05-31T07:54:42Z init message: Loading P2P addresses...
    2020-05-31T07:54:42Z *** Corrupt block found indicating potential hardware failure; shutting down
    2020-05-31T07:54:42Z Error: A fatal internal error occurred, see debug.log for details
    2020-05-31T07:54:42Z ERROR: ConnectTip: ConnectBlock 0000000000000000006338960b86655b587e2bdf12655041375707807ac84c7d failed, bad-txnmrklroot, hashMerkleRoot mismatch (code 16)
    2020-05-31T07:54:42Z Failed to connect best block (bad-txnmrklroot, hashMerkleRoot mismatch (code 16))
    

    Describe the solution you'd like

    I'd like to have a setting in bitcoind that would allow for the offending block removal and re-downloading.

    Describe alternatives you've considered

    Manually fixing something in local LevelDB files.

    Additional context

    • Seems to be a common issue among bitcoin newbies
    • #11576
    • Hardware could fail
    • I use cheap microSD card for storing the blockchain
  2. arbitrary-dev added the label Feature on May 31, 2020
  3. MarcoFalke commented at 10:38 AM on May 31, 2020: member

    I don't think someone is going to write code to detect a bit flip in a block, to delete the block, then download it again. And for some other files (like wallet.dat or some parts of the utxo set) errors are not recoverable or at least not detectable without additional checksums/error correction.

    If you want your wallet.dat to stay intact and run Bitcoin Core without consensus failures, I recommend using appropriate hardware.

  4. MarcoFalke closed this on May 31, 2020

  5. kantornnam commented at 11:27 AM on May 31, 2020: none

    KNnam

    ในวันที่ อา. 31 พ.ค. 2020 15:41 น. arbitrary-dev notifications@github.com เขียนว่า:

    Is your feature request related to a problem? Please describe.

    I'm always frustrated when almost half of a blockchain was downloaded and verified, and then happens a failure in a single block, which prevents the sync from proceeding forward…

    2020-05-31T07:54:31Z Bitcoin Core version v0.19.0.1-gentoo (release build)

    ...

    2020-05-31T07:54:40Z Loaded best chain: hashBestChain=000000000000000000be77bcc38cab3ec75b1918c4ce20904c9e48bacfd842c6 height=468087 date=2017-05-25T15:41:40Z progress=0.418393

    2020-05-31T07:54:40Z init message: Rewinding blocks...

    2020-05-31T07:54:41Z init message: Verifying blocks...

    2020-05-31T07:54:41Z Verifying last 6 blocks at level 3

    2020-05-31T07:54:41Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].

    2020-05-31T07:54:42Z No coin database inconsistencies in last 6 blocks (14028 transactions)

    ...

    2020-05-31T07:54:42Z init message: Loading P2P addresses...

    2020-05-31T07:54:42Z *** Corrupt block found indicating potential hardware failure; shutting down

    2020-05-31T07:54:42Z Error: A fatal internal error occurred, see debug.log for details

    2020-05-31T07:54:42Z ERROR: ConnectTip: ConnectBlock 0000000000000000006338960b86655b587e2bdf12655041375707807ac84c7d failed, bad-txnmrklroot, hashMerkleRoot mismatch (code 16)

    2020-05-31T07:54:42Z Failed to connect best block (bad-txnmrklroot, hashMerkleRoot mismatch (code 16))

    Describe the solution you'd like

    I'd like to have a setting in bitcoind that would allow for local block removal and re-downloading.

    Describe alternatives you've considered

    Manually fixing something in local LevelDB files.

    Additional context

    — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/issues/19121, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOXMTYYFOBNIIHQZTEDKQILRUIJZZANCNFSM4NPCEAYQ .

  6. arbitrary-dev commented at 6:44 AM on June 1, 2020: none

    Very sad, 42% into the chain, and… I've done a complete FS check for data errors, and all files are reported as healthy according to their checksums. Also did an extended testing of CPU & memory on my machine and it reported 100% health :thinking:

  7. 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-26 06:14 UTC

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