Assertion `hashPrevBlock == view.GetBestBlock()' failed. Aborted (core dumped) #7258

issue MarcoFalke opened this issue on December 26, 2015
  1. MarcoFalke commented at 6:05 PM on December 26, 2015: member

    Looks like 0.12 (I was running 3cd836c1d855b92e7c73ab31979f471c4f8dad68 ) is writing a "corrupt" block chain.

    Steps to reproduce:

    $ mkdir  /tmp/dir2
    $ ./bitcoin-qt-3cd836c-dirty -testnet -datadir=/tmp/dir2
    $ ./bitcoin-0.11.2/bin/bitcoin-qt -testnet -datadir=/tmp/dir2 -debug -printtoconsole
    
    [...]
    init message: Verifying wallet...
    CDBEnv::Open: LogDir=/tmp/dir2/testnet3/database ErrorFile=/tmp/dir2/testnet3/db.log
    scheduler thread start
    Bound to [::]:18333
    Bound to 0.0.0.0:18333
    Cache configuration:
    * Using 2.0MiB for block index database
    * Using 32.5MiB for chain state database
    * Using 65.5MiB for in-memory UTXO set
    init message: Loading block index...
    Opening LevelDB in /tmp/dir2/testnet3/blocks/index
    Opened LevelDB successfully
    Opening LevelDB in /tmp/dir2/testnet3/chainstate
    Opened LevelDB successfully
    LoadBlockIndexDB: last block file = 0
    LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=609, size=552976, heights=0...608, time=2011-02-02...2012-05-25)
    Checking all blk files are present...
    LoadBlockIndexDB: transaction index disabled
    Initializing databases...
      - Load block from disk: 0.06ms [0.00s]
    bitcoin-qt: main.cpp:1836: bool ConnectBlock(const CBlock&, CValidationState&, CBlockIndex*, CCoinsViewCache&, bool): Assertion `hashPrevBlock == view.GetBestBlock()' failed.
    Aborted (core dumped)
    
  2. MarcoFalke commented at 6:06 PM on December 26, 2015: member

    Seems unrelated to #6196 but possibly related to #6919. So 0.11 should do a -reindex on scrambled data?

  3. pstratem commented at 6:42 PM on December 26, 2015: contributor

    @MarcoFalke obfuscation of the chainstate db in 0.12.0 is not backwards compatible with 0.11.x

    (i've made this same mistake a few times now)

  4. jonasschnelli added the label UTXO Db and Indexes on Dec 27, 2015
  5. MarcoFalke commented at 9:58 PM on January 16, 2016: member

    Should be fixed via #7259

  6. MarcoFalke closed this on Jan 16, 2016

  7. MarcoFalke 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-13 21:15 UTC

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