lightning-power-users / node-launcher

Easiest Bitcoin Lightning desktop app, for Windows, macOS, and Linux
MIT License
357 stars 67 forks source link

2019-01-12T02:25:07Z ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=10114) #118

Open JamesTwitter opened 5 years ago

JamesTwitter commented 5 years ago

Does anyone have any idea how to debug this? I have no idea where to begin whatsoever. Any help would be greatly appreciated. I would love to have a lightning node running. :)

This error occurs when I click "launch bitcoin"

I am running the most recent version of Bitcoin Core on OSX, fully synced.

I have included the debug.log notes below:

2019-01-12T02:25:00Z Bitcoin Core version v0.17.1 (release build) 2019-01-12T02:25:00Z InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1 2019-01-12T02:25:00Z Assuming ancestors of block 0000000000000000002e63058c023a9a1de233554f28c7b21380b6c9003f36a8 have valid signatures. 2019-01-12T02:25:00Z Setting nMinimumChainWork=0000000000000000000000000000000000000000028822fef1c230963535a90d 2019-01-12T02:25:00Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation 2019-01-12T02:25:00Z Using RdRand as an additional entropy source 2019-01-12T02:25:00Z Default data directory /Users/anonanon1/Library/Application Support/Bitcoin 2019-01-12T02:25:00Z Using data directory /Users/anonanon1/Library/Application Support/Bitcoin/ 2019-01-12T02:25:00Z Using config file /Users/anonanon1/Library/Application Support/Bitcoin/bitcoin.conf 2019-01-12T02:25:00Z Using at most 125 automatic connections (2560 file descriptors available) 2019-01-12T02:25:00Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements 2019-01-12T02:25:00Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements 2019-01-12T02:25:00Z Using 8 threads for script verification 2019-01-12T02:25:00Z scheduler thread start 2019-01-12T02:25:00Z HTTP: creating work queue of depth 16 2019-01-12T02:25:00Z Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcauth for rpcauth auth generation. 2019-01-12T02:25:00Z HTTP: starting 4 worker threads 2019-01-12T02:25:00Z Cache configuration: 2019-01-12T02:25:00Z Using 2.0MiB for block index database 2019-01-12T02:25:00Z Using 899.1MiB for transaction index database 2019-01-12T02:25:00Z Using 8.0MiB for chain state database 2019-01-12T02:25:00Z Using 6285.9MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space) 2019-01-12T02:25:00Z init message: Loading block index... 2019-01-12T02:25:00Z Opening LevelDB in /Users/anonanon1/Library/Application Support/Bitcoin/blocks/index 2019-01-12T02:25:00Z Opened LevelDB successfully 2019-01-12T02:25:00Z Using obfuscation key for /Users/anonanon1/Library/Application Support/Bitcoin/blocks/index: 0000000000000000 2019-01-12T02:25:03Z LoadBlockIndexDB: last block file = 1492 2019-01-12T02:25:03Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=63, size=55997430, heights=558101...558163, time=2019-01-11...2019-01-12) 2019-01-12T02:25:03Z Checking all blk files are present... 2019-01-12T02:25:03Z Opening LevelDB in /Users/anonanon1/Library/Application Support/Bitcoin/chainstate 2019-01-12T02:25:03Z Opened LevelDB successfully 2019-01-12T02:25:03Z Using obfuscation key for /Users/anonanon1/Library/Application Support/Bitcoin/chainstate: b1c836836e420d69 2019-01-12T02:25:04Z Loaded best chain: hashBestChain=0000000000000000001846269cbe6c39f4b5dad46977b41744e89329c38c5f41 height=558163 date=2019-01-12T02:16:08Z progress=0.999997 2019-01-12T02:25:04Z init message: Rewinding blocks... 2019-01-12T02:25:05Z init message: Verifying blocks... 2019-01-12T02:25:05Z Verifying last 6 blocks at level 3 2019-01-12T02:25:05Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE]. 2019-01-12T02:25:07Z No coin database inconsistencies in last 6 blocks (10841 transactions) 2019-01-12T02:25:07Z block index 6798ms 2019-01-12T02:25:07Z Opening LevelDB in /Users/anonanon1/Library/Application Support/Bitcoin/indexes/txindex 2019-01-12T02:25:07Z Opened LevelDB successfully 2019-01-12T02:25:07Z Using obfuscation key for /Users/anonanon1/Library/Application Support/Bitcoin/indexes/txindex: 0000000000000000 2019-01-12T02:25:07Z Wallet disabled! 2019-01-12T02:25:07Z txindex thread start 2019-01-12T02:25:07Z Syncing txindex with block chain from height 2 2019-01-12T02:25:07Z mapBlockIndex.size() = 558186 2019-01-12T02:25:07Z nBestHeight = 558163 2019-01-12T02:25:07Z AddLocal([2601:642:c400:f45:881:cfcf:4ca5:a95d]:8333,1) 2019-01-12T02:25:07Z Discover: IPv6 en0: 2601:642:c400:f45:881:cfcf:4ca5:a95d 2019-01-12T02:25:07Z torcontrol thread start 2019-01-12T02:25:07Z AddLocal([2601:642:c400:f45:55ab:e320:b50d:b345]:8333,1) 2019-01-12T02:25:07Z Discover: IPv6 en0: 2601:642:c400:f45:55ab:e320:b50d:b345 2019-01-12T02:25:07Z AddLocal([2601:642:c400:f45::8fc5]:8333,1) 2019-01-12T02:25:07Z Discover: IPv6 en0: 2601:642:c400:f45::8fc5 2019-01-12T02:25:07Z Bound to [::]:8333 2019-01-12T02:25:07Z Bound to 0.0.0.0:8333 2019-01-12T02:25:07Z init message: Loading P2P addresses... 2019-01-12T02:25:07Z Leaving InitialBlockDownload (latching to false) 2019-01-12T02:25:07Z ERROR: ReadBlockFromDisk: Errors in block header at CBlockDiskPos(nFile=0, nPos=10114) 2019-01-12T02:25:07Z *** ThreadSync: Failed to read block 00000000ac21f2862aaab177fd3c5c8b395de842f84d88c9cf3420b2d393e550 from disk 2019-01-12T02:25:07Z Loaded 70435 addresses from peers.dat 279ms 2019-01-12T02:25:07Z init message: Loading banlist... 2019-01-12T02:25:07Z init message: Starting network threads... 2019-01-12T02:25:07Z net thread start 2019-01-12T02:25:07Z dnsseed thread start 2019-01-12T02:25:07Z addcon thread start 2019-01-12T02:25:07Z init message: Done loading 2019-01-12T02:25:07Z msghand thread start 2019-01-12T02:25:07Z opencon thread start 2019-01-12T02:25:07Z GUI: Platform customization: "macosx" 2019-01-12T02:25:08Z Imported mempool transactions from disk: 2099 succeeded, 0 failed, 0 expired, 0 already there 2019-01-12T02:25:08Z GUI: PaymentServer::LoadRootCAs: Loaded 176 root certificates 2019-01-12T02:25:08Z New outbound peer connected: version: 70015, blocks=558163, peer=0 2019-01-12T02:25:10Z New outbound peer connected: version: 70015, blocks=558163, peer=1 2019-01-12T02:25:12Z txindex thread exit 2019-01-12T02:25:12Z tor: Thread interrupt 2019-01-12T02:25:12Z Shutdown: In progress... 2019-01-12T02:25:12Z dnsseed thread exit 2019-01-12T02:25:12Z torcontrol thread exit 2019-01-12T02:25:12Z addcon thread exit 2019-01-12T02:25:12Z net thread exit 2019-01-12T02:25:12Z msghand thread exit 2019-01-12T02:25:15Z opencon thread exit 2019-01-12T02:25:15Z scheduler thread interrupt 2019-01-12T02:25:15Z Dumped mempool: 0.00092s to copy, 0.012376s to dump 2019-01-12T02:25:15Z Shutdown: done

PierreRochard commented 5 years ago

Check out this thread https://github.com/bitcoin/bitcoin/issues/8081

Let me know if -reindex doesn't fix it!

JamesTwitter commented 5 years ago

Thank you for the comment.

I was able to resolve the issue by deleting the bitcoin.conf file and reverting back to my old bitcoin.conf file. I am also running electrum personal server. Is there a workaround that will allow me to use the node launcher with my own (or a manually customized) bitcoin.conf file? The only setting I am using is server=1. For whatever reason, the settings automatically generated by the Node Launcher cause the incompatibility issue with my Electrum Server, and also cause the node to crash upon startup.

PierreRochard commented 5 years ago

Reopening this because that means there is a bug of some kind in the Node Launcher

I would compare the NL generated one and your old one, try changing the options around and see

JamesTwitter commented 5 years ago

Just an update: I tried deleting one line at a time from the bitcoin.conf file and starting the node. Every adjustment to the bitcoin.conf file produced an error when the node started running. I did each adjustment in isolation to see if I could determine which line was causing the fatal error.

When I tried to delete the data directory line, it would not even attempt to launch the node as the file could not be located.

Every time I restore my old bitcoin.conf file, it the node runs flawlessly. The only setting I have is server=1.