1

I am trying to get last synced block but it always 0. So I have run geth --syncmode fast -cache 4096 --rpc Here is a logs

INFO [12-19|09:47:50.058] Imported new state entries               count=1920 elapsed=10.233ms  processed=95992059 pending=96261  retry=0   duplicate=1395 unexpected=4791
INFO [12-19|09:47:50.640] Imported new state entries               count=2303 elapsed=18.171ms  processed=95994362 pending=94952  retry=0   duplicate=1395 unexpected=4791
INFO [12-19|09:47:51.438] Imported new state entries               count=2303 elapsed=18.671ms  processed=95996665 pending=93400  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:47:52.352] Imported new state entries               count=2303 elapsed=13.482ms  processed=95998968 pending=91851  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:47:53.115] Imported new state entries               count=2304 elapsed=13.784ms  processed=96001272 pending=90126  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:47:53.828] Imported new state entries               count=2303 elapsed=20.514ms  processed=96003575 pending=88368  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:47:54.691] Imported new state entries               count=1535 elapsed=13.454ms  processed=96005110 pending=89066  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:47:55.340] Imported new state entries               count=768  elapsed=4.045ms   processed=96005878 pending=92124  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:47:55.796] Imported new state entries               count=768  elapsed=4.450ms   processed=96006646 pending=94755  retry=0   duplicate=1395 unexpected=4791
INFO [12-19|09:47:56.194] Imported new state entries               count=1150 elapsed=7.060ms   processed=96007796 pending=95778  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:47:56.935] Imported new state entries               count=2302 elapsed=15.676ms  processed=96010098 pending=94875  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:47:57.621] Imported new state entries               count=2304 elapsed=13.806ms  processed=96012402 pending=93302  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:47:58.482] Imported new state entries               count=2302 elapsed=18.590ms  processed=96014704 pending=91620  retry=0   duplicate=1395 unexpected=4791
INFO [12-19|09:47:58.980] Imported new state entries               count=2302 elapsed=15.170ms  processed=96017006 pending=89935  retry=0   duplicate=1395 unexpected=4791
INFO [12-19|09:47:59.764] Imported new state entries               count=1536 elapsed=12.661ms  processed=96018542 pending=89838  retry=0   duplicate=1395 unexpected=4791
INFO [12-19|09:47:59.810] Imported new block headers               count=1    elapsed=11.783ms  number=6914226 hash=854d8d…fab48e age=1m3s
INFO [12-19|09:48:00.193] Imported new state entries               count=1534 elapsed=9.662ms   processed=96020076 pending=89973  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:48:00.827] Imported new state entries               count=1536 elapsed=9.830ms   processed=96021612 pending=90680  retry=2   duplicate=1395 unexpected=4791
INFO [12-19|09:48:01.498] Imported new state entries               count=1918 elapsed=13.084ms  processed=96023530 pending=88465  retry=0   duplicate=1395 unexpected=4791

The logs says that the last block 6914226 is already synced. But when I trying to get last synced block via rpc I am getting 0

How can I solve this issue ?

Yur Gasparyan
  • 203
  • 2
  • 9

1 Answers1

1

The logs says that the last block 6914226 is already synced.

That's not true.

As long as you see in the logs INFO [xx-xx|xx:xx:xx] Imported new state entries .... the network is syncing.

You can check progress with command eth.syncing(from the geth console), if syncing is on going you must see:

{                         
  "currentBlock": xxxxxxx,  
  "highestBlock": xxxxxxx,  
  "knownStates": xxxxxxx,   
  "pulledStates": xxxxxxx,  
  "startingBlock": xxxxxxx  
} 

When process is complete you'll see INFO [xx-xx|xx:xx:xx] Imported new chain segment ... entries in the log.

Roman Kiselenko
  • 925
  • 5
  • 13