Running Light Client Server – How to Run a Server for Ethereum Light Clients

go-ethereumlight-clientssupernodes

When running geth --light the go-ethereum client somehow has to connect to full nodes to interact with.

Could geth connect to any full node on the network or does this require a special endpoint? How to run a "server" for light clients? And how do light clients discover my node?

Best Answer

A light server is a full node with "LES server" option enabled. This option is disabled by default (at least as long as the LES implementation is still in experimental stage), so light clients actually DO need a somewhat "special" endpoint. Run

geth --lightserv 25

to allocate max. 25% of CPU resources for serving clients.

Peer discovery is also experimental, LES uses a PoC test version of the planned new RLPx v5 discovery protocol that allows searching specifically for a certain kind of nodes (light servers in our case). It takes a few minutes for the server to start advertising itself on the network.

Related Topic