ethpandaops/checkpointz

Use checkpointz to serve genesis state

eserilev opened this issue ยท 4 comments

Currently Lighthouse includes mainnet genesis, plus a few other networks genesis, as part of its binary. This effectively doubles Lighthouse's binary size.

Theres been some discussion here around ways to reduce Lighthouse binary size by either using Snappy compression to reduce genesis state size in Lighthouse binaries OR move genesis state to some external repo and download it at startup.

@dapplion mentioned that it could be a good idea to extend checkpointz infra to serve genesis state.

If this sounds interesting to the checkpointz team, I'd be happy to work on this feature. The general plan would be to open up some way for checkpointz to serve snappy compressed (and potentially uncompressed?) genesis states for a variety of networks

Simplest way is to expose /eth/v2/debug/beacon/states/genesis and cache forever. Serving uncompressed is easier since that's the default mode.

so /eth/v2/debug/beacon/states/genesis would be a new beacon node api endpoint that checkpointz exposes?

/eth/v2/debug/beacon/states/genesis is already a valid route from the beacon API spec. I'm not sure about checkpointz rules on what is exposed and what not.

samcm commented

Checkpointz already has support for /eth/v2/debug/beacon/states/genesis - some clients depend on it for the checkpoint sync process ๐Ÿ˜„