Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Сan't sync last 64-100 block #22873

Closed
ArtemkaMakarenko opened this issue May 13, 2021 · 1 comment
Closed

Сan't sync last 64-100 block #22873

ArtemkaMakarenko opened this issue May 13, 2021 · 1 comment
Labels

Comments

@ArtemkaMakarenko
Copy link

Ethereum node stuck, and can't sync last 64-100 block.
currentBlock cannot catch up and be equal to highestBlock
I studied these articles but none of the above solved my problem.
ethereum/mist#3760 (comment)
https://geth.ethereum.org/docs/faq

System information

ran on a powerful server on ssd disks.
use docker image ethereum/client-go:v1.10.3 , ethereum/client-go:v1.10.2 , ethereum/client-go:v1.10.1
/ # geth version
Geth
Version: 1.10.3-stable
Git Commit: 991384a
Git Commit Date: 20210505
Architecture: amd64
Go Version: go1.16.3
Operating System: linux
GOPATH=
GOROOT=go
/ #
/ # geth attach http://127.0.0.1:8545
Welcome to the Geth JavaScript console!
instance: Geth/v1.10.3-stable-991384a7/linux-amd64/go1.16.3
at block: 0 (Thu Jan 01 1970 00:00:00 GMT+0000 (UTC))
modules: debug:1.0 eth:1.0 net:1.0 personal:1.0 rpc:1.0 web3:1.0
To exit, press ctrl-d

eth.syncing
{
currentBlock: 12426171,
highestBlock: 12426265,
knownStates: 475449342,
pulledStates: 475423888,
startingBlock: 12424165
}
eth.syncing
{
currentBlock: 12426171,
highestBlock: 12426286,
knownStates: 475480967,
pulledStates: 475456631,
startingBlock: 12424165
}
eth.syncing
{
currentBlock: 12426171,
highestBlock: 12426293,
knownStates: 475496629,
pulledStates: 475473187,
startingBlock: 12424165
}
eth.syncing
{
currentBlock: 12426235,
highestBlock: 12426300,
knownStates: 475504019,
pulledStates: 475481500,
startingBlock: 12424165
}
eth.syncing
{
currentBlock: 12426299,
highestBlock: 12426365,
knownStates: 475621554,
pulledStates: 475581058,
startingBlock: 12424165
}
eth.syncing
{
currentBlock: 12426427,
highestBlock: 12426502,
knownStates: 478070262,
pulledStates: 477957170,
startingBlock: 12424165
}
logs
INFO [05-13|13:43:54.657] Imported new block headers count=2 elapsed=49.410ms number=12,426,352 hash=eef0b3..d4cfd0
INFO [05-13|13:43:55.459] Downloader queue stats receiptTasks=0 blockTasks=0 itemSize=262.42KiB throttle=250
INFO [05-13|13:43:56.618] Imported new state entries count=384 elapsed="83.075µs" processed=475,562,946 pending=54956 trieretry=0 coderetry=0 duplicate=273 unexpected=876
WARN [05-13|13:43:57.113] Stalling state sync, dropping peer peer=c01e5f123f4272e3cffc2a73da9d1424f6c57c8f9dc4ab1927218173c47a37aa
ERROR[05-13|13:43:57.132] Ethereum peer removal failed peer=c01e5f12 err="peer not registered"
INFO [05-13|13:44:00.347] Imported new state entries count=768 elapsed=22.575ms processed=475,563,714 pending=54232 trieretry=2 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:44:00.533] Initializing state bloom items=201,268,138 errorrate=0.000 elapsed=28m18.731s
INFO [05-13|13:44:07.334] Imported new block headers count=1 elapsed=18.526ms number=12,426,353 hash=02f20b..fbafb2
INFO [05-13|13:44:08.539] Initializing state bloom items=201,276,006 errorrate=0.000 elapsed=28m26.737s
INFO [05-13|13:44:08.750] Imported new state entries count=384 elapsed="3.766µs" processed=475,564,098 pending=54629 trieretry=0 coderetry=0 duplicate=273 unexpected=876
WARN [05-13|13:44:10.031] Dropping unsynced node during sync id=53455744030e83cc conn=dyndial addr=143.198.119.44:30303 type=Geth/v1.10.1-stable-...
INFO [05-13|13:44:13.337] Imported new state entries count=384 elapsed=2.902ms processed=475,564,482 pending=54335 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:44:16.556] Initializing state bloom items=201,283,706 errorrate=0.000 elapsed=28m34.754s
INFO [05-13|13:44:17.701] Imported new state entries count=384 elapsed=3.100ms processed=475,564,866 pending=54026 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:44:20.812] Imported new state entries count=384 elapsed=2.336ms processed=475,565,250 pending=53869 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:44:24.556] Initializing state bloom items=201,292,766 errorrate=0.000 elapsed=28m42.754s
INFO [05-13|13:44:26.589] Imported new state entries count=384 elapsed=1.913ms processed=475,565,634 pending=53781 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:44:32.354] Imported new state entries count=384 elapsed=1.437ms processed=475,566,018 pending=53912 trieretry=2 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:44:32.531] Imported new block headers count=1 elapsed=6.185ms number=12,426,354 hash=f41b8a..83ef78
INFO [05-13|13:44:32.561] Initializing state bloom items=201,301,452 errorrate=0.000 elapsed=28m50.759s
WARN [05-13|13:44:32.752] Dropping unsynced node during sync id=7a163552d8aeafa5 conn=dyndial addr=198.199.77.203:30303 type=Geth/v1.10.1-stable-...
INFO [05-13|13:44:35.809] Imported new state entries count=384 elapsed=1.823ms processed=475,566,402 pending=54206 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:44:38.979] Imported new block headers count=2 elapsed=38.064ms number=12,426,356 hash=a3c3a8..99ad3a
INFO [05-13|13:44:40.565] Initializing state bloom items=201,309,491 errorrate=0.000 elapsed=28m58.763s
INFO [05-13|13:44:42.660] Imported new state entries count=770 elapsed=10.452ms processed=475,567,172 pending=54883 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:44:48.569] Initializing state bloom items=201,316,918 errorrate=0.000 elapsed=29m6.767s
INFO [05-13|13:44:51.768] Imported new block headers count=1 elapsed=6.028ms number=12,426,357 hash=c620f2..97c754
INFO [05-13|13:44:51.856] Imported new state entries count=768 elapsed=15.386ms processed=475,567,940 pending=55127 trieretry=382 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:44:55.007] Imported new block headers count=1 elapsed=18.947ms number=12,426,358 hash=5c8cb6..f90ef1
INFO [05-13|13:44:55.783] Downloader queue stats receiptTasks=0 blockTasks=0 itemSize=269.09KiB throttle=244
INFO [05-13|13:44:56.577] Initializing state bloom items=201,325,247 errorrate=0.000 elapsed=29m14.774s
INFO [05-13|13:45:00.834] Imported new state entries count=665 elapsed=9.326ms processed=475,568,605 pending=55605 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:01.414] Imported new block headers count=1 elapsed=6.023ms number=12,426,359 hash=74fd69..d710af
INFO [05-13|13:45:04.577] Initializing state bloom items=201,333,360 errorrate=0.000 elapsed=29m22.774s
INFO [05-13|13:45:04.832] Imported new state entries count=384 elapsed=3.715ms processed=475,568,989 pending=55285 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:08.878] Imported new state entries count=384 elapsed=1.571ms processed=475,569,373 pending=55448 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:10.890] Imported new block headers count=2 elapsed=11.313ms number=12,426,361 hash=366ee7..2a437e
INFO [05-13|13:45:12.545] Imported new state entries count=768 elapsed=2.382ms processed=475,570,141 pending=55816 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:12.577] Initializing state bloom items=201,349,114 errorrate=0.000 elapsed=29m30.774s
INFO [05-13|13:45:15.022] Imported new state entries count=384 elapsed=1.146ms processed=475,570,525 pending=56079 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:16.495] Imported new state entries count=384 elapsed=5.304ms processed=475,570,909 pending=55986 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:18.115] Imported new state entries count=384 elapsed=1.039ms processed=475,571,293 pending=56242 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:20.577] Initializing state bloom items=201,373,498 errorrate=0.000 elapsed=29m38.775s
INFO [05-13|13:45:21.194] Imported new state entries count=384 elapsed=1.254ms processed=475,571,677 pending=56386 trieretry=2 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:23.299] Imported new state entries count=384 elapsed=2.142ms processed=475,572,061 pending=56455 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:25.425] Imported new state entries count=386 elapsed=2.169ms processed=475,572,447 pending=56460 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:27.313] Imported new state entries count=768 elapsed=5.299ms processed=475,573,215 pending=55935 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:28.577] Initializing state bloom items=201,399,715 errorrate=0.000 elapsed=29m46.775s
INFO [05-13|13:45:31.571] Imported new state entries count=384 elapsed="174.6µs" processed=475,573,599 pending=56432 trieretry=0 coderetry=0 duplicate=273 unexpected=876
WARN [05-13|13:45:31.572] Stalling state sync, dropping peer peer=302e88cf2fba4a6de2ec13bb056aa5c8b1ea4edb3aeaefdff4da036fcda0ce26
ERROR[05-13|13:45:31.573] Ethereum peer removal failed peer=302e88cf err="peer not registered"
INFO [05-13|13:45:33.432] Imported new state entries count=687 elapsed=5.249ms processed=475,574,286 pending=55881 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:36.577] Initializing state bloom items=201,424,595 errorrate=0.000 elapsed=29m54.775s
INFO [05-13|13:45:36.895] Imported new state entries count=768 elapsed=2.948ms processed=475,575,054 pending=56028 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:37.902] Imported new state entries count=768 elapsed=5.552ms processed=475,575,822 pending=55432 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:39.007] Imported new block headers count=1 elapsed=16.308ms number=12,426,362 hash=fe3f59..791ac4
INFO [05-13|13:45:39.880] Imported new state entries count=768 elapsed=4.253ms processed=475,576,590 pending=55262 trieretry=0 coderetry=0 duplicate=273 unexpected=876
WARN [05-13|13:45:39.888] Pivot became stale, moving old=12,426,236 new=12,426,300
INFO [05-13|13:45:40.288] Imported new block receipts count=64 elapsed=398.398ms number=12,426,299 hash=35e037..3fee26 age=14m size=6.90MiB
INFO [05-13|13:45:41.295] Imported new state entries count=384 elapsed=4.387ms processed=475,576,974 pending=54848 trieretry=0 coderetry=0 duplicate=273 unexpected=876
INFO [05-13|13:45:42.080] Imported new state entries count=273 elapsed="3.579µs" processed=475,577,247 pending=4332 trieretry=0 coderetry=0 duplicate=273 unexpected=876

@MariusVanDerWijden
Copy link
Member

It's not stuck, it needs to sync the state now.
An Ethereum node has all old blocks and the current state of all smart contracts/balances. During sync we need to download all old blocks and the current state. Your node has synced the old blocks, but it has not synced the state yet.
You can see that the knownStates which are the states that you need to download differ from the pulledStates which are the states that you already downloaded. The pulledStates are increasing between subsequent calls to eth.syncing which indicates that you node is downloading the state. So your not stuck, you just need to download more. You can run --syncmode=snap instead of fast sync which improves the state download drastically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants