[Ethereum] geth mainnet fast sync appears stuck at around 100 blocks from highestBlock

fast-syncgo-ethereummainnet

I started syncing a geth node to the mainnet in fast sync mode 7 days ago. The status is still around 74 blocks behind the highestBlock, e.g. if I run the following:

eth.syncing.highestBlock - eth.syncing.currentBlock

Then I see something between 74 and 100 blocks behind mainnet.

I am running this node on a Digital Ocean droplet with a quad core processor, 8 GB RAM and a 500 GB SSD.

I tried restarting the service and it started off syncing pretty fast again and then got stuck at the same interval of between 74 and 100 blocks behind mainnet.

Can anyone help share some tips on how I might complete this syncing process please?

Any help much appreciated.

Best Answer

That's a normal behavior, you haven't finished to sync the blockchain.

Let's see the Geth documentation (https://geth.ethereum.org/docs/faq).

In fast sync mode, Geth first downloads blocks without executing the transactions :

The current default mode of sync for Geth is called fast sync. Instead of starting from the genesis block and reprocessing all the transactions that ever occurred (which could take weeks), fast sync downloads the blocks, and only verifies the associated proof-of-works. Downloading all the blocks is a straightforward and fast procedure and will relatively quickly reassemble the entire chain.

The client will then download the state trie (which contains accounts data) for and during the latest blocks :

Many people falsely assume that because they have the blocks, they are in sync. Unfortunately this is not the case, since no transaction was executed, so we do not have any account state available (ie. balances, nonces, smart contract code and data). These need to be downloaded separately and cross checked with the latest blocks. This phase is called the state trie download and it actually runs concurrently with the block downloads; alas it take a lot longer nowadays than downloading the blocks.

You should see in your Geth console Imported state entries logs scrolling and you must wait for the sync to complete :

If you see that you are 64 blocks behind mainnet, you aren’t yet synchronized, not even close. You are just done with the block download phase and still running the state downloads. You can see this yourself via the seemingly endless Imported state entries [...] stream of logs. You’ll need to wait that out too before your node comes truly online.

Related Topic