ethereumproject / go-ethereum

Go language implementation of the original/classic design of the Ethereum protocol
GNU Lesser General Public License v3.0
441 stars 166 forks source link

Stuck sync with SputnikVM #689

Closed splix closed 5 years ago

splix commented 5 years ago

Geth with stopped to sync, restarts, network change, adding new 100% working peers, nothing helped for a few days of experiments.

For hours:

2018-11-08 22:44:40 Sync      #6863284 of  #6896083 429a591e     0/   0/ 0 blk/txs/mgas sec  7/25 peers
2018-11-08 22:45:40 Sync      #6863284 of  #6896088 429a591e     0/   0/ 0 blk/txs/mgas sec  5/25 peers
2018-11-08 22:46:40 Sync      #6863284 of  #6896093 429a591e     0/   0/ 0 blk/txs/mgas sec  7/25 peers
2018-11-08 22:47:40 Sync      #6863284 of  #6896098 429a591e     0/   0/ 0 blk/txs/mgas sec  4/25 peers
2018-11-08 22:48:40 Sync      #6863284 of  #6896103 429a591e     0/   0/ 0 blk/txs/mgas sec  5/25 peers

Switching to standard EVM fixed the problem.

Two things that looked strange with geth --sputnikvm:

1) Fork

It stopped at block 6863284 with hash 0x429a591eeb457fda65b95640b9f6c367a2ad9e7fe3ffb6f2eaef18d9ed8adc57. Which is a stale block, main chain has 0xf2aa3f9cdfc1642d1f6a1cdda790c5a131c7bd9746bd4efe05d52b93b2d15cfd at this height.

Even if I do geth rollback 6863280 it reaches block 6863283 (which is right before split) and stops again.

2) Invalid hash chain

In logs nothing suspicious, except many lines like:

W1108 23:06:40.339742 eth/downloader/downloader.go:499] Synchronisation with [peer:892daaf36fc1d38e@[Parity-Ethereum/v2.0.9-stable-09f7757-20181028/x86_64-linux-gnu/rustc1.30.0] eth/63][eth/63] terminated after 1.010391811s
W1108 23:06:40.339760 eth/downloader/downloader.go:403] Peer 892daaf36fc1d38e: drop: retrieved hash chain is invalid

And eventually is looses all peers.

whilei commented 5 years ago

cc @mersinvald

whilei commented 5 years ago

Thanks for reporting. Looking at it.

whilei commented 5 years ago

I've tried to reproduce, and failed to, although did get an identical-seeming issue at block #6921898.

splix commented 5 years ago

It seems I've just got the same problem again:

2018-11-13 10:41:19 Import    #6923498              27db496a          9/ 0 txs/mgas          2/25 peers
2018-11-13 10:41:21 Import    #6923499              3c58f2ea          1/ 0 txs/mgas          2/25 peers
2018-11-13 10:42:14 Import    #6923500              9a4f519a          0/ 0 txs/mgas          2/25 peers
2018-11-13 10:42:24 Import    #6923500              3b6c7459          0/ 0 txs/mgas          2/25 peers
2018-11-13 10:42:24 Peer e98bab1bd6b3fec5: block #6923501 [0x722d15cc573358dea057cd15b7493a184522c0a63bad31a2984404f0d58e86df] import failed: invalid receipt root hash. received=375ce87ffd7005ad3e719b285f0675fff9b388995361be0c6dda0563c807eef4 calculated=c22c26e46cbf7903b3cd75b7880a114b02807930645eb0b1efc08dc87403f583
2018-11-13 10:44:11 Discover                                                                 2/25 peers
2018-11-13 10:45:11 Sync      #6923500 of  #6923505 3b6c7459     0/   0/ 0 blk/txs/mgas sec  2/25 peers
2018-11-13 10:46:11 Sync      #6923500 of  #6923506 3b6c7459     0/   0/ 0 blk/txs/mgas sec  1/25 peers
2018-11-13 10:47:11 Discover                                                                 0/25 peers
2018-11-13 10:48:11 Sync      #6923500 of  #6923506 3b6c7459     0/   0/ 0 blk/txs/mgas sec  2/25 peers
2018-11-13 10:49:11 Discover                                                                 1/25 peers

Disabling SputnikVM fixed the problem