geth never stop syncing on rinkeby testnet

自作多情 提交于 2019-12-13 03:57:39

问题


when the currentBlock becomes close to the highestBlock, it stop growing, and the highestBlock begin to grow. A while later, the currentBlock begin growing again.

I run geth with command geth --rinkeby --fast.

the highestBlock on my geth is very close to the actual number on https://www.rinkeby.io/#faucet.

> eth.syncing
{
  currentBlock: 2401750,
  highestBlock: 2401826,
  knownStates: 14219701,
  pulledStates: 14205841,
  startingBlock: 2401554
}
> eth.blockNumber
0

logs below, seems normal:

INFO [06-04|15:34:52] Imported new state entries               count=621  elapsed=4.093ms   processed=14288823 pending=12362 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:34:56] Imported new block headers               count=1    elapsed=713.868µs number=2401841 hash=db818c…70c969 ignored=0
INFO [06-04|15:34:57] Imported new state entries               count=1388 elapsed=9.091ms   processed=14290211 pending=12354 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:00] Imported new state entries               count=768  elapsed=9.649ms   processed=14290979 pending=11944 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:02] Imported new state entries               count=607  elapsed=4.707ms   processed=14291586 pending=11757 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:05] Imported new state entries               count=768  elapsed=5.867ms   processed=14292354 pending=11629 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:07] Imported new state entries               count=601  elapsed=4.242ms   processed=14292955 pending=11759 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:09] Imported new state entries               count=601  elapsed=4.924ms   processed=14293556 pending=11479 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:09] Imported new block headers               count=1    elapsed=711.566µs number=2401842 hash=39a2d8…5318ec ignored=0
INFO [06-04|15:35:10] Imported new state entries               count=384  elapsed=3.093ms   processed=14293940 pending=11375 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:11] Imported new state entries               count=384  elapsed=2.660ms   processed=14294324 pending=11365 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:13] Imported new state entries               count=601  elapsed=5.337ms   processed=14294925 pending=11094 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:17] Imported new state entries               count=985  elapsed=6.948ms   processed=14295910 pending=11024 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:20] Imported new state entries               count=602  elapsed=4.317ms   processed=14296512 pending=10940 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:25] Imported new state entries               count=602  elapsed=4.380ms   processed=14297114 pending=10973 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:25] Imported new block headers               count=1    elapsed=469.834µs number=2401843 hash=e8d3a7…152487 ignored=0
INFO [06-04|15:35:25] Imported new state entries               count=384  elapsed=2.758ms   processed=14297498 pending=11062 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:28] Imported new state entries               count=592  elapsed=5.524ms   processed=14298090 pending=11015 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:31] Imported new state entries               count=1210 elapsed=203.329ms processed=14299300 pending=10477 retry=0   duplicate=6543 unexpected=9538
INFO [06-04|15:35:37] Imported new state entries               count=1033 elapsed=1.656ms   processed=14300333 pending=10590 retry=0   duplicate=6543 unexpected=9538

I think I've waited long enough, but the currentBlock just can't reach the highestBlock, even they are very close.

Is this common?


syncing finished. Theses numbers do not mean everything, just wait.


回答1:


There could still be a lot of states to process, even after the block synchronization was completed (i.e. when currentBlock almost reached highestBlock).

There is no clear way to know the total number of states: pulledStates is the number of state trie entries already downloaded, and knownStates is the total number of state trie entries known about.

Synchronization is considered complete when a node has downloaded (pulled) all the states (known and unknown), until then it returns 0 to eth.blockNumber and eth.getBalance.




回答2:


Geth needs to sync state and blocks. There are around 81M state entries atm. The folder size is 28GB after full sync.




回答3:


I wrote a tiny python script to overview the process. It's here https://github.com/hayorov/ethereum-sync-mertics

My output:

2019-05-06 01:00:32 avg: 1827 max: 1938 min: 1378 states/s  remain: 136604075 states     4 peers    eta@ 20:46:28.165828
2019-05-06 01:00:37 avg: 1864 max: 1938 min: 1378 states/s  remain: 136595500 states     3 peers    eta@ 20:21:14.951050
2019-05-06 01:00:42 avg: 1791 max: 1938 min: 1378 states/s  remain: 136583359 states     3 peers    eta@ 21:11:16.481006
2019-05-06 01:00:48 avg: 1742 max: 1938 min: 1378 states/s  remain: 136580287 states     3 peers    eta@ 21:46:35.797305
2019-05-06 01:00:53 avg: 1721 max: 1938 min: 1378 states/s  remain: 136575694 states     3 peers    eta@ 22:03:01.154434
2019-05-06 01:00:58 avg: 1682 max: 1938 min: 1378 states/s  remain: 136569043 states     4 peers    eta@ 22:33:15.402442
2019-05-06 01:01:03 avg: 1698 max: 1938 min: 1378 states/s  remain: 136564293 states     3 peers    eta@ 22:20:27.458747


来源:https://stackoverflow.com/questions/50675611/geth-never-stop-syncing-on-rinkeby-testnet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!