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: 5 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.
- blockspacerace
- Mocha
- Arabica 🏗️
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
ver="1.19.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.19.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.19.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.19.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.19.1 linux/amd64
go version go1.19.1 linux/arm64
go version go1.19.1 darwin/arm64
go version go1.19.1 darwin/amd64
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
ver="1.19.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.19.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.19.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.19.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.19.1 linux/amd64
go version go1.19.1 linux/arm64
go version go1.19.1 darwin/arm64
go version go1.19.1 darwin/amd64
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
ver="1.19.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.19.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.19.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.19.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.19.1 linux/amd64
go version go1.19.1 linux/arm64
go version go1.19.1 darwin/arm64
go version go1.19.1 darwin/amd64
Install celestia-node
- blockspacerace
- Mocha
- Arabica 🏗️
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
Installing celestia-node
for the blockspacerace 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.7.2
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.7.2
Commit: eea18a72891af318fb26abb7264416b679ec2a16
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/linux
Golang version: go1.19.1
Installing celestia-node
for the blockspacerace 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.7.2
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.7.2
Commit: eea18a72891af318fb26abb7264416b679ec2a16
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/linux
Golang version: go1.19.1
Installing celestia-node
for the blockspacerace 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.7.2
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.7.2
Commit: eea18a72891af318fb26abb7264416b679ec2a16
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/darwin
Golang version: go1.19.1
Installing celestia-node
for the blockspacerace 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.7.2
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.7.2
Commit: eea18a72891af318fb26abb7264416b679ec2a16
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/darwin
Golang version: go1.19.1
- 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.6.4
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.6.4
Commit: 747c9e593542dfb32a933c731a9cd74b1fab897f
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/linux
Golang version: go1.19.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.6.4
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.6.4
Commit: 747c9e593542dfb32a933c731a9cd74b1fab897f
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/linux
Golang version: go1.19.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.6.4
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.6.4
Commit: 747c9e593542dfb32a933c731a9cd74b1fab897f
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/darwin
Golang version: go1.19.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.6.4
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.6.4
Commit: 747c9e593542dfb32a933c731a9cd74b1fab897f
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/darwin
Golang version: go1.19.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.7.1
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.7.1
Commit: c958fd3b3921ca993489d88530e59fe7f337bf4d
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/linux
Golang version: go1.19.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.7.1
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.7.1
Commit: c958fd3b3921ca993489d88530e59fe7f337bf4d
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/linux
Golang version: go1.19.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.7.1
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.7.1
Commit: c958fd3b3921ca993489d88530e59fe7f337bf4d
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/darwin
Golang version: go1.19.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.7.1
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.7.1
Commit: c958fd3b3921ca993489d88530e59fe7f337bf4d
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/darwin
Golang version: go1.19.1
Initialize the light node
Run the following command:
- blockspacerace
- Mocha
- Arabica 🏗️
celestia light init --p2p.network blockspacerace
You should see output like:
$ celestia light init
2022-12-19T21:45:24.591Z INFO node nodebuilder/init.go:19 Initializing Light Node Store over '/root/.celestia-light-blockspacerace'
2022-12-19T21:45:24.591Z INFO node nodebuilder/init.go:50 Saving config {"path": "/root/.celestia-light-blockspacerace/config.toml"}
2022-12-19T21:45:24.592Z INFO node nodebuilder/init.go:51 Node Store initialized
celestia light init
You should see output like:
$ celestia light init
2022-12-19T21:45:24.591Z INFO node nodebuilder/init.go:19 Initializing Light Node Store over '/root/.celestia-light-mocha'
2022-12-19T21:45:24.591Z INFO node nodebuilder/init.go:50 Saving config {"path": "/root/.celestia-light-mocha/config.toml"}
2022-12-19T21:45:24.592Z 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-6'
2022-12-19T21:45:00.803Z INFO node nodebuilder/init.go:50 Saving config {"path": "/root/.celestia-light-arabica-6/config.toml"}`
2022-12-19T21:45:00.803Z INFO node nodebuilder/init.go:51 Node Store initialized
Start the light node
- blockspacerace
- Mocha
- Arabica 🏗️
Start the light node with a connection to a validator node's gRPC endpoint (which is usually exposed on port 9090):
NOTE: 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. Forgateway
, the default IP Address islocalhost
and the defaultport
is26659
.
celestia light start --core.ip <ip-address> --gateway --gateway.addr <ip-address> --gateway.port <port> --p2p.network <network>
For ports:
NOTE: The
--core.ip
gRPC port defaults to 9090, so if you do not specify it in the command line, it will default to that port. You can add the port after the IP address or use the--core.grpc.port
flag to specify another port if you prefer.
Start the light node with a connection to a validator node's gRPC endpoint (which is usually exposed on port 9090):
NOTE: In order for access to the ability to get/submit state-related information, such as the ability to submit
PayForData
transactions, or query for the node's account balance, a gRPC endpoint of a validator (core) node must be passed as directed below. Forgateway
, the default IP Address islocalhost
and the defaultport
is26659
.
celestia light start --core.ip <ip-address> --gateway --gateway.addr <ip-address> --gateway.port <port> --p2p.network mocha
For ports:
NOTE: The
--core.ip
gRPC port defaults to 9090, so if you do not specify it in the command line, it will default to that port. You can add the port after the IP address or use the--core.grpc.port
flag to specify another port if you prefer.
Start the light node with a connection to a validator node's gRPC endpoint (which is usually exposed on port 9090):
NOTE: 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. Forgateway
, the default IP Address islocalhost
and the defaultport
is26659
.
celestia light start --core.ip <ip-address> --gateway --gateway.addr <ip-address> --gateway.port <port> --p2p.network <network>
For ports:
NOTE: The
--core.ip
gRPC port defaults to 9090, so if you do not specify it in the command line, it will default to that port. You can add the port after the IP address or use the--core.grpc.port
flag to specify another port if you prefer.
- blockspacerace
- 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 <ip-address> --gateway --gateway.addr <ip-address> --gateway.port <port> --p2p.network blockspacerace
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 https://rpc-mocha.pops.one --gateway --gateway.addr <ip-address> --gateway.port <port> --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 https://limani.celestia-devops.dev --gateway --gateway.addr 127.0.0.1 --gateway.port 26659 --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:
- blockspacerace
- Mocha
- Arabica 🏗️
celestia light start --core.ip <ip-address> --keyring.accname <key_name> --gateway --gateway.addr <ip-address> --gateway.port <port> --p2p.network blockspacerace
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 --core.ip <ip-address> --keyring.accname <key-name> --gateway --gateway.addr <ip-address> --gateway.port <port> --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
PayForData
transactions.
celestia light start --keyring.accname <key_name> --core.ip <ip-address> --gateway --gateway.addr <ip-address> --gateway.port <port> --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:
- blockspacerace
- Mocha
- Arabica 🏗️
celestia light start --core.ip <ip-address> --keyring.accname <name_of_custom_key> --gateway --gateway.addr <ip-address> --gateway.port <port> --p2p.network blockspacerace
celestia light start --core.ip <ip-address> --keyring.accname <name_of_custom_key> --gateway --gateway.addr <ip-address> --gateway.port <port> --p2p.network mocha
celestia light start --core.ip <ip-address> --keyring.accname <name_of_custom_key> --gateway --gateway.addr <ip-address> --gateway.port <port> --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.
Data availability sampling (DAS)
- blockspacerace
- Mocha
- Arabica 🏗️
With your light node running, you can check out this tutorial on
submitting PayForData
transactions here.
With your light node running, you can check out this tutorial on
submitting PayForData
transactions here.
With your light node running, you can check out this tutorial on
submitting PayForBlob
transactions here.