4

I want to check the balances of my wallets with the geth console. Therefore i did try to use geth in light mode. But when i use:

geth console --syncmode light

It gets stuck at block number 0 and it doesn't start to sync. Here are some results:

  • web3.eth.syncing - false

  • eth.blockNumber - 0

The Version i use is: 1.7.3

Anyone idea how i can force it to start the sync?

This is the output i get:

WARN [12-01|12:02:28] No etherbase set and no accounts found as default
INFO [12-01|12:02:28] Starting peer-to-peer node               instance=Geth/v1.7.3-stable-4bb3c89d/linux-amd64/go1.9
INFO [12-01|12:02:28] Allocated cache and file handles         database=/root/.ethereum/geth/lightchaindata cache=128 handles=1024
INFO [12-01|12:02:28] Writing default main-net genesis block
INFO [12-01|12:02:29] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Engine: ethash}"
INFO [12-01|12:02:29] Disk storage enabled for ethash caches   dir=/root/.ethereum/geth/ethash count=3
INFO [12-01|12:02:29] Disk storage enabled for ethash DAGs     dir=/root/.ethash               count=2
INFO [12-01|12:02:29] Added trusted checkpoint                 chain name="ETH mainnet"
INFO [12-01|12:02:29] Loaded most recent local header          number=0 hash=d4e567…cb8fa3 td=17179869184
INFO [12-01|12:02:29] Starting P2P networking
INFO [12-01|12:02:31] UDP listener up                          self=enode://56ff89f879fea8caee295e2e60086b5b1d4e56e0a6135a351f35a092cfdbbc9b7c32261396e0be61998b773ba565e8ef05ed1d3cc1ac7e479ebbccefac754b65@[::]:30303
WARN [12-01|12:02:31] Light client mode is an experimental feature
INFO [12-01|12:02:31] RLPx listener up                         self=enode://56ff89f879fea8caee295e2e60086b5b1d4e56e0a6135a351f35a092cfdbbc9b7c32261396e0be61998b773ba565e8ef05ed1d3cc1ac7e479ebbccefac754b65@[::]:30303
INFO [12-01|12:02:31] IPC endpoint opened: /root/.ethereum/geth.ipc

Thanks in advance!

BDL
  • 21,052
  • 22
  • 49
  • 55
nivek
  • 151
  • 2
  • 7

2 Answers2

1

The problem is that Geth full nodes are not serving light peers by default. This results in light clients not finding any peers.

Right now, I have two ideas how to get around this. You probably won't like both :P

  1. If you have access to any Geth full node, run it with --lightserv 90, this will dedicate 90% of the nodes bandwidth to serve light peers. Now try to hard-wire your light client to your full node with admin.addPeer(). Obviously, this is no option if you have no access to a full node.

  2. If you don't rely on Geth, you can try Parity which also has a light client implementation, that is also not super stable, but Parity clients server light clients by default. Just give it a try with parity --light and see if you can fetch the latest headers from your peers.

Disclosure: I work for Parity.

q9f
  • 11,293
  • 8
  • 57
  • 96
1

You need to wait up to 10 minutes before the light node starts receiving updates from full nodes, I had this issue too; took about 5 minutes for logs to show up.

Jeremi G
  • 405
  • 2
  • 8