Fantom-foundation / go-opera

Opera blockchain protocol secured by the Lachesis consensus algorithm
https://fantom.foundation/
GNU Lesser General Public License v3.0
283 stars 283 forks source link

Snap sync from scratch never finishes sync #536

Closed hdiass closed 9 months ago

hdiass commented 9 months ago

Describe the bug Been syncing a node from scratch with snapsync, and the --db.preset=ldb-1 but the sync never finishes, last year around the june i was able to sync this node from scratch using same configs.

To Reproduce Steps to reproduce the behavior: Try to snapsync a fullnode from scratch.

Expected behavior Expected to see a snap sync finishes in less than 48h.

Additional context v1.1.3-rc.5

valamidev commented 9 months ago

Same here, it did stuck in infinite State heal: After ~1 Week: 02-01|13:01:50.294] State heal in progress accounts=741,112@48.77MiB slots=2,065,457@141.94MiB codes=77@837.83KiB nodes=18,007,317@6.09GiB pending=22874

It was a on a Machine with basically infinite resources, `m7i.24xlarge.

quan8 commented 9 months ago

Hi @hdiass , @valamidev , which command did you use to run your node? You may try with the following command: nohup ./opera --genesis mainnet-109331-no-history.g --datadir /path/snapsync/.opera --maxpeers 135 --cache 15000 --db.preset ldb-1 --syncmode snap &

hdiass commented 9 months ago

Hello @quan8 , i use basically your command, just added the maxpeers and cache args. Node is running for 2 hours+ with those and still in that state healing phase..Will leave it for the weekend to see if it catches up..but not very faithful

hdiass commented 9 months ago

So far haven't synced

hdiass commented 9 months ago

Checked today, and still the same

hdiass commented 9 months ago

Can you advise on what should i do to make snapsync work ?

hdiass commented 9 months ago

10 days and still same

valamidev commented 9 months ago

Same here, it will never finish the state heal process.

hdiass commented 9 months ago

Impressive, last june i was able to sync this in 1 day with snapsync..

quan8 commented 9 months ago

Hi @valamidev @hdiass , you may check this guide: https://docs.fantom.foundation/node/troubleshooting#id-4.2-slow-syncing

There are few people who got their node set up this week within a day after replacing their disk. So possibly you'll need to tweak your machine. For further support, please go to our discord channel.

hdiass commented 9 months ago

ended up being the flag --gcmode=light the problem, removed it synced in 1 day