1

I've been trying to sync my Go-Ethereum node in snap sync for a while. It completely downloaded all of the block headers in ~3 days but is currently stuck in the state heal process. There are over 197 million accounts, and if I'm correct in thinking that the state heal will continue until all accounts are synced, it will take my node around 200 days to sync. Is there a metric I'm missing, or am I syncing too slowly?

My specs: Trying to sync on a Macbook PRO 2018 with an external SSD Samsung QVO 870. --cache=4096

Last log after running state heal for a day:

INFO [05-30|15:53:30.031] State heal in progress [email protected] slots=296,[email protected] [email protected] nodes=33,181,[email protected] pending=92534

2
  • It's been a year since this was posted and I am curious to know what happened in the end because I just entered the state healing phase and I also suspected that it will take months if it has to heal all nodes.
    – damavrom
    Commented May 28, 2023 at 20:54
  • 1
    @damavrom It finished in just under a week. I'm no expert, but I say don't really check the number of accounts. It didn't heal all accounts at the end of the sync progress, so you will probably be fine. Just leave it 1-2 weeks I guess.
    – cpix
    Commented May 29, 2023 at 19:44

1 Answer 1

2

When you start syncing, geth downloads the state tries for that moment. So when downloading is completed, geth needs to catch up for all the changes that happened on the state while your client was downloading. This is called state healing. Therefore, the faster your client downloads the state, the less the healing it needs to do.

In the geth documentation says that you can't know how long it may take to heal the state. But I believe you can make a rough estimation. You have to look at the logs to find out how fast your client heals accounts. I figured mine healed around 16 accounts/s. (Unfortunately eth.syncing doesn't give this info.) You look on etherscan.io to see how many daily active accounts there are, so you can know how fast the state changes. These days (2023/6) there are ~400.000 daily active accounts, so the rate the state changes is ~4.6 accounts/s. To know when your client will heal up to the state you have to use this formula:

time_heal_ends = (account_healing_speed*time_healing_started-state_change_rate*time_sync_started)
                 /(account_healing_speed-state_change_rate)

My client took 46 hours to heal and this formula was the most precise I could think of. It estimated the healing time to be within half an hour of the actual time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.