1

It's the second time that I run a Geth in full node. The first one got synced fully, but the second one did not sync after a week. Both servers have the same configuration and infrastructure. Using eth.syncing I receive a strange output on the second server as below:

> eth.syncing
{
  currentBlock: 5169781,
  highestBlock: 9967108,
  knownStates: 0,
  pulledStates: 0,
  startingBlock: 5175548
}

As you see, currentBlock is about half of highestBlock, and knownStates and pulledStates are both 0. May you tell me why these values are 0 and what is the matter here?

Thank you.

1
  • 1
    Hi I 'm having the same problem, and worse because my currentBlock is almost the same as highestBlock. It seems that it is always a few blocks away. How did you solve this? – Martin Massera Jul 16 at 5:57
2

The node first will synchronize blocks then states. In your case it hasn't finished synchronizing blocks yet.

2
  • I'm also having the same issue and my currentBlock is almost the same as highestBlock, never seems to catch up. It seems that it is always a few blocks away. How did you solve this? – EvgenyKolyakov Jul 18 at 9:24
  • @EvgenyKolyakov You have to wait. There isn't much more you can do. – Ismael Jul 18 at 15:25
0

Holy moly....

To fix it I had to restart it completely (deleting the data) and using:

docker run -d -v /data/binance:/root --name binance-smart-chain-node -p 0.0.0.0:8545:8545 -p 0.0.0.0:8546:8546 -p 0.0.0.0:6060:6060 -p 30311:30311 -p 30311:30311/udp vlddm/binance-smart-chain-node:latest --syncmode full --cache 4096 --rpc --rpccorsdomain="*" --rpcaddr="0.0.0.0"

The important part was --syncmode full , without that, the blockNumber (in the web3 client) was always returning as Zero (0).

11
  • 2
    With the --syncmode mode you control the synchronization method. In full mode it downloads one block then the block state, then the next block, and so on. Then blockNumber is the latest synchronized block, which will not be the most recent until it has finishes syncing. A disadvantage is that you are downloading very old states unnecessarily (it may be useful if you are building an archive node). – Ismael Jul 18 at 15:53
  • 2
    In fast and snap blockNumber will return 0 until the node has finished syncing. The Ethereum World states is an structure that holds the latests state of every contract, it changes at every transaction and it takes a while to synchronize. – Ismael Jul 18 at 21:09
  • 2
    Yes, once it is synced you can query and send transactions. Since geth 1.10.4 the default on Ethereum is snap blog.ethereum.org/2021/03/03/geth-v1-10-0/#snap-sync. – Ismael Jul 19 at 14:19
  • 2
    There isn't much you can do but wait. It should eventually finish. – Ismael Jul 19 at 20:45
  • 1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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