I’m not sure what is relevant so I’m including a lot of information. I’d be happy to take suggestions for ways to fix this. I’m also posting here on the chance this is a bug or behavior that could be improved.
A log message in debug.log dated 2016-08-06 12:22:19 corresponds to about Sat Aug 6 13:22:37 CDT 2016 on my local time (date
) while the corresponding hwtime
shows Sat 06 Aug 2016 01:22:47 PM CDT .
0Ubuntu 14.04.5 LTS
1
2bitcoin-cli getinfo
3{
4 "version": 120100,
5 "protocolversion": 70012,
6 "blocks": 422168,
7 "timeoffset": -26,
8 "connections": 20,
9 "proxy": "",
10 "difficulty": 213492501107.5134,
11 "testnet": false,
12 "relayfee": 0.00001000,
13 "errors": ""
14}
A few weeks ago I dropped off the main chain.
0bitcoin-cli getblockcount
1422168
Here is the debug log from around that time.
02016-07-25 03:31:17 UpdateTip: 3 of last 100 blocks have unexpected version
12016-07-25 03:31:18 UpdateTip: new best=00000000000000000304f0c7db28c15cc4226dfc491d4c4f0d8b9ae48744453a height=422168 log2_work=85.035791 tx=144585606 date=2016-07-25 05:26:32 progress=1.000042 cache=211.6MiB(136697tx)
22016-07-25 03:31:18 UpdateTip: 3 of last 100 blocks have unexpected version
32016-07-25 03:31:18 ERROR: CheckBlockHeader(): block timestamp too far in the future
42016-07-25 03:31:18 InvalidChainFound: invalid block=000000000000000001f4de9d78ed4c2015cb676440e58069f67319ae31e71c75 height=422169 log2_work=85.035824 date=2016-07-25 05:38:02
52016-07-25 03:31:18 InvalidChainFound: current best=00000000000000000304f0c7db28c15cc4226dfc491d4c4f0d8b9ae48744453a height=422168 log2_work=85.035791 date=2016-07-25 05:26:32
62016-07-25 03:31:18 ERROR: ConnectTip(): ConnectBlock 000000000000000001f4de9d78ed4c2015cb676440e58069f67319ae31e71c75 failed
72016-07-25 03:31:18 InvalidChainFound: invalid block=000000000000000001f4de9d78ed4c2015cb676440e58069f67319ae31e71c75 height=422169 log2_work=85.035824 date=2016-07-25 05:38:02
82016-07-25 03:31:18 InvalidChainFound: current best=00000000000000000304f0c7db28c15cc4226dfc491d4c4f0d8b9ae48744453a height=422168 log2_work=85.035791 date=2016-07-25 05:26:32
92016-07-25 03:31:18 mapBlockIndex.size() = 422233
102016-07-25 03:31:18 nBestHeight = 422168
I have since updated my local time and hwtime (I’m not sure it was ever wrong) and restarted but I do not rejoin the main chain.
If my system clock gets out of sync and I later fix it, will I automatically rejoin the previously rejected chain? Should this be the default behavior?
Random recent log near ‘invalid header’:
02016-07-29 01:09:26 ERROR: CheckBlockHeader(): block timestamp too far in the future
12016-07-29 01:09:26 ERROR: invalid header received
22016-07-29 01:09:26 ProcessMessages(headers, 82 bytes) FAILED peer=33
32016-07-29 01:09:59 ERROR: CheckBlockHeader(): block timestamp too far in the future
42016-07-29 01:09:59 ERROR: invalid header received
52016-07-29 01:09:59 ProcessMessages(headers, 82 bytes) FAILED peer=625
62016-07-29 01:10:32 receive version message: /bitnodes.21.co:0.1/: version 70002, blocks=422693, us=68.184.202.88:8333, peer=878
72016-07-29 01:10:32 AdvertizeLocal: advertizing address 68.184.202.88:8333
82016-07-29 01:11:04 receive version message: /Snoopy:0.2.1/: version 70001, blocks=0, us=68.184.202.88:8333, peer=879
92016-07-29 01:11:04 AdvertizeLocal: advertizing address td6iaq6jpck24fxx.onion:8333
102016-07-29 01:14:25 receive version message: /bitnodes.21.co:0.1/: version 70002, blocks=422694, us=68.184.202.88:8333, peer=880
112016-07-29 01:14:25 AdvertizeLocal: advertizing address td6iaq6jpck24fxx.onion:8333
122016-07-29 01:15:00 receive version message: /bitnodes.21.co:0.1/: version 70002, blocks=422694, us=68.184.202.88:8333, peer=881
132016-07-29 01:15:00 AdvertizeLocal: advertizing address td6iaq6jpck24fxx.onion:8333
142016-07-29 01:15:10 ERROR: CheckBlockHeader(): block timestamp too far in the future
152016-07-29 01:15:10 ERROR: invalid header received
162016-07-29 01:15:10 ProcessMessages(headers, 82 bytes) FAILED peer=33
172016-07-29 01:15:36 ERROR: CheckBlockHeader(): block timestamp too far in the future
182016-07-29 01:15:36 ERROR: invalid header received
192016-07-29 01:15:36 ProcessMessages(headers, 82 bytes) FAILED peer=625
Log after a restart, still at 422168:
02016-08-06 18:29:09 Bitcoin version v0.12.1 (2016-04-11 13:01:43 +0200)
12016-08-06 18:29:09 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
22016-08-06 18:29:09 Default data directory /home/b/.bitcoin
32016-08-06 18:29:09 Using data directory /home/b/.bitcoin
42016-08-06 18:29:09 Using config file /home/b/.bitcoin/bitcoin.conf
52016-08-06 18:29:09 Using at most 125 connections (1024 file descriptors available)
62016-08-06 18:29:09 Using 4 threads for script verification
72016-08-06 18:29:09 scheduler thread start
82016-08-06 18:29:09 HTTP: creating work queue of depth 16
92016-08-06 18:29:09 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/rpcuser for rpcauth auth generation.
102016-08-06 18:29:09 HTTP: starting 4 worker threads
112016-08-06 18:29:09 Bound to [::]:8333
122016-08-06 18:29:09 Bound to 0.0.0.0:8333
132016-08-06 18:29:09 Cache configuration:
142016-08-06 18:29:09 * Using 2.0MiB for block index database
152016-08-06 18:29:09 * Using 257.5MiB for chain state database
162016-08-06 18:29:09 * Using 740.5MiB for in-memory UTXO set
172016-08-06 18:29:09 init message: Loading block index...
182016-08-06 18:29:09 Opening LevelDB in /home/b/.bitcoin/blocks/index
192016-08-06 18:29:10 Opened LevelDB successfully
202016-08-06 18:29:10 Using obfuscation key for /home/b/.bitcoin/blocks/index: 0000000000000000
212016-08-06 18:29:10 Opening LevelDB in /home/b/.bitcoin/chainstate
222016-08-06 18:29:10 Opened LevelDB successfully
232016-08-06 18:29:10 Using obfuscation key for /home/b/.bitcoin/chainstate: 0000000000000000
242016-08-06 18:29:23 LoadBlockIndexDB: last block file = 579
252016-08-06 18:29:23 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=155, size=126842528, heights=422025...422178, time=2016-07-24...2016-07-25)
262016-08-06 18:29:23 Checking all blk files are present...
272016-08-06 18:29:23 LoadBlockIndexDB: transaction index disabled
282016-08-06 18:29:23 LoadBlockIndexDB: hashBestChain=00000000000000000304f0c7db28c15cc4226dfc491d4c4f0d8b9ae48744453a height=422168 date=2016-07-25 05:26:32 progress=0.993518
292016-08-06 18:29:24 init message: Verifying blocks...
302016-08-06 18:29:24 Verifying last 288 blocks at level 3
312016-08-06 18:35:14 No coin database inconsistencies in last 289 blocks (435545 transactions)
322016-08-06 18:35:15 block index 365687ms
332016-08-06 18:35:15 No wallet support compiled in!
342016-08-06 18:35:15 init message: Activating best chain...
352016-08-06 18:35:15 mapBlockIndex.size() = 422233
362016-08-06 18:35:15 nBestHeight = 422168
372016-08-06 18:35:15 init message: Loading addresses...
382016-08-06 18:35:15 torcontrol thread start
392016-08-06 18:35:15 tor: Reading cached private key from /home/b/.bitcoin/onion_private_key
402016-08-06 18:35:15 tor: Succesfully connected!
412016-08-06 18:35:15 tor: Connected to Tor version 0.2.8.6
422016-08-06 18:35:15 tor: Supported authentication method: COOKIE
432016-08-06 18:35:15 tor: Supported authentication method: SAFECOOKIE
442016-08-06 18:35:15 tor: Using SAFECOOKIE authentication, reading cookie authentication from /var/run/tor/control.authcookie
452016-08-06 18:35:15 tor: SAFECOOKIE authentication challenge succesful
462016-08-06 18:35:15 tor: AUTHCHALLENGE ServerHash fce8296710d767170c325e4f411fb9bc5f34e56481cbe59dcd31b49de7ee0914 ServerNonce b284aa41a9c892e071d7431b17bbac572059de09f3fa6866006c2f18a78a1cea
472016-08-06 18:35:15 tor: Authentication succesful
482016-08-06 18:35:15 tor: ADD_ONION succesful
492016-08-06 18:35:15 tor: Got service ID td6iaq6jpck24fxx, advertizing service td6iaq6jpck24fxx.onion:8333
502016-08-06 18:35:15 tor: Cached service private key to /home/b/.bitcoin/onion_private_key
512016-08-06 18:35:15 AddLocal(td6iaq6jpck24fxx.onion:8333,4)
522016-08-06 18:35:15 Loaded 10651 addresses from peers.dat 276ms
532016-08-06 18:35:15 init message: Done loading
542016-08-06 18:35:15 addcon thread start
552016-08-06 18:35:15 opencon thread start
562016-08-06 18:35:15 msghand thread start
572016-08-06 18:35:15 dnsseed thread start
582016-08-06 18:35:15 net thread start
592016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=1
602016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=2
612016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=3
622016-08-06 18:35:15 receive version message: /ViaBTC:bitpeer.0.2.0/: version 70012, blocks=0, us=0.0.0.0:0, peer=4
632016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=5
642016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=6
652016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=7
662016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=8
672016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=9
682016-08-06 18:35:15 receive version message: /bitnodes.21.co:0.1/: version 70002, blocks=424011, us=68.184.202.88:8333, peer=10
692016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=11
702016-08-06 18:35:15 receive version message: /Satoshi:0.11.2/: version 70002, blocks=423129, us=68.184.202.88:8333, peer=12
712016-08-06 18:35:15 socket send error Bad file descriptor (9)
722016-08-06 18:35:15 receive version message: /bitnodes.21.co:0.1/: version 70002, blocks=424012, us=68.184.202.88:8333, peer=13
732016-08-06 18:35:15 receive version message: /Satoshi:0.11.2/: version 70002, blocks=422168, us=68.184.202.88:8333, peer=14
742016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=15
752016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=16
762016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=17
772016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=18
782016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=19
792016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=20
802016-08-06 18:35:15 socket send error Bad file descriptor (9)
812016-08-06 18:35:15 receive version message: /Snoopy:0.2.1/: version 70001, blocks=0, us=68.184.202.88:8333, peer=21
822016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=22
832016-08-06 18:35:15 socket send error Bad file descriptor (9)
842016-08-06 18:35:15 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=350000, us=68.184.202.88:8333, peer=23
852016-08-06 18:35:15 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=350000, us=68.184.202.88:8333, peer=24
862016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=25
872016-08-06 18:35:15 socket send error Bad file descriptor (9)
882016-08-06 18:35:15 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=350000, us=68.184.202.88:8333, peer=26
892016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=27
902016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=28
912016-08-06 18:35:15 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=350000, us=68.184.202.88:8333, peer=29
922016-08-06 18:35:15 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=31
932016-08-06 18:35:15 receive version message: /btcnodes.org-seeder:0.01/: version 60000, blocks=230000, us=68.184.202.88:8333, peer=32
942016-08-06 18:35:15 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=230000, us=68.184.202.88:8333, peer=33
952016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=34
962016-08-06 18:35:15 socket send error Bad file descriptor (9)
972016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=35
982016-08-06 18:35:15 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=350000, us=68.184.202.88:8333, peer=36
992016-08-06 18:35:15 socket send error Bad file descriptor (9)
1002016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=37
1012016-08-06 18:35:15 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=350000, us=68.184.202.88:8333, peer=38
1022016-08-06 18:35:15 receive version message: /Satoshi:0.9.99/: version 70002, blocks=-1, us=68.184.202.88:8333, peer=39
1032016-08-06 18:35:15 receive version message: /bitnodes.21.co:0.1/: version 70002, blocks=424012, us=68.184.202.88:8333, peer=40
1042016-08-06 18:35:15 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=350000, us=68.184.202.88:8333, peer=41
1052016-08-06 18:35:17 receive version message: /Satoshi:0.11.2/ljr:20151118/: version 70002, blocks=424015, us=68.184.202.88:39816, peer=42
1062016-08-06 18:35:21 connect() to 62.34.146.14:8333 failed after select(): No route to host (113)
1072016-08-06 18:35:26 P2P peers available. Skipped DNS seeding.
1082016-08-06 18:35:26 dnsseed thread exit
1092016-08-06 18:35:44 SOCKS5 connecting 6sgukxaz6m6qigtk.onion
1102016-08-06 18:36:02 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=230000, us=68.184.202.88:8333, peer=43
1112016-08-06 18:36:04 ERROR: Error reading proxy response
1122016-08-06 18:36:04 connect() to [2601:5c9:0:a400::1]:8333 failed: Network is unreachable (101)
1132016-08-06 18:36:05 receive version message: /Satoshi:0.10.2/: version 70002, blocks=424015, us=68.184.202.88:34278, peer=44
1142016-08-06 18:36:11 connect() to 104.139.88.49:8333 failed after select(): Connection refused (111)
1152016-08-06 18:36:18 receive version message: /Satoshi:0.12.1/: version 70012, blocks=424015, us=68.184.202.88:35966, peer=45
1162016-08-06 18:36:24 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=47
1172016-08-06 18:36:30 SOCKS5 connecting pjghcivzkoersesd.onion
1182016-08-06 18:36:34 SOCKS5 connected pjghcivzkoersesd.onion
1192016-08-06 18:36:34 receive version message: /Satoshi:0.12.1/: version 70012, blocks=424015, us=0.0.0.0:0, peer=48
1202016-08-06 18:36:43 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=49
1212016-08-06 18:36:46 receive version message: /Satoshi:0.10.0/: version 70002, blocks=424015, us=68.184.202.88:34941, peer=50
1222016-08-06 18:36:46 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=51
1232016-08-06 18:36:47 receive version message: /Satoshi:0.12.1/: version 70012, blocks=424015, us=68.184.202.88:37247, peer=52
1242016-08-06 18:36:49 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=53
1252016-08-06 18:36:53 connect() to 213.140.88.188:8333 failed after select(): Connection refused (111)
1262016-08-06 18:37:06 receive version message: /bitnodes.21.co:0.1/: version 70002, blocks=424014, us=td6iaq6jpck24fxx.onion:8333, peer=54
1272016-08-06 18:37:11 receive version message: /Satoshi:0.12.99/: version 70013, blocks=424015, us=68.184.202.88:48672, peer=55
1282016-08-06 18:37:14 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=56
1292016-08-06 18:37:25 receive version message: /Satoshi:0.12.1/: version 70012, blocks=424013, us=68.184.202.88:46594, peer=57
1302016-08-06 18:37:30 receive version message: /Snoopy:0.2.1/: version 70001, blocks=0, us=68.184.202.88:8333, peer=58
1312016-08-06 18:38:15 receive version message: /bitcoinj:0.12.2/: version 70001, blocks=424015, us=127.0.0.1:8333, peer=59
1322016-08-06 18:38:17 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=60
1332016-08-06 18:38:42 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=350000, us=68.184.202.88:8333, peer=61
1342016-08-06 18:38:44 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=62
1352016-08-06 18:38:54 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=63
1362016-08-06 18:38:59 receive version message: /bitcoinj:0.14.1/: version 70001, blocks=0, us=127.0.0.1:8333, peer=64
1372016-08-06 18:39:12 receive version message: /Satoshi:0.11.0/: version 70002, blocks=375495, us=68.184.202.88:8333, peer=65
1382016-08-06 18:39:20 receive version message: /Satoshi:0.12.1/: version 70012, blocks=374602, us=68.184.202.88:8333, peer=66