A revolutionary way to run Celestia Light Client

Sebastian Faron
Coinmonks
4 min readJun 14, 2023

--

In the previous article about Celestia we covered up fundamentals of the technology Celestia is surrounding and why is it so unique.
It is one of the upcoming top dogs in the Cosmos ecosystem. Due to that fact, I consider having the opportunity in participating in the network very valuable, I showed in the first article how to run a full node, and decided to create this article strictly on how to contribute to this wonderful project as a light client this time.
Another factor that supported me in doing this is the famous trend among Celestia fans on Twitter regarding how easy it is to set up a light client on the Celestia blockchain. The ones who are active on Twitter and follow at least the Cosmos ecosystem, in general, should be aware of what I’m trying to express here.

Alright, let's begin. We should start with the definitions. A light client is a form of participation in the blockchain apart from being a full node or validator. LC is not downloading the entire blockchain history like FN or validator. It’s easier to have LC than FN and it's relatively cheaper, however, due to that, LC is by default way less secure as it cannot verify invalid blocks. So why would I mention Light Client then if it's not such a game-changer, u may ask? It actually is.

A Celestia light node can verify blocks with similar security to a full node. It does this by randomly downloading small pieces of the block until it builds up enough confidence that all the data is there.
We believe low-cost nodes that can securely verify a blockchain are among the missing pieces of infrastructure for a scalable ecosystem.

Celestia uses a clever scheme that allows light clients to verify data availability without needing to download the entire block. This means that you can verify data availability with a small computer — in fact, you can even do it on your smartphone!

Installing

The entire process shouldn't take more than 5 minutes.
Essential prerequisites including Docker are what we have to install first before getting into Light Client installation.

We can install Docker from the link here. After it is done please follow the lines of code below:

For updating essential components of our system:

sudo apt-get update
sudo apt-get upgrade

After our Docker and essential dependencies are installed we can proceed further and create a directory on your host machine. This directory will be used to store the data for the container. Create a directory on your host machine and give it a name. For example, you can name it my-node-store:
After that please initialize the node store and key in that directory from the command below:

cd $HOME
mkdir my-node-store
docker run -e NODE_TYPE=light -e P2P_NETWORK=blockspacerace -v $HOME/my-node-store:/home/celestia ghcr.io/celestiaorg/celestia-node:v0.10.3 celestia light init --p2p.network blockspacerace

After it's done, you will see your public address by which everyone can find you in the network and mnemonic which you should write down somewhere physical and hide.

Now what is left is to start the client using the standard command docker run:

docker run -e NODE_TYPE=light -e P2P_NETWORK=blockspacerace -v $HOME/my-node-store:/home/celestia ghcr.io/celestiaorg/celestia-node:v0.10.3 celestia light start --core.ip rpc-blockspacerace.pops.one --gateway --gateway.addr 127.0.0.1 --gateway.port 26659 --p2p.network blockspacerace
Light Client is working:)

This Light Client has useful functionality called persistent storage. This lets us use the same key and store it every time our node is getting reset or our virtual machine needs to get rebooted. In this way, our LC will not have to resync from scratch every time which is a really crucial component in leveling up the functionality.
Light client functionality we can see in the early-stage development for multichain bridges using light client validation which I already covered in the previous articles.
Celestia is pioneering this method in a practical way as it is the first time somebody introduced such a light version of validation in the mainstream blockchain after famous Vitalik’s words that the ultimate goal for Ethereum validation is to incentivize everybody having their own light validator on small personal devices such as their smartphones.

--

--