status-im / infra-nimbus

Infrastructure for Nimbus cluster
https://nimbus.team
8 stars 6 forks source link

Add CL light client support #101

Open etan-status opened 2 years ago

etan-status commented 2 years ago

There is an additional nimbus_light_client binary available in nimbus-eth2 unstable (and, eventually, also on the other branches). It would be interesting to have a few instances of these in the fleet to collect metrics regarding bandwidth (primary), memory, and CPU.

Compared to nimbus_beacon_node, the nimbus_light_client binary does not need a data-dir. It takes similar arguments for configuring logs and libp2p settings (port numbers etc).

However, there is an additional --trusted-block-root argument that needs to be initialized to a recent checkpoint block root.

To obtain a --trusted-block-root, an existing nimbus_beacon_node could be queried:

curl -s "http://hostname:port/eth/v1/beacon/headers/finalized" | jq -r '.data.root'

For all the launch arguments, see https://github.com/status-im/nimbus-eth2/blob/62bfe97bbed8acd511817ef85d6ff9acaebeefe6/beacon_chain/conf_light_client.nim

For sample integration into the launch_local_testnet script used in CI, see https://github.com/status-im/nimbus-eth2/blob/62bfe97bbed8acd511817ef85d6ff9acaebeefe6/scripts/launch_local_testnet.sh#L742-L752

jakubgs commented 2 days ago

According to @tersec we should run those on Mainnet and Holesky. The nodes are very lightweight and can make use of execution layer nodes, but does not need it. We would need one node per host as a start.

tersec commented 2 days ago

https://nimbus.guide/el-light-client.html but no need to run it with an EL client, it can stand alone and can't host validators anyway

jakubgs commented 2 days ago

This task seems like a nice self-contained one for one of my new engineers.