I have been syncing my node using "geth console --fast" but it has been stuck at block 4179789 for a long time. It keeps importing new state entries. What's the problem here?
1 Answer
You just have to leave your computer to sync until knownStates
is complete, currently around 20+ million states.
Details
I fast synced my geth
node on a virtual host a few days ago to reduce the disk space usage. Following is the start of the synching process:
Aug 16 01:17:05 GethNode01 systemd[1]: Started Geth.
Aug 16 01:17:05 GethNode01 geth[551]: INFO [08-16|01:17:05] Starting peer-to-peer node instance=Geth/v1.6.7-stable-ab5646c5/linux-amd64/go1.8.1
Aug 16 01:17:05 GethNode01 geth[551]: INFO [08-16|01:17:05] Allocated cache and file handles database=/home/beef/.ethereum/geth/chaindata cache=128 handles=1024
Aug 16 01:17:05 GethNode01 geth[551]: INFO [08-16|01:17:05] Writing default main-net genesis block
Aug 16 01:17:06 GethNode01 geth[551]: INFO [08-16|01:17:06] Initialised chain configuration config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Metropolis: 9223372036854775807 Engine: ethash}"
Aug 16 01:17:06 GethNode01 geth[551]: INFO [08-16|01:17:06] Disk storage enabled for ethash caches dir=/home/beef/.ethereum/geth/ethash count=3
Aug 16 01:17:06 GethNode01 geth[551]: INFO [08-16|01:17:06] Disk storage enabled for ethash DAGs dir=/home/beef/.ethash count=2
Aug 16 01:17:06 GethNode01 geth[551]: WARN [08-16|01:17:06] Upgrading db log bloom bins
Aug 16 01:17:06 GethNode01 geth[551]: INFO [08-16|01:17:06] Bloom-bin upgrade completed elapsed=79.081µs
Aug 16 01:17:06 GethNode01 geth[551]: INFO [08-16|01:17:06] Initialising Ethereum protocol versions="[63 62]" network=1
Aug 16 01:17:06 GethNode01 geth[551]: INFO [08-16|01:17:06] Loaded most recent local header number=0 hash=d4e567…cb8fa3 td=17179869184
Aug 16 01:17:06 GethNode01 geth[551]: INFO [08-16|01:17:06] Loaded most recent local full block number=0 hash=d4e567…cb8fa3 td=17179869184
Aug 16 01:17:06 GethNode01 geth[551]: INFO [08-16|01:17:06] Loaded most recent local fast block number=0 hash=d4e567…cb8fa3 td=17179869184
Aug 16 01:17:06 GethNode01 geth[551]: INFO [08-16|01:17:06] Starting P2P networking
Aug 16 01:17:08 GethNode01 geth[551]: INFO [08-16|01:17:08] UDP listener up self=enode://7624bc015762e52bd350810a3768aad6d65e81dcf4222f29fb9f43d8c0c0ea8cd7c889728d1fea18760903df8cda7bf07aecad89e4a793e6344de07bb53f94f5@[::]:30303
Aug 16 01:17:08 GethNode01 geth[551]: INFO [08-16|01:17:08] RLPx listener up self=enode://7624bc015762e52bd350810a3768aad6d65e81dcf4222f29fb9f43d8c0c0ea8cd7c889728d1fea18760903df8cda7bf07aecad89e4a793e6344de07bb53f94f5@[::]:30303
Aug 16 01:17:08 GethNode01 geth[551]: INFO [08-16|01:17:08] IPC endpoint opened: /home/beef/.ethereum/geth.ipc
Aug 16 01:17:08 GethNode01 geth[551]: INFO [08-16|01:17:08] HTTP endpoint opened: http://127.0.0.1:8545
Aug 16 01:17:13 GethNode01 geth[551]: INFO [08-16|01:17:13] Block synchronisation started
Aug 16 01:17:16 GethNode01 geth[551]: INFO [08-16|01:17:16] Imported new state entries count=1 flushed=0 elapsed=315.946µs processed=1 pending=17 retry=0 duplicate=0 unexpected=0
Aug 16 01:17:16 GethNode01 geth[551]: INFO [08-16|01:17:16] Imported new state entries count=16 flushed=0 elapsed=2.003ms processed=17 pending=273 retry=0 duplicate=0 unexpected=0
Aug 16 01:17:18 GethNode01 geth[551]: INFO [08-16|01:17:18] Imported new state entries count=256 flushed=0 elapsed=37.702ms processed=273 pending=4369 retry=0 duplicate=0 unexpected=0
Aug 16 01:17:18 GethNode01 geth[551]: INFO [08-16|01:17:18] Imported new state entries count=2 flushed=0 elapsed=371.457µs processed=275 pending=4401 retry=0 duplicate=0 unexpected=0
Aug 16 01:17:18 GethNode01 geth[551]: INFO [08-16|01:17:18] Imported new state entries count=2 flushed=0 elapsed=427.094µs processed=277 pending=4433 retry=0 duplicate=0 unexpected=0
Following is the end of the fast syncing process 4 hours and 10 minutes later, show that there were 19,633,962 state entries then:
Aug 16 04:27:27 GethNode01 geth[551]: INFO [08-16|04:27:27] Imported new state entries count=2 flushed=1 elapsed=11.411ms processed=19633957 pending=24 retry=0 duplicate=3456 unexpected=13166
Aug 16 04:27:27 GethNode01 geth[551]: INFO [08-16|04:27:27] Imported new state entries count=1 flushed=4 elapsed=6.913ms processed=19633958 pending=20 retry=0 duplicate=3456 unexpected=13166
Aug 16 04:27:27 GethNode01 geth[551]: INFO [08-16|04:27:27] Imported new state entries count=1 flushed=6 elapsed=223.668µs processed=19633959 pending=14 retry=0 duplicate=3456 unexpected=13166
Aug 16 04:27:30 GethNode01 geth[551]: INFO [08-16|04:27:30] Imported new state entries count=2 flushed=3 elapsed=6.140ms processed=19633961 pending=12 retry=0 duplicate=3456 unexpected=13166
Aug 16 04:27:30 GethNode01 geth[551]: INFO [08-16|04:27:30] Imported new state entries count=1 flushed=12 elapsed=277.963µs processed=19633962 pending=0 retry=0 duplicate=3456 unexpected=13166
Aug 16 04:27:30 GethNode01 geth[551]: INFO [08-16|04:27:30] Imported new block receipts count=1 elapsed=11.176ms number=4161593 hash=e982cd…71c075 ignored=0
Aug 16 04:27:30 GethNode01 geth[551]: INFO [08-16|04:27:30] Committed new head block number=4161593 hash=e982cd…71c075
Aug 16 04:27:40 GethNode01 geth[551]: INFO [08-16|04:27:40] Imported new chain segment blocks=9 txs=1075 mgas=50.943 elapsed=9.553s mgasps=5.332 number=4161602 hash=3fb838…250571
Aug 16 04:27:48 GethNode01 geth[551]: INFO [08-16|04:27:48] Imported new chain segment blocks=12 txs=1069 mgas=61.217 elapsed=8.357s mgasps=7.325 number=4161614 hash=20d39c…ec2034
Aug 16 04:27:57 GethNode01 geth[551]: INFO [08-16|04:27:57] Imported new chain segment blocks=10 txs=1163 mgas=61.370 elapsed=8.748s mgasps=7.015 number=4161624 hash=4c45ab…e51633
Aug 16 04:28:05 GethNode01 geth[551]: INFO [08-16|04:28:05] Imported new chain segment blocks=12 txs=1065 mgas=76.976 elapsed=8.560s mgasps=8.992 number=4161636 hash=a50c2e…b2a50d
Aug 16 04:28:15 GethNode01 geth[551]: INFO [08-16|04:28:15] Imported new chain segment blocks=7 txs=1136 mgas=45.996 elapsed=9.921s mgasps=4.636 number=4161643 hash=ef9d31…33fc3e
In my home network, on a notebook with a solid state drive, this process can take more than a day.
-
1Thanks. Guess I need to be more patient. The sync will get very slow at the end since the last 1024 blocks will be checked thoroughly as if it's a full sync. Commented Aug 20, 2017 at 15:50
-
If you stop Geth (or it crashes), and restart it knownStates and pulledStates are reset to 0. Does this mean Geth has to reimport all state entries? Commented Aug 23, 2017 at 14:44
-
-
Where do you get the number 20M+? My
pulledStates
currently shows1018284
and I am trying to get an idea of how far it needs to go.– Nathan HCommented Jan 24, 2018 at 11:29