Setting up a Celestia light node
This tutorial will guide you through setting up a Celestia light node, which will allow you to perform data availability sampling on the data availability (DA) network.
To view a video tutorial for setting up a Celestia light node, click here
Overview of light nodes
Light nodes ensure data availability. This is the most common way to interact with the Celestia network.
Light nodes have the following behavior:
- They listen for
ExtendedHeaders
, i.e. wrapped “raw” headers, that notify Celestia nodes of new block headers and relevant DA metadata. - They perform data availability sampling (DAS) on the received headers
Hardware requirements
The following minimum hardware requirements are recommended for running a light node:
- Memory: 2 GB RAM
- CPU: Single Core
- Disk: 25 GB SSD Storage (Recommended 50 GB SSD Storage)
- Bandwidth: 56 Kbps for Download/56 Kbps for Upload
Setting up your light node
This tutorial was performed on an Ubuntu Linux 20.04 (LTS) x64 instance machine.
Setup the dependencies
First, make sure to update and upgrade the OS:
- APT
- YUM
sudo apt update && sudo apt upgrade -y
sudo yum update
These are essential packages that are necessary to execute many tasks like downloading files, compiling, and monitoring the node:
- APT
- YUM
- Mac (Apple)
- Mac (Intel)
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu -y
sudo yum install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu -y
🍺 Installing Homebrew
Homebrew is a package manager for macOS and Linux and will allow you to install your dependencies.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Be sure to run the commands in the output that are similar to:
==> Next steps:
- Run these three commands in your terminal to add Homebrew to your PATH:
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/joshstein/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/joshstein/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
🗄 Install wget and jq
Using Homebrew, in your terminal:
brew install wget && brew install jq
wget is an internet file retriever and jq is a lightweight command-line JSON processor.
🍺 Installing Homebrew
Homebrew is a package manager for macOS and Linux and will allow you to install your dependencies.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Be sure to run the commands in the output that are similar to:
==> Next steps:
- Run these three commands in your terminal to add Homebrew to your PATH:
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/joshstein/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/joshstein/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
🗄 Install wget and jq
Using Homebrew, in your terminal:
brew install wget && brew install jq
wget is an internet file retriever and jq is a lightweight command-line JSON processor.
Install Golang
celestia-app
and celestia-node
are written in Golang
so we must install Golang to build and run them.
- Mocha
- Arabica 🏗️
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
ver="1.21.1"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
ver="1.21.1"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-arm64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-arm64.tar.gz"
rm "go$ver.linux-arm64.tar.gz"
ver="1.21.1"
cd $HOME
wget "https://golang.org/dl/go$ver.darwin-arm64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.darwin-arm64.tar.gz"
rm "go$ver.darwin-arm64.tar.gz"
ver="1.21.1"
cd $HOME
wget "https://golang.org/dl/go$ver.darwin-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.darwin-amd64.tar.gz"
rm "go$ver.darwin-amd64.tar.gz"
Now we need to add the /usr/local/go/bin
directory to $PATH
:
- bash
- zsh
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.zshrc
source $HOME/.zshrc
To check if Go was installed correctly run:
go version
The output should be the version installed:
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
go version go1.21.1 linux/amd64
go version go1.21.1 linux/arm64
go version go1.21.1 darwin/arm64
go version go1.21.1 darwin/amd64
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
ver="1.21.1"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
ver="1.21.1"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-arm64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-arm64.tar.gz"
rm "go$ver.linux-arm64.tar.gz"
ver="1.21.1"
cd $HOME
wget "https://golang.org/dl/go$ver.darwin-arm64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.darwin-arm64.tar.gz"
rm "go$ver.darwin-arm64.tar.gz"
ver="1.21.1"
cd $HOME
wget "https://golang.org/dl/go$ver.darwin-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.darwin-amd64.tar.gz"
rm "go$ver.darwin-amd64.tar.gz"
Now we need to add the /usr/local/go/bin
directory to $PATH
:
- bash
- zsh
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.zshrc
source $HOME/.zshrc
To check if Go was installed correctly run:
go version
The output should be the version installed:
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
go version go1.21.1 linux/amd64
go version go1.21.1 linux/arm64
go version go1.21.1 darwin/arm64
go version go1.21.1 darwin/amd64
Install celestia-node
- Mocha
- Arabica 🏗️
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
Installing celestia-node
for Mocha Testnet means installing a specific version
to be compatible with the network.
Install the celestia-node
binary by running the following commands:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.11.0-rc13
make build
make install
make cel-key
Verify that the binary is working and check the version with the celestia
version
command:
$ celestia version
Semantic version: v0.11.0-rc13
Commit: 8ca777e1a3f04b7d0494e3bae8a1c1bcf68c5d8c
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/linux
Golang version: go1.21.1
Installing celestia-node
for Mocha Testnet means installing a specific version
to be compatible with the network.
Install the celestia-node
binary by running the following commands:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.11.0-rc13
make build
make install
make cel-key
Verify that the binary is working and check the version with the celestia
version
command:
$ celestia version
Semantic version: v0.11.0-rc13
Commit: 8ca777e1a3f04b7d0494e3bae8a1c1bcf68c5d8c
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/linux
Golang version: go1.21.1
Installing celestia-node
for Mocha Testnet means installing a specific version
to be compatible with the network.
Install the celestia-node
binary by running the following commands:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.11.0-rc13
make build
make go-install
make cel-key
Verify that the binary is working and check the version with the celestia
version
command:
$ celestia version
Semantic version: v0.11.0-rc13
Commit: 8ca777e1a3f04b7d0494e3bae8a1c1bcf68c5d8c
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/darwin
Golang version: go1.21.1
Installing celestia-node
for Mocha Testnet means installing a specific version
to be compatible with the network.
Install the celestia-node
binary by running the following commands:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.11.0-rc13
make build
make go-install
make cel-key
Verify that the binary is working and check the version with the celestia
version
command:
$ celestia version
Semantic version: v0.11.0-rc13
Commit: 8ca777e1a3f04b7d0494e3bae8a1c1bcf68c5d8c
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/darwin
Golang version: go1.21.1
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
Installing celestia-node
for Arabica Devnet means installing a specific version
to be compatible with the network.
Install the celestia-node
binary by running the following commands:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.11.0-rc13
make build
make install
make cel-key
Verify that the binary is working and check the version with the celestia
version
command:
$ celestia version
Semantic version: v0.11.0-rc13
Commit: 8ca777e1a3f04b7d0494e3bae8a1c1bcf68c5d8c
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/linux
Golang version: go1.21.1
Installing celestia-node
for Arabica Devnet means installing a specific version
to be compatible with the network.
Install the celestia-node
binary by running the following commands:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.11.0-rc13
make build
make install
make cel-key
Verify that the binary is working and check the version with the celestia
version
command:
$ celestia version
Semantic version: v0.11.0-rc13
Commit: 8ca777e1a3f04b7d0494e3bae8a1c1bcf68c5d8c
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/linux
Golang version: go1.21.1
Installing celestia-node
for Arabica Devnet means installing a specific version
to be compatible with the network.
Install the celestia-node
binary by running the following commands:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.11.0-rc13
make build
make go-install
make cel-key
Verify that the binary is working and check the version with the celestia
version
command:
$ celestia version
Semantic version: v0.11.0-rc13
Commit: 8ca777e1a3f04b7d0494e3bae8a1c1bcf68c5d8c
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/darwin
Golang version: go1.21.1
Installing celestia-node
for Arabica Devnet means installing a specific version
to be compatible with the network.
Install the celestia-node
binary by running the following commands:
cd $HOME
rm -rf celestia-node
git clone https://github.com/celestiaorg/celestia-node.git
cd celestia-node/
git checkout tags/v0.11.0-rc13
make build
make go-install
make cel-key
Verify that the binary is working and check the version with the celestia
version
command:
$ celestia version
Semantic version: v0.11.0-rc13
Commit: 8ca777e1a3f04b7d0494e3bae8a1c1bcf68c5d8c
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/darwin
Golang version: go1.21.1
Initialize the light node
Run the following command:
- Mocha
- Arabica 🏗️
celestia light init
You should see output like:
$ celestia light init --p2p.network mocha
2022-12-19T21:45:00.802Z INFO node nodebuilder/init.go:19 Initializing Light Node Store over '/root/.celestia-light-mocha-4'
2022-12-19T21:45:00.803Z INFO node nodebuilder/init.go:50 Saving config {"path": "/root/.celestia-light-mocha-4/config.toml"}`
2022-12-19T21:45:00.803Z INFO node nodebuilder/init.go:51 Node Store initialized
celestia light init --p2p.network arabica
You should see output like:
$ celestia light init --p2p.network arabica
2022-12-19T21:45:00.802Z INFO node nodebuilder/init.go:19 Initializing Light Node Store over '/root/.celestia-light-arabica-10'
2022-12-19T21:45:00.803Z INFO node nodebuilder/init.go:50 Saving config {"path": "/root/.celestia-light-arabica-10/config.toml"}`
2022-12-19T21:45:00.803Z INFO node nodebuilder/init.go:51 Node Store initialized
Start the light node
- Mocha
- Arabica 🏗️
Start the light node with a connection to a validator node's gRPC endpoint (which is usually exposed on port 9090):
In order for access to the ability to get/submit
state-related information, such as the ability to
submit PayForBlob
transactions, or query for the
node's account balance, a gRPC endpoint of a validator
(core) node must be passed as directed below.
Please refer to the ports section for information on which ports are required to be open on your machine.
celestia light start --core.ip <ip-address> --p2p.network mocha
Start the light node with a connection to a validator node's gRPC endpoint (which is usually exposed on port 9090):
In order for access to the ability to get/submit
state-related information, such as the ability to
submit PayForBlob
transactions, or query for the
node's account balance, a gRPC endpoint of a validator
(core) node must be passed as directed below.
Please refer to the ports section for information on which ports are required to be open on your machine.
celestia light start --core.ip <ip-address> --p2p.network <network>
- Mocha
- Arabica 🏗️
If you need a list of RPC endpoints to connect to, you can check from the list here
For example, your command might look something like this:
celestia light start --core.ip rpc-mocha.pops.one --p2p.network mocha
If you need a list of RPC endpoints to connect to, you can check from the list here
For example, your command might look something like this:
celestia light start --core.ip consensus-validator.celestia-arabica-10.com --p2p.network arabica
Keys and wallets
You can create your key for your node by running the following command with the cel-key
utility:
./cel-key add <key_name> --keyring-backend test --node.type light --p2p.network <network>
For arabica
, if you are on 0.6.1
, make sure to use --p2p.network arabica
when generating your keys.
You can start your light node with the key created above by running the following command:
- Mocha
- Arabica 🏗️
celestia light start --core.ip rpc-mocha.pops.one --keyring.accname my_celes_key --p2p.network mocha
Once you start the light node, a wallet key will be generated for you.
You will need to fund that address with testnet tokens to pay for
PayForBlob
transactions.
celestia light start --keyring.accname my_celes_key --core.ip consensus-validator.celestia-arabica-10.com --p2p.network arabica
Once you start the light node, a wallet key will be generated for you.
You will need to fund that address with testnet tokens to pay for
PayForBlob
transactions.
You can find the address by running the following command in the
celestia-node
directory:
./cel-key list --node.type light --keyring-backend test --p2p.network <network>
You have three networks to get testnet tokens from:
NOTE: If you are running a light node for your sovereign rollup, it is highly recommended to request Arabica devnet tokens as Arabica has the latest changes that can be used to test for developing your sovereign rollup. You can still use Mocha Testnet as well, it is just used for validator operations.
You can request funds to your wallet address using the following command in Discord:
$request <Wallet-Address>
Where <Wallet-Address>
is the celestia1******
address generated
when you created the wallet.
Optional: run the light node with a custom key
In order to run a light node using a custom key:
- The custom key must exist inside the celestia light node directory at the
correct path (default:
~/.celestia-light/keys/keyring-test
) - The name of the custom key must be passed upon
start
, like so:
- Mocha
- Arabica 🏗️
celestia light start --core.ip <ip-address> --keyring.accname <name_of_custom_key> --p2p.network mocha
celestia light start --core.ip <ip-address> --keyring.accname <name_of_custom_key> --p2p.network arabica
Optional: start light node with SystemD
Follow the tutorial on setting up the light node as a background process with SystemD here.