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

What is the upper bound of "imported new state entries"? When will it end? #15616

Closed
idotial opened this issue Dec 6, 2017 · 168 comments
Closed

Comments

@idotial
Copy link

idotial commented Dec 6, 2017

System information

Geth version: 1.7.2
OS & Version: OSX

Expected behaviour

geth --fast should finish soon.

Actual behaviour

it run for 3days and print “Imported new state entries count=384 elapsed=26.970ms processed=50023987 pending=33074 retry=0 duplicate=19087 unexpected=47765” constantly

Steps to reproduce the behaviour

run geth --fast in console

Backtrace

INFO [12-06|07:08:00] Imported new state entries count=1259 elapsed=12.971ms processed=50014526 pending=34891 retry=0 duplicate=19087 unexpected=47765
INFO [12-06|07:08:23] Imported new state entries count=774 elapsed=8.950ms processed=50015300 pending=34311 retry=0 duplicate=19087 unexpected=47765
INFO [12-06|07:08:31] Imported new state entries count=1125 elapsed=9.513ms processed=50016425 pending=33428 retry=0 duplicate=19087 unexpected=47765
INFO [12-06|07:08:39] Imported new state entries count=1061 elapsed=11.198ms processed=50017486 pending=32566 retry=0 duplicate=19087 unexpected=47765
INFO [12-06|07:08:49] Imported new state entries count=1314 elapsed=12.041ms processed=50018800 pending=31248 retry=0 duplicate=19087 unexpected=47765
INFO [12-06|07:09:10] Imported new state entries count=1028 elapsed=10.446ms processed=50019828 pending=30496 retry=0 duplicate=19087 unexpected=47765
INFO [12-06|07:09:25] Imported new state entries count=1241 elapsed=10.423ms processed=50021069 pending=30088 retry=0 duplicate=19087 unexpected=47765
INFO [12-06|07:09:37] Imported new state entries count=777 elapsed=6.224ms processed=50021846 pending=29851 retry=26 duplicate=19087 unexpected=47765

@asgs
Copy link

asgs commented Dec 6, 2017

I don't exactly know "how long" it would take, but it's suggested to let it run for as long as it takes. It took me 12-15 hours on my 8-core i7 machine with --cache set to 10 GB of RAM.

@asgs
Copy link

asgs commented Dec 6, 2017

Similar issues #14647 and #15001

@idotial
Copy link
Author

idotial commented Dec 7, 2017

@asgs I have read issues before, they don't make any sense. I just want to know how long I have to wait, and should I stop it. yesterday eth.syncing return false, and few minutes later, it print like "{
currentBlock: 4685483,
highestBlock: 4685675,
knownStates: 51479249,
pulledStates: 51462166,
startingBlock: 4681817
}" again. should I stop it, and update geth and mist? I see there is a new version 1.7.3.

@mshvarts
Copy link

mshvarts commented Dec 7, 2017

@idotial how long have u been waiting and do u have an ssd/fast internet? No u probably shouldnt stop it, but you can try... it took me like 6 hours on importing the states part yesterday. also how much ram do u have? maybe thats an issue

@keznerve
Copy link

keznerve commented Dec 20, 2017

i have the same problem i am using Version: 1.7.3-stable on OSX i used geth syncmode="light" in terminal.
ive got 251 GB Flash Storage and 8gb of ram

here is theeth.syncing so far

  currentBlock: 4762485,
  highestBlock: 4762629,
  knownStates: 14708481,
  pulledStates: 14675786,
  startingBlock: 0

The problem is i dont have enough disk space or i have 7GB and im not sure weather to throw away my old chain.data and trust it will be ok. Because if it doesnt work i will have to do it again and it still might not work and i wont have any chain.data All this to get my DAO withdrawal contract to work.

How much space did you need to finish the sync and did it work?

@xstalpha
Copy link

Did it ever finish?

@idotial
Copy link
Author

idotial commented Dec 29, 2017

@xstalpha It's still running, but it start to Imported new chain segment, so I guest it's alright.

@idotial
Copy link
Author

idotial commented Dec 29, 2017

@keznerve just stop it. you can add an Portable Hard Disk, and rerun it.

@idotial
Copy link
Author

idotial commented Dec 29, 2017

@ugotjelly I stop it, and restart it few times. and now the log is 'Imported new chain segment', so maybe it's will finish in several days.

@keznerve
Copy link

keznerve commented Dec 29, 2017

Hi yes it finished ...it went up to 38GB on the 19th ofDec it got me to clear out all the crap on my Mac, to save space ; the Import new chain segment lasted a a few hours it all made sense in the end , it had more warnings towards the finish but i didnt stop it. The whole thing took around 15hrs . I havent done it since. I did get my ETH from the withdraw DAO contract.

@idotial
Copy link
Author

idotial commented Jan 2, 2018

@keznerve congratulation! It seems you have better network

@GoodMirek
Copy link

GoodMirek commented Jan 13, 2018

In my case millions of Imported new state entries happen at the ens of fast sync. The import works fine for some time, then slows down to almost stop while continuously dropping peers Stalling state sync, dropping peer.
I have tried to serve light peers, but in that case import of the state always fails after some time with error Node data write error. So I disabled --lightserv and ended up with the issue described above.
I run dedicated node in cloud, with SSD and fast internet. Cache is 2GB (--cache 2048).

@ekryski
Copy link

ekryski commented Jan 19, 2018

I was also seeing this with current master (1.8.0). 1.7.3 is pulling in chain state properly however is too slow to catch up on non-SSD disks.

I think this PR is going to be a big win.

@100Jason
Copy link

I just finished fast syncing with Geth 1.7.3 64-bit for Windows using an SSD and wanted to leave this data point for others. It took a little more than 2 days.

eth.syncing
{
 currentBlock: 4999894,
 highestBlock: 4999897,
 knownStates: 80999148,
 pulledStates: 80999148,
 startingBlock: 4999894
}

Yep, finished syncing just short of block 5,000,000. That's about 81 million known states for 5 million blocks. The database size on disk is 66,323,816,699. I kept getting crashes using the 1.7.2 that came with the wallet even going to an SSD. Parity in warp mode was also crashing.

@jackoelv
Copy link

jackoelv commented Feb 6, 2018

thanks much

@ghost
Copy link

ghost commented Feb 11, 2018

81 million known states for 5 million blocks 😱 😨

Currently at currentBlock=5071336 and knownStates=66991785

At least I know there's some way to go yet...

Been at this for ~8 hours on an Amazon EC2 m5.4xlarge.

@rhaps107
Copy link
Contributor

@hynese did it finish?

@ghost
Copy link

ghost commented Feb 12, 2018

Haven't had a chance to check yet. I was up over 80 million state at midnight last night (15 hours ago) and was still at eth.blockNumber=0 then.

@ghost
Copy link

ghost commented Feb 12, 2018

Yes, I'm in sync now.

Finally...

Several hours to go from 0 to ~85 million knownStates

@martindye
Copy link

Appreciate you guys letting us know how many ironically named "known states" there are :-D

@rhaps107
Copy link
Contributor

@martindye it finished for (took 15 hours). Unfortunately after download that metrics are hidden, but i think last number of states i saw was 100M

@GoodMirek
Copy link

On a machine with slow disk subsystem and the new trie cache (merged in v1.8.0) it took six days to perform fast sync. Before the new cache has been implemented, the node was not able to stay in sync.
State entries import stopped just before 100M mark:

INFO [02-17|18:26:09] Imported new state entries               count=221  elapsed=3.390ms    processed=99338822 pending=0      retry=0    duplicate=33987 unexpected=139311
INFO [02-17|18:26:09] Imported new block receipts              count=0    elapsed=343.488µs  number=5081106 hash=bae2fd…909c39 size=0.00B    ignored=1
INFO [02-17|18:26:09] Committed new head block                 number=5081106 hash=bae2fd…909c39

@torinat
Copy link

torinat commented Mar 7, 2018

is still being updated...
{
currentBlock: 5204440,
highestBlock: 5211269,
knownStates: 100913700,
pulledStates: 100893264,
startingBlock: 0
}

@keznerve
Copy link

keznerve commented Mar 7, 2018

i downloaded the Geth 1.8.1 on ethereum wallet and got locked out...unfortunately i didnt have any luck after December running fast client. I have had to ditch the Node for now. Hope it all works out soon .

@johnkbarrera
Copy link

INFO [04-17|10:02:46] Imported new state entries count=0 elapsed=729.752ms processed=121292080 pending=2995 retry=16 duplicate=26888 unexpected=32477
INFO [04-17|10:02:46] Imported new state entries count=200 elapsed=17.6µs processed=121292280 pending=2995 retry=16 duplicate=26888 unexpected=32477
INFO [04-17|10:02:50] Imported new state entries count=0 elapsed=164.846ms processed=121292280 pending=3186 retry=92 duplicate=26981 unexpected=32477
INFO [04-17|10:02:51] Imported new block headers count=0 elapsed=86.325µs number=5457364 hash=3054b0…74d7ae ignored=1
WARN [04-17|10:03:00] Synchronisation failed, retrying err="block body download canceled (requested)"
INFO [04-17|10:03:34] Imported new block headers count=2 elapsed=7.211ms number=5457378 hash=fb48cd…4ba488 ignored=79
INFO [04-17|10:03:35] Imported new block headers count=2 elapsed=5.819ms number=5457380 hash=67b961…83eceb ignored=0
what is hapening?

@torinat
Copy link

torinat commented Apr 17, 2018

approximately 130 millions, three weeks ago(state entries)

@tobernguyen
Copy link

Just finished today, the last knownStates I saw is 130622327

@erickhun
Copy link

erickhun commented May 8, 2018

As for 8th May 2018, with geth 1.8.7-stable you'll need 87GB and have downloaded 134526609 "knownStates" for a t2.medium instance on AWS with their default SSD. The fast sync completed in about 42hours. Hope that helps some people !

@TS2Git
Copy link

TS2Git commented May 18, 2018

Just wanted to say thanks to the last 3 responders for actually giving a number! Every other thread on this topic just tells people to run in light mode, use MEW, etc, etc. At least I know what I'm in for here (I'm chugging along at 129mm states at the moment, hoping the target is about 140mm now). I'll endeavor to post the most recent state number when complete. Would be nice if this number could be found somewhere (like etherscan).

The answer: As of May 18, it finally completed at 140,936,000

@shawhu
Copy link

shawhu commented May 18, 2018

just want to know say for an instance of 8Gb of memory, what the cache setting should be? 4096?
my current eth.syncing result is
{
currentBlock: 5637459,
highestBlock: 5637534,
knownStates: 51360598,
pulledStates: 51336172,
startingBlock: 4363788
}
already running for 20 hours. and yesterday, the disk IO was 180/170 write/read per second, the cpu went up 60-70%, now it's almost like it's doing nothing, everything is low.
screen shot 2018-05-19 at 7 49 17 am

so when it's pulling states (instead of blocks), it almost seems like the current geth (1.8.8 stable) is not trying very hard to complete the job...

process:
geth --syncmode fast --cache 2048 --rpc
hardware:
ec2, t2.large instance which has 8gb of memory and 2 cores.

Update on 5/20/2018:
I've restarted the geth process and it'd improved, at least the disk IO shows it's active now.
image
eth syncing returns
{
currentBlock: 5643662,
highestBlock: 5643742,
knownStates: 133445120,
pulledStates: 133438316,
startingBlock: 5643648
}
I think it's almost done now, the knownstates should be around 14xxxxxxx

Update:
sync achieved, finally. I however can't really tell the pulledstates value because now eth.syncing returns false. anybody can tell me how to get pulledstates after you achieve sync status? the last saw was 14xxxxxxx. but now I don't know how to get pulledstates count anymore.

@Duncan-Brain
Copy link

Duncan-Brain commented Nov 2, 2020

Can anyone suggest monitoring or other tests I can perform to understand where the bottleneck is?

I'll second that. I am also finding it hard to tell if there is an issue syncing without knowing whether I am catching up or falling behind. And a generic what to do about it.

@Xavier59
Copy link

Xavier59 commented Nov 2, 2020

It took me approximately 36 hours to sync.
Here is the current state :

 INFO [11-02|05:35:50.478] Imported new block receipts              count=1    elapsed=4.983ms    number=11175392 hash="d37205…f8de8a" age=24m44s   size=87.40KiB
INFO [11-02|05:35:50.492] Committed new head block                 number=11175392 hash="d37205…f8de8a"
INFO [11-02|05:35:50.562] Deallocated fast sync bloom              items=619579733 errorrate=0.001

970 EVO NVMe M.2 SSD 1TB
AMD Ryzen 7 1700 (3.0 GHz)
DDR4 Corsair Vengeance LPX, Noir, 4 x 8 Go, 3200 MHz,
CAS 16

Good luck !

@Neurone
Copy link
Contributor

Neurone commented Nov 12, 2020

Sharing data of my fully synced node also, maybe it is useful to others.

D:\Program Files\Geth>geth --datadir s:\Ethereum inspect
INFO [11-11|19:19:15.793] Maximum peer count                       ETH=50 LES=0 total=50
INFO [11-11|19:19:16.156] Set global gas cap                       cap=25000000
INFO [11-11|19:19:16.160] Allocated cache and file handles         database=s:\Ethereum\geth\chaindata cache=512.00MiB handles=8192
INFO [11-11|19:19:27.022] Opened ancient database                  database=s:\Ethereum\geth\chaindata\ancient
INFO [11-11|19:19:27.046] Disk storage enabled for ethash caches   dir=s:\Ethereum\geth\ethash count=3
INFO [11-11|19:19:27.051] Disk storage enabled for ethash DAGs     dir=C:\Users\giuse\AppData\Local\Ethash count=2
INFO [11-11|19:19:27.059] Loaded most recent local header          number=11237906 hash="d8c4b8…c3f1e9" td=18641055599883751407245 age=53s
INFO [11-11|19:19:27.069] Loaded most recent local full block      number=11237906 hash="d8c4b8…c3f1e9" td=18641055599883751407245 age=53s
INFO [11-11|19:19:27.079] Loaded most recent local fast block      number=11237906 hash="d8c4b8…c3f1e9" td=18641055599883751407245 age=53s
INFO [11-11|19:19:27.087] Loaded last fast-sync pivot marker       number=10760885
INFO [11-11|19:19:35.100] Inspecting database                      count=4996000 elapsed=8.002s
INFO [11-11|19:19:43.108] Inspecting database                      count=10062000 elapsed=16.010s
INFO [11-11|19:19:51.115] Inspecting database                      count=14730000 elapsed=24.017s
INFO [11-11|19:19:59.123] Inspecting database                      count=19415000 elapsed=32.025s
...
INFO [11-11|19:50:45.078] Inspecting database                      count=1815272000 elapsed=31m17.980s
INFO [11-11|19:50:53.083] Inspecting database                      count=1821919000 elapsed=31m25.985s
INFO [11-11|19:51:01.090] Inspecting database                      count=1828550000 elapsed=31m33.992s
INFO [11-11|19:51:09.097] Inspecting database                      count=1835247000 elapsed=31m41.999s
+-----------------+--------------------+------------+-----------+
|    DATABASE     |      CATEGORY      |    SIZE    |   ITEMS   |
+-----------------+--------------------+------------+-----------+
| Key-Value store | Headers            | 54.97 MiB  |    100438 |
| Key-Value store | Bodies             | 3.52 GiB   |     98390 |
| Key-Value store | Receipt lists      | 4.48 GiB   |     98390 |
| Key-Value store | Difficulties       | 7.11 MiB   |    113813 |
| Key-Value store | Block number->hash | 6.04 MiB   |    113813 |
| Key-Value store | Block hash->number | 439.41 MiB |  11237928 |
| Key-Value store | Transaction index  | 30.13 GiB  | 898783141 |
| Key-Value store | Bloombit index     | 1.76 GiB   |   5617664 |
| Key-Value store | Contract codes     | 264.01 MiB |     44710 |
| Key-Value store | Trie nodes         | 130.27 GiB | 880287080 |
| Key-Value store | Trie preimages     | 2.98 GiB   |  45170757 |
| Key-Value store | Account snapshot   | 0.00 B     |         0 |
| Key-Value store | Storage snapshot   | 0.00 B     |         0 |
| Key-Value store | Clique snapshots   | 0.00 B     |         0 |
| Key-Value store | Singleton metadata | 151.00 B   |         5 |
| Ancient store   | Headers            | 4.75 GiB   |  11147907 |
| Ancient store   | Bodies             | 108.13 GiB |  11147907 |
| Ancient store   | Receipt lists      | 50.63 GiB  |  11147907 |
| Ancient store   | Difficulties       | 173.74 MiB |  11147907 |
| Ancient store   | Block number->hash | 404.00 MiB |  11147907 |
| Light client    | CHT trie nodes     | 0.00 B     |         0 |
| Light client    | Bloom trie nodes   | 0.00 B     |         0 |
+-----------------+--------------------+------------+-----------+
|                         TOTAL        | 337.97 GIB |           |
+-----------------+--------------------+------------+-----------+
ERROR[11-11|19:51:16.769] Database contains unaccounted data       size=126.40KiB count=2748

@peterkvasnica
Copy link

I'm trying to do a fastsync on a local server but it seems the disk speed drops off after about 30 minutes of "importing new state entry". I'm running the sync process on machine with SSD, 16GB RAM and i5. Cache is setup to 12GB (fills up only to 50%).

The process starts with about 100-150MB/s I/O and after 30 minutes drops to 10-20MB/s I/O.

Is this normal?
What are the average disk speeds on the import states task?

image

@gregnuj
Copy link

gregnuj commented Nov 28, 2020

I just finished syncing a new node the final count was processed=644366474

@LucasBruder
Copy link

LucasBruder commented Dec 2, 2020

just hit processed=648537261 using around 300GB

@MikeJerred
Copy link

MikeJerred commented Dec 3, 2020

Finished syncing last night, final was: knownStates: 640595237.

Hardware:
Samsung 970 EVO Plus 1TB NVMe SSD
32 GB DDR4 3200MHz RAM - cachesize of 16GB for geth
i7-9700K CPU @ 3.6GHz

@AndreiD
Copy link

AndreiD commented Dec 3, 2020

it would help if you write your hardware too not just the number...

@Neurone
Copy link
Contributor

Neurone commented Dec 5, 2020

I just synced another eth1 full node in 64 hours, processing 650.634.632 state entries, using 282.75 GIB. Full stats below.

Please note that during synchronization the same machine was running a Teku beacon node, so performance could have been better without it. I wanted to test if those two clients can both run smoothly on this mini PC and, spoiler alert, yes they can 😉.

KEY VALUE
Fast sync complete 64 hours
Processed state entries 650.634.632
Storage used 282.75 GIB
OS Ubuntu 20.04.1
Client Geth/v1.9.24-stable-cc05b050/linux-amd64/go1.15.5
Machine MINISFORUM DeskMini UM300 Mini PC
Processor AMD Ryzen™ 3 3300U , 4 Cores/4 Threads
Memory DDR4 8GB Dual channel (min. 1 GB reserved for graphic card, so actual RAM 7GB!)
Storage n.1 Kingston M.2 2280 256GB SATA SSD (used by Teku)
Storage n.2 Crucial BX500 1TB SATA SSD (used by Geth)
Connectivity Ethernet 1Gb
ISP Fastweb, Italy
./geth
INFO [12-02|03:57:17.926] Starting Geth on Ethereum mainnet...
INFO [12-02|03:57:17.927] Bumping default cache on mainnet         provided=1024 updated=4096
WARN [12-02|03:57:17.927] Sanitizing cache to Go's GC limits       provided=4096 updated=2323
INFO [12-02|03:57:17.934] Maximum peer count                       ETH=50 LES=0 total=50
INFO [12-02|03:57:17.934] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [12-02|03:57:17.936] Set global gas cap                       cap=25000000
INFO [12-02|03:57:17.936] Allocated trie memory caches             clean=580.00MiB dirty=580.00MiB
...
INFO [12-02|03:57:18.015] Writing default main-net genesis block
INFO [12-02|03:57:18.279] Persisted trie from memory database      nodes=12356 size=1.78MiB time=84.346878ms gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [12-02|03:57:18.279] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000 Petersburg: 7280000 Istanbul: 9069000, Muir Glacier: 9200000, YOLO v2: <nil>, Engine: ethash}"
...
INFO [12-02|03:57:18.280] Initialising Ethereum protocol           versions="[65 64 63]" network=1 dbversion=<nil>
WARN [12-02|03:57:18.280] Upgrade blockchain database version      from=<nil> to=8
INFO [12-02|03:57:18.281] Loaded most recent local header          number=0 hash="d4e567…cb8fa3" td=17179869184 age=51y7mo4w
INFO [12-02|03:57:18.281] Loaded most recent local full block      number=0 hash="d4e567…cb8fa3" td=17179869184 age=51y7mo4w
INFO [12-02|03:57:18.281] Loaded most recent local fast block      number=0 hash="d4e567…cb8fa3" td=17179869184 age=51y7mo4w
INFO [12-02|03:57:18.281] Regenerated local transaction journal    transactions=0 accounts=0
INFO [12-02|03:57:18.298] Allocated fast sync bloom                size=1.13GiB
INFO [12-02|03:57:18.304] Starting peer-to-peer node               instance=Geth/v1.9.24-stable-cc05b050/linux-amd64/go1.15.5
...
INFO [12-02|03:57:18.667] Initialized fast sync bloom              items=12356 errorrate=0.000 elapsed=367.872ms
...
INFO [12-02|03:57:28.334] Block synchronisation started
...
INFO [12-02|03:57:35.319] Imported new state entries               count=1152 elapsed=5.229ms     processed=45201 pending=20345 trieretry=0 coderetry=0 duplicate=0 unexpected=0
INFO [12-02|03:57:35.425] Imported new state entries               count=1152 elapsed=4.800ms     processed=46353 pending=20673 trieretry=0 coderetry=0 duplicate=0 unexpected=0
INFO [12-02|03:57:35.751] Imported new state entries               count=1536 elapsed=8.549ms     processed=47889 pending=19409 trieretry=0 coderetry=0 duplicate=0 unexpected=0
...
INFO [12-04|20:52:06.008] Imported new state entries               count=1996 elapsed=62.015ms    processed=650631754 pending=9510   trieretry=0    coderetry=0 duplicate=126032 unexpected=765459
INFO [12-04|20:52:06.239] Imported new state entries               count=2191 elapsed=141.737ms   processed=650633945 pending=2499   trieretry=0    coderetry=0 duplicate=126032 unexpected=765459
INFO [12-04|20:52:10.981] Imported new state entries               count=687  elapsed=45.228ms    processed=650634632 pending=0      trieretry=0    coderetry=0 duplicate=126032 unexpected=765459
INFO [12-04|20:52:10.998] Committed new head block                 number=11388325 hash="4dfe95…2574b4"
INFO [12-04|20:52:11.049] Deallocated fast sync bloom              items=646967270 errorrate=0.006
...
INFO [12-04|20:52:11.049] Deallocated fast sync bloom              items=646967270 errorrate=0.006
...
INFO [12-04|20:58:18.180] Fast sync complete, auto disabling
./geth inspect
INFO [12-04|22:37:47.671] Maximum peer count                       ETH=50 LES=0 total=50
INFO [12-04|22:37:47.671] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [12-04|22:37:47.672] Set global gas cap                       cap=25000000
...
INFO [12-04|22:37:52.507] Loaded most recent local header          number=11388879 hash="0ec041…573550" td=19169271088158317937607 age=3m28s
INFO [12-04|22:37:52.507] Loaded most recent local full block      number=11388879 hash="0ec041…573550" td=19169271088158317937607 age=3m28s
INFO [12-04|22:37:52.507] Loaded most recent local fast block      number=11388879 hash="0ec041…573550" td=19169271088158317937607 age=3m28s
INFO [12-04|22:37:52.510] Loaded last fast-sync pivot marker       number=11388325
INFO [12-04|22:38:00.533] Inspecting database                      count=10557000 elapsed=8.000s
INFO [12-04|22:38:08.533] Inspecting database                      count=21006000 elapsed=16.000s
INFO [12-04|22:38:16.533] Inspecting database                      count=31660000 elapsed=24.000s
...
INFO [12-04|22:52:30.881] Inspecting database                      count=1561224000 elapsed=14m38.348s
INFO [12-04|22:52:38.881] Inspecting database                      count=1573276000 elapsed=14m46.348s
INFO [12-04|22:52:46.881] Inspecting database                      count=1581359000 elapsed=14m54.348s
+-----------------+--------------------+------------+-----------+
|    DATABASE     |      CATEGORY      |    SIZE    |   ITEMS   |
+-----------------+--------------------+------------+-----------+
| Key-Value store | Headers            | 49.31 MiB  |     90033 |
| Key-Value store | Bodies             | 3.28 GiB   |     90033 |
| Key-Value store | Receipt lists      | 4.08 GiB   |     90033 |
| Key-Value store | Difficulties       | 5.66 MiB   |     99853 |
| Key-Value store | Block number->hash | 4.68 MiB   |     99771 |
| Key-Value store | Block hash->number | 445.31 MiB |  11388911 |
| Key-Value store | Transaction index  | 31.01 GiB  | 924916880 |
| Key-Value store | Bloombit index     | 1.80 GiB   |   5693440 |
| Key-Value store | Contract codes     | 1.59 GiB   |    333905 |
| Key-Value store | Trie nodes         | 71.08 GiB  | 647171117 |
| Key-Value store | Trie preimages     | 8.82 MiB   |    132275 |
| Key-Value store | Account snapshot   | 0.00 B     |         0 |
| Key-Value store | Storage snapshot   | 0.00 B     |         0 |
| Key-Value store | Clique snapshots   | 0.00 B     |         0 |
| Key-Value store | Singleton metadata | 151.00 B   |         5 |
| Ancient store   | Headers            | 4.83 GiB   |  11298879 |
| Ancient store   | Bodies             | 111.38 GiB |  11298879 |
| Ancient store   | Receipt lists      | 52.63 GiB  |  11298879 |
| Ancient store   | Difficulties       | 176.19 MiB |  11298879 |
| Ancient store   | Block number->hash | 409.47 MiB |  11298879 |
| Light client    | CHT trie nodes     | 0.00 B     |         0 |
| Light client    | Bloom trie nodes   | 0.00 B     |         0 |
+-----------------+--------------------+------------+-----------+
|                         TOTAL        | 282.75 GIB |           |
+-----------------+--------------------+------------+-----------+
ERROR[12-04|22:52:52.717] Database contains unaccounted data       size=128.10KiB count=2785

@Duncan-Brain
Copy link

Duncan-Brain commented Dec 11, 2020

What I am looking for from this issue is an approximate formula for states, and some link to a blog or something that has accumulated a bunch of failures of when your system is not ever going to catch up to the header block.

The current method I am using uses the estimate of 3-6k state changes per block (Reference) . Of those 3-6k changes, 2-4k are additions to the state tree and 1-2k are deletions. So delta ~ 3-6k, net ~1-2k per block.

If we use these estimates on @Neurone local state above to make a lower bound ( 650,634,632 in 64 hours) "Total states" = 650,634,632 - (3000x4x60x64) = 604554632 at the start of sync, and "Total states" = 604554632+(1000x4x60x64) = 619914632 at the end of sync.

I think this is a good formula for estimating in lieu of a better way -- so far for me it has correctly predicted my inability to catch up to the header block, I just can't quite figure out my system's issue (my data here). The 3-6k seems outdated so there is also that.

Any formulas or indicators for "never catching up"?

Pulled States vs  Time

@Capsicle1
Copy link

Running a 4gb Raspberry Pi and approaching 900 million state entries and 325gb used.

processed=898488115

@estebaneu
Copy link

FYI, I finished syncing last night:

State entry: 664 401 205

Hardware NUC i5-8259U -16 GB RAM - 1TB NMVE Sabrent Q

@nemwiper
Copy link

Just an update for February:

11797042 blocks
I did not be able to see the last state entry but I think it was around 700 000 000

Node synced in 12 hours on a i7, 32Gb RAM and 500GBSSD in RAID1, dedicated server.

@LEDRGB
Copy link

LEDRGB commented Mar 2, 2021

Not sync yet with 753780733 states :(
image

@LEDRGB
Copy link

LEDRGB commented Mar 25, 2021

Hey, today I finally managed to synchronize the node, I leave you the latest data in case it is useful for someone, it has taken a lot, practically a month :)

image

@DiveInto
Copy link

DiveInto commented Apr 7, 2021

Re-Sync, very close to sync complete

image

@kraymond37
Copy link

Currently

Imported new state entries count=384  elapsed=1.277ms     processed=721310525 pending=19751 trieretry=0   coderetry=0 duplicate=0 unexpected=0

Command

geth --cache=1024 --maxpeers=25 --datadir=/data/eth

SSD used, 8G RAM, currently about 200k state entries per hour, it will take over a month to arrive 900m!

Is there anything that I can do?

@NotSureBTC
Copy link

I am currently at 1059769034 states and still syncing on a Pi 4. Starting to think it may never catch up.
image

@NotSureBTC
Copy link

Upped the clock rate, still not caught up.

image

@damiandennis
Copy link

damiandennis commented Apr 17, 2021

wow 1059769034, I am only at 810953009, still got a long ways to go :/ about two months ago it took me about three days to sync, now its taken a week already, and its super slow, I think it was related to using the lastest client before the berlin fork as soon as it went live the state sync went up significantly but it has slowed down again :/

@damiandennis
Copy link

also about three months ago the state count was ~700000000 seems like it goes up fast.

@NotSureBTC
Copy link

OK I discovered that state entries are misleading, I copied the chain over from my synchronized machine and it started at a smaller number. I believe they count a certain number from where it started to where it is now. The longer it takes the higher that number can go, so I believe tracking them here is pointless.

@syedabbast
Copy link

syedabbast commented Jun 3, 2021

It's been a month and knowns states are increasing. should i stop my server and forget about sync? because known states numbers keep changing from 40K to 50K to 35K and next hour it goes back to 40K.

Your help will be appreciated.

This is what I see

eth.syncing
{
currentBlock: 12559714,
highestBlock: 12559782,
knownStates: 54981791,
pulledStates: 54725893,
startingBlock: 12555163
}

Best Regards,
Syed

@LEDRGB
Copy link

LEDRGB commented Jun 3, 2021

Don't worry, I also thought about turning off many times, but you just have to let it work, it is normal that it takes a long time, do not despair :)

@jp-engineer
Copy link

jp-engineer commented Jul 10, 2021

I just finished a fast-sync in the past couple days, unfortunately I had left it running whilst being away so I can't confirm the final number but I saw up to 1,000,000,000 and estimate that at time of writing it's closer to 1,100,000,000.

For those in the thread commenting about Raspberry Pi's I completed the sync with the following setup:

Pi 4 8gb

  • Overclocked to 1.8Ghz

  • Running Raspian Lite 64 Bit (In-Dev)

  • go version: go1.16.5 linux/arm64

  • geth version: CoreGeth 1.12.1-unstable

  • Storage: 1Tb Nvme drive connected via Powered USB 3.0 hub
    - Including: 64GB swap file (swappiness set to 20, VFS cache pressure set to 50)

  • Internet speed: 350 Mbps+

  • Port Forwarding

Unfortunately I tried several configfurations and didn't keep perfect records on the speed increases however: based on the final speeds achieved with the above configuration, I estimate a Pi 4 8gb could sync in about 4-6 days as of July 2021.

EDIT: -cache size 2048, -max_peers 40. Running as a systemd service.

@karalabe karalabe removed this from the Backlog milestone Jun 15, 2022
@holiman
Copy link
Contributor

holiman commented Dec 20, 2022

Fast-sync is no longer available in geth, so I'm closing this

@holiman holiman closed this as completed Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests