Go-ethereum: Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"

Created on 25 Apr 2017  Â·  53Comments  Â·  Source: ethereum/go-ethereum

System information

Geth version: 1.6
OS & Version: Linux and Android

Expected behaviour

Mined Blocks should be retrieved by android node and displayed accordingly.

Actual behaviour

I have started a lightserver on ubuntu machine. I am able to connect android node with lightserver node but when I start mining in ubuntu, I got following errors in Log of android:
04-25 22:32:02.789 5831-5925/com.example.sahil.myapp7 E/GoLog: INFO [04-25|17:02:02] Block synchronisation started
04-25 22:32:02.898 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:02:02] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:32:43.976 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:02:43] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:33:11.181 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:03:11] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:33:46.752 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:03:46] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:34:19.160 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:04:19] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:34:49.911 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:04:49] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"
04-25 22:35:21.757 5831-5925/com.example.sahil.myapp7 E/GoLog: WARN [04-25|17:05:21] Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"

Steps to reproduce the behaviour

I used following commands to start a lightserver -
-geth --datadir op1 --networkid 381 init rinkeby.json
-geth --datadir op1 --networkid 381 --lightserv 25 --lightpeers 20 console

Backtrace

[backtrace]
Synchronisation failed, dropping peer peer=b1710c8648aa839a err="retrieved hash chain is invalid"

Most helpful comment

There's a PR open to fix the sync issues. It will be in the next week's release.

All 53 comments

i have the same, but on win 10

I'm trying to repro this. Are you also seeing it between Windows and Android @GoldMiner817 ?

I'm also having this issue with version 1.6.1 on Ubuntu 14.04

i deleted the blockchain and started over, also clock sync seeme to help.

it looks good now, gl m8!

2017-05-05 16:39 GMT+02:00 tcaaen notifications@github.com:

I'm also having this issue with version 1.6.1 on Ubuntu 14.04

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/go-ethereum/issues/14381#issuecomment-299482848,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbFaoupzzdmuV70LzQRc4Q_3Pukq8Yc7ks5r2zS-gaJpZM4NICwO
.

--
Vriendelijke Groeten,

Tomas Teunis

did you fix it?

i started a new issue, but its soo slow;

https://github.com/ethereum/go-ethereum/issues/14433

2017-05-05 16:39 GMT+02:00 tcaaen notifications@github.com:

I'm also having this issue with version 1.6.1 on Ubuntu 14.04

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/go-ethereum/issues/14381#issuecomment-299482848,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbFaoupzzdmuV70LzQRc4Q_3Pukq8Yc7ks5r2zS-gaJpZM4NICwO
.

--
Vriendelijke Groeten,

Tomas Teunis

I'm having this issue as well. Yesterday it was syncing OK.

Uname -a: Linux adria-pc 4.4.63-1-MANJARO #1 SMP PREEMPT Fri Apr 21 08:43:38 UTC 2017 x86_64 GNU/Linux
Console log: https://pastebin.com/3CPDnSpA

glad i'm not alone :)

update on my personal quest;
i notised that my hard drive was under constant load while syncing.
So i cloned my OS to another harddrive(non-SSD, but newer, bigger and
faster.

the sync(non-fast) was getting me no where, so with pain in my heart i
removerdb again and re-started
fast sync. HDD load is not constant under full load, and seems pretty
smooth.

after 10 min;

INFO [05-06|14:24:06] Imported new state entries count=384
elapsed=28.075ms processed=619407 pending=74833
INFO [05-06|14:24:06] Imported new block headers count=192
elapsed=114.304ms number=306112 hash=e1cfad…87e4ab ignored=0

so i'll check back in an hour or 2, see where i'm at

2017-05-06 13:57 GMT+02:00 Rocavall notifications@github.com:

I'm having this issue as well. Yesterday it was syncing OK.

Uname -a: Linux adria-pc 4.4.63-1-MANJARO #1
https://github.com/ethereum/go-ethereum/issues/1 SMP PREEMPT Fri Apr 21
08:43:38 UTC 2017 x86_64 GNU/Linux
Console log: https://pastebin.com/3CPDnSpA

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/go-ethereum/issues/14381#issuecomment-299635099,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbFaos-WNURqMZO6p-c5-Qma3JNhFwO9ks5r3GAngaJpZM4NICwO
.

--
Vriendelijke Groeten,

Tomas Teunis

I got this when trying to close:
ERROR[05-06|14:35:38] Failed to close database database=/run/media/adria/6A82036982033959/ethereum/geth/chaindata err="leveldb/table: corruption on data-block (pos=0): checksum mismatch, want=0xbc4d5c87 got=0x495f3f81 [file=243553.ldb]"
https://pastebin.com/W0ivQSmk
Is my chain corrupted? Do I have to download everything again?

not sure... it would be handy if we could download the blockchain somewhere and import it..this takes way to long.

i think my hdd swap didnt change much..still importing headers etc, after 2.5 hours.

man, i just wanne get started! :/

errors i get are;

WARN [05-06|15:49:35] Rolled back headers count=2048 header=1494991->1492943 fast=1457578->1457578 block=0->0
WARN [05-06|15:49:35] Synchronisation failed, retrying err="receipt download canceled (requested)"
WARN [05-06|15:49:37] Synchronisation failed, dropping peer peer=a4aaa02204239fbe err="no peers available or all tried for download"
INFO [05-06|15:49:46] Imported new state entries count=1 elapsed=1.026ms processed=3804759 pending=17

INFO [05-06|16:01:51] Imported new state entries count=384 elapsed=4.010ms processed=3974226 pending=113129
WARN [05-06|16:01:52] Rolled back headers count=2048 header=1553999->1551951 fast=1517039->1517039 block=0->0
WARN [05-06|16:01:52] Synchronisation failed, retrying err="block body download canceled (requested)"

INFO [05-06|16:05:12] Imported new state entries count=63 elapsed=15.712s processed=3977768 pending=28556
WARN [05-06|16:05:12] Synchronisation failed, dropping peer peer=4ae417bcced3f93c err="retrieved hash chain is invalid"

INFO [05-06|16:07:21] Imported new state entries count=384 elapsed=9.772s processed=3983719 pending=53745
WARN [05-06|16:07:30] Synchronisation failed, retrying err="receipt download canceled (requested)"

WARN [05-06|16:08:14] Synchronisation failed, retrying err="state data download canceled (requested)"
WARN [05-06|16:08:18] Synchronisation failed, dropping peer peer=2844b46106891aa9 err="action from bad peer ignored"
INFO [05-06|16:08:41] Imported new state entries count=1 elapsed=1.003ms processed=3984410 pending=17

WARN [05-06|16:09:15] Synchronisation failed, retrying err="receipt download canceled (requested)"
WARN [05-06|16:09:23] Synchronisation failed, retrying err="block download canceled (requested)"
INFO [05-06|16:09:35] Imported new state entries count=1 elapsed=1.002ms processed=3985496 pending=17

WARN [05-06|16:23:56] Rolled back headers count=2048 header=1610668->1608620 fast=1574014->1574014 block=0->0
WARN [05-06|16:23:56] Synchronisation failed, retrying err="state data download canceled (requested)"

i guess its weekend, support is probably out

i've used another client, for those in troulbe; i like to share

Parity http://127.0.0.1:8180

less than 10 min sync time!

I am finally mining! 💃

i would like to use Geth tho, so a solution woudl be nice, cheers

Parity warp sync just trusts its peers for the right data, and "validates it whenever" in the background. You'll still need the same time to make sure your chain is valid, but apparently people don't really care about it nowadays.

my main goal was to get the mining started, check

i would like to get Geth going, but at the rate it was going, it took me at
least a couple of weeks...if at all

2017-05-06 18:46 GMT+02:00 Péter Szilágyi notifications@github.com:

Parity warp sync just trusts its peers for the right data, and "validates
it whenever" in the background. You'll still need the same time to make
sure your chain is valid, but apparently people don't really care about it
nowadays.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/go-ethereum/issues/14381#issuecomment-299651928,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbFaos_M78pvqqNDBXftDlugiObYD7Y_ks5r3KPsgaJpZM4NICwO
.

--
Vriendelijke Groeten,

Tomas Teunis

I have the same issue on windows 10.
geth -rpc and geth --fast --cache=1024 repeatedly produce err="retrieved hash chain is invalid"

Deleting the blockchain and starting over does not help.

I'm just trying to start mining!

Yes, we've found a bug im the sync code that was amplified by a recentish
regression. Working on a fix already. It only affects HDD users btw so if
you can sync up to an ssd and copy over that will be an immediate solution.
Maybe we'll have an hdd fix already today to try out but no promises yet.

On May 11, 2017 12:17, "Viacheslav Shalamov" notifications@github.com
wrote:

I have the same issue on windows 10.
geth -rpc and geth --fast --cache=1024 repeatedly produce err="retrieved
hash chain is invalid"

Deleting the blockchain and starting over does not help.

I'm just trying to start mining!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ethereum/go-ethereum/issues/14381#issuecomment-300732513,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAH6GQKrwdGVQ87dnj9vzqTcTofbXbCLks5r4tImgaJpZM4NICwO
.

@karalabe I have only SSD in my laptop, but it affects me too.

Is this related to "Synchronisation failed "retrieved hash chain is invalid" #14435" issue? or ERROR[05-11|19:49:41] Failed to close database database=../Ethereum/geth/chaindata err="leveldb/table: corruption on table-footer (pos=2166570): bad magic number [file=044238.ldb]" #14465?

In my case I was using an HDD but the sync never ended (stuck in the last 130 blocks regardless of highest block number), so I copied the files to my SSD and then I cound finish syncing. The problem mentioned here appeared afterwards, so I guess it had something to do with the sync part done on the HDD?

Have on Ubuntu 16.0x server with geth "binaries/keystore" etc on SSD and "chaindata" of HDD and it seems to be working fine but on Macbook which has two SSDs ("binaries/keystore" in one SSD and "chaindata" in another SSD) seems to failing every other day.

I have the same issue, on SSD, 16GB RAM, 2.6 Quad core. Haven't been able to sync.

Having similar issue:
INFO [05-16|22:11:19] Imported new chain segment blocks=16 txs=217 mgas=16.083 elapsed=4.367s mgasps=3.682 number=3718456 hash=11f683…ca41f6
WARN [05-16|22:11:23] Synchronisation failed, dropping peer peer=158f8aab45f6d19c err="retrieved hash chain is invalid"
INFO [05-16|22:11:41] Imported new chain segment blocks=1 txs=2 mgas=1.021 elapsed=37.690ms mgasps=27.089 number=3718467 hash=b5f68b…484ae3
INFO [05-16|22:11:57] Imported new chain segment blocks=1 txs=80 mgas=4.319 elapsed=846.955ms mgasps=5.099 number=3718468 hash=0b672c…7a6215
INFO [05-16|22:29:07] Imported new chain segment blocks=4 txs=36 mgas=3.109 elapsed=625.756ms mgasps=4.968 number=3718472 hash=360630…f01756
INFO [05-16|22:29:09] Imported new chain segment blocks=4 txs=88 mgas=4.656 elapsed=1.368s mgasps=3.402 number=3718476 hash=a56d6c…178afe
INFO [05-16|22:29:13] Imported new chain segment blocks=9 txs=219 mgas=9.173 elapsed=3.157s mgasps=2.905 number=3718485 hash=70700a…1480c2
INFO [05-16|22:29:21] Imported new chain segment blocks=32 txs=769 mgas=45.633 elapsed=8.906s mgasps=5.124 number=3718517 hash=1cb67c…db65ed
WARN [05-16|22:29:26] Synchronisation failed, dropping peer peer=158f8aab45f6d19c err="retrieved hash chain is invalid"
INFO [05-16|22:29:31] Imported new chain segment blocks=1 txs=10 mgas=0.461 elapsed=144.633ms mgasps=3.190 number=3718536 hash=fa8b1d…2f7fa4

Hi,
I still have this syncro failed on Ubuntu with 2 nodes running on the same computer. Is there a solution for this issue. Is that related to the geth version 1.6.1 ?

win 10 32 bit
2 GB RAM
Geth
Version: 1.6.1-unstable
Git Commit: c7a4d9cf8ae307a94d16dd8197824eecd320cdf7
Architecture: 386
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.8.1
Operating System: windows

Running this (eventually) causes out of memory error (as well as above message):

geth --testnet --fast --rpc --rpcapi db,eth,net,web3,personal --cache=1024 --rpcport 8545 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303"

Is there a flag setting I need or is this not possible on a 2GB machine?

Or should I be using another version of Geth?

There's a PR open to fix the sync issues. It will be in the next week's release.

Hello @karalabe , was this fix included in 1.6.2?

No, we had to pull that fix because it wasn't stable enough. It's mostly working and that's our top priority now. We'll do a release immediately when the fix is deemed stable enough to roll out to everyone.

Ok, great. thanks for the quick reply!

Not in 1.6.3 through 1.6.5 either? I see no recent activity on #3780 if that's the PR we're waiting for.

I'm also getting this error using SSD with 1.6.5 stable version.

Same issue here with 1.6.6-unstable-80f7c6c2 with an HDD

WARN [06-13|23:20:52] Synchronisation failed, dropping peer    peer=b41ecd5cf3a20292 err="retrieved hash chain is invalid"
WARN [06-13|23:20:52] Synchronisation failed, dropping peer    peer=2e42210c08954b37 err="action from bad peer ignored"

Same error here using SSD on 1.6.5 stable version on Windows 10. Clean install, new wallet, been trying for two days.

Just tried Parity, no such problems with it.

have the same problem, on the clean new environment and latest stable version of geth. It was ok until block #2709015, and then began to fail with this error.

Having same problem on macOS Sierra.

update: solved this error, for me the reason was overflow of HDD space.
FYI: on the separate Linode instance (8192 resized to 12288), full blockchain sync with geth client took 5 days and 170 GB.

Having same problem on macOS Sierra.

Same problem, and sync from the app never worked well for me, always get stuck at some point or fail to connect to peers. The only method that worked for me is to run geth to sync in command prompt. Now I'm getting this bad block problem in geth. Latest build has fail to connect to node problem so it won't even start up. This wallet has been nothing but nightmare for me.

this error just started for me after ethereum wallet update to 0.9.0
was working until yesterday..

this issue was found a lot on this repo but i cant finde one answer to fix it...

@BoBBer446 after trying 100 different things, I found a workaround.
shut down your geth, find the file it is complaining about in the block chain delete it and restart geth without fast option.

i.e for the error message:

corruption on data-block (pos=0): checksum mismatch, want=0xbc4d5c87 got=0x495f3f81 [file=243553.ldb]"

delete 243553.ldb

i want to start new, but if i delete the chaindata folder i loose my coins

if i delete one .lbd im not sure if that corrupt my eth balance :/ The developer does not talk with us about that issue :(

My issue is retrieved hash chain is invalid

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\Link>cd c:/programme/geth

c:\Programme\geth>geth --cache 1024
INFO [08-02|20:15:21] Starting peer-to-peer node               instance=Geth/v1.6.7-stable-ab5646c5/windows-amd64/go1.8.3
INFO [08-02|20:15:21] Allocated cache and file handles         database=C:\\Users\\Link\\AppData\\Roaming\\Ethereum\\geth\\chaindata cache=1024 handles=1024
INFO [08-02|20:15:21] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Metropolis: 9223372036854775807 Engine: ethash}"
INFO [08-02|20:15:21] Disk storage enabled for ethash caches   dir=C:\\Users\\Link\\AppData\\Roaming\\Ethereum\\geth\\ethash count=3
INFO [08-02|20:15:21] Disk storage enabled for ethash DAGs     dir=C:\\Users\\Link\\AppData\\Ethash                          count=2
INFO [08-02|20:15:21] Initialising Ethereum protocol           versions="[63 62]" network=1
INFO [08-02|20:15:21] Loaded most recent local header          number=4071854 hash=e03877…2fe89c td=558129264757125806177
INFO [08-02|20:15:21] Loaded most recent local full block      number=4071854 hash=e03877…2fe89c td=558129264757125806177
INFO [08-02|20:15:21] Loaded most recent local fast block      number=4071854 hash=e03877…2fe89c td=558129264757125806177
WARN [08-02|20:15:22] Blockchain not empty, fast sync disabled
INFO [08-02|20:15:22] Starting P2P networking
INFO [08-02|20:15:24] Mapped network port                      proto=udp extport=30303 intport=30303 interface="UPNP IGDv1-IP1"
INFO [08-02|20:15:24] UDP listener up                          self=enode://53cc56a962ff505850ffaf86851f8954b05eb55073419666a7831067532ac7ae0a413e0124a48f50f5082d0b3bda8e1242c0b47e8e8d242ccf291c3a27d9503d@192.168.0.10:30303
INFO [08-02|20:15:24] RLPx listener up                         self=enode://53cc56a962ff505850ffaf86851f8954b05eb55073419666a7831067532ac7ae0a413e0124a48f50f5082d0b3bda8e1242c0b47e8e8d242ccf291c3a27d9503d@192.168.0.10:30303
INFO [08-02|20:15:24] IPC endpoint opened: \\.\pipe\geth.ipc
INFO [08-02|20:15:24] Mapped network port                      proto=tcp extport=30303 intport=30303 interface="UPNP IGDv1-IP1"
INFO [08-02|20:16:24] Block synchronisation started
WARN [08-02|20:16:31] Synchronisation failed, dropping peer    peer=c214e715cd9de909 err="retrieved hash chain is invalid"
WARN [08-02|20:16:44] Synchronisation failed, dropping peer    peer=5dac192c404506a0 err="retrieved hash chain is invalid"

So i cant find the corrupt .ldb :/

Maybe i cant try this:
geth removedb

but im not sure with my eth balance

@BoBBer446
You should do a backup of your keystore with your private key files which is located in your ethereum data directory. This way you will not loose coins if something goes wrong.
https://github.com/ethereum/go-ethereum/wiki/Backup-&-restore

By doing
geth removedb
you remove only the chaindata folder, the keystore folder is staying untouched and so your coins. You will not see your coins until the blockchain is synced, though.

Hi All Blockchain experts,
I created a blockchain local node (Geth) with this command: geth --testnet --fast. Then I created a personal account on the local machine, and I also transferred one ether from my Testnet account from MetaMasks to the newly created local account. But, I noticed that my local node it didn't sync up from the testnet network. The transferee account still showing zero ether. One thing, I noticed was the console was showing an error message "peer drop". Hope someone could advise on this.

this issue reproduces randomly.

How to fix it? running version 1.8.13

It's still open in August 2018 after creation April 2017.
There appears to be no fix.
Having upgraded to geth 1.8.13 we still have this error.

Same error in Version: 1.8.14-stable

While trying to sync up with Rinkeby, I am facing the same issue mentioned in this thread. My geth Version: 1.8.14-stable.

WARN [08-26|16:18:55.657] Synchronisation failed, dropping peer peer=6867526b2f5d623c err="retrieved hash chain is invalid"

-------- After few minutes --------

WARN [08-26|16:29:23.568] Node data write error err="state node 7bc787…c4b1bd failed with all peers (1 tries, 1 peers)"
WARN [08-26|16:29:23.568] Synchronisation failed, retrying err="state node 7bc787…c4b1bd failed with all peers (1 tries, 1 peers)"


Issue is still open. Using windows 7 and getting constant "retrieved hash chain is invalid" error. Even when trying on both rinkeby and ropsten. Especially with the rinkeby network.

I am experiencing the same issue.

is #18072 related to this issue?

Having the same problem, started getting noticed of the issue searching for this https://github.com/ethereum/go-ethereum/issues/16406

Im using 6 clique signers on geth 1.8.17 on different versions of ubuntu, 16.04 and 18.04

The original issue is really really old and we've probably fixed many issues related to it. Please open a new issue with as much detail as you have if this still persists.

I solved this problem by upgrad my go-ethereum version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AdrianScott picture AdrianScott  Â·  3Comments

cheershendtco picture cheershendtco  Â·  3Comments

JMaxU picture JMaxU  Â·  3Comments

leonzhao picture leonzhao  Â·  3Comments

VoR0220 picture VoR0220  Â·  3Comments