Celestia Node
This tutorial goes over building and installing celestia-node
. This
tutorial assumes you completed the steps in setting up your development
environment here.
Install celestia-node
- Blockspace Race
- Mocha
- Arabica 🏗️
- Ubuntu (AMD)
- Ubuntu (ARM)
- Mac (Apple)
- Mac (Intel)
Installing celestia-node
for the Blockspace Race 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.10.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.10.2
Commit: 960b522ec4ed2fb2069a220e2cef2da609158f4d
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/linux
Golang version: go1.20.2
Installing celestia-node
for the Blockspace Race 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.10.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.10.2
Commit: 960b522ec4ed2fb2069a220e2cef2da609158f4d
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/linux
Golang version: go1.20.2
Installing celestia-node
for the Blockspace Race 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.10.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.10.2
Commit: 960b522ec4ed2fb2069a220e2cef2da609158f4d
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/darwin
Golang version: go1.20.2
Installing celestia-node
for the Blockspace Race 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.10.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.10.2
Commit: 960b522ec4ed2fb2069a220e2cef2da609158f4d
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/darwin
Golang version: go1.20.2
- 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.11.0-rc1
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-rc1
Commit: b62452af1e7dd1cc1b9a5ca1d96d1545154b4d04
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/linux
Golang version: go1.20.2
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-rc1
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-rc1
Commit: b62452af1e7dd1cc1b9a5ca1d96d1545154b4d04
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/linux
Golang version: go1.20.2
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-rc1
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-rc1
Commit: b62452af1e7dd1cc1b9a5ca1d96d1545154b4d04
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: arm64/darwin
Golang version: go1.20.2
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-rc1
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-rc1
Commit: b62452af1e7dd1cc1b9a5ca1d96d1545154b4d04
Build Date: Thu Dec 15 10:19:22 PM UTC 2022
System version: amd64/darwin
Golang version: go1.20.2
Ports
When interacting with a Celestia node, you may need to open ports on your machine to allow communication between nodes, such as bridge nodes. It is essential that specific ports are accessible. Make sure that your firewall allows connections to the correct ports.
If you run a node on a cloud server, make sure that the ports are open on the server's firewall. If you run a node at home, make sure that your router allows connections to the correct ports.
For example, validator ports 9090 and 26657 need to be accessible by the bridge, and port 2121 is required for P2P connections for all node types.
The following ports are used by Celestia nodes:
Port | Protocol | Address | Description | Enabled by default on node | Flag |
---|---|---|---|---|---|
2121 | TCP/UDP | localhost | P2P | true | N/A |
26658 | HTTP | localhost | RPC | true | --rpc.port string |
26659 | HTTP | localhost | REST Gateway | false | --gateway.port string |
Upgrading your binary
To upgrade your binary, you can use the following commands:
- Install the latest version of
the
celestia-node
binary. The latest version will overwrite your existing binary.
- v0.9.0 and later
- v0.8.2 and earlier
- For bridge, full, and light nodes, remove the data store:
celestia <node-type> unsafe-reset-store --p2p.network <network>
- Then you can remove the old config with:
celestia <node-type> config-remove --p2p.network <network>
- And restart your node:
celestia <node-type> start --p2p.network <network>
If you run into
errors after upgrading the binary and trying to restart
your node, you will need to follow steps 2-4.
These steps are only necessary if you are upgrading from a version of
celestia-node
with breaking changes.
If your node starts successfully, you do not need to follow steps 2-4.
Clear the data store. Pay attention to the node type you are updating:
- For bridge and full nodes only:
- Remove the data store:
rm -rf ~./<path-to-node-store>/data
rm -rf ~./<path-to-node-store>/transients
rm -rf ~./<path-to-node-store>/index
rm -rf ~./<path-to-node-store>/blocks - For light nodes only:
- Remove the data store:
rm -rf ~./<path-to-node-store>/data
- For bridge and full nodes only:
Remove your
config.toml
(for all node types):
rm ~./<path-to-node-store>/config.toml
- Initialize your node:
celestia <node-type> init --p2p.network <network> [...flags]
- Start your node:
celestia <node-type> start --p2p.network <network> [...flags]
Changing the location of your node store
In this section, we'll guide you through starting your node using a node store in a different location than you originally started with.
First, stop your node safely using control + C
.
Then, init your node again with a new node store:
celestia <node-type> init --node.store /home/user/celestia-<node-type>-location/ --p2p.network blockspacerace
Next, start your node:
celestia full start --core.ip https://rpc-blockspacerace.pops.one/ --p2p.network blockspacerace --node.store /home/user/celestia-<node-type>-location/
If you choose to change the location of your node store, you will need to execute each command on your node with the following flag:
--node.store /home/user/celestia-<node-type>-location/
When using cel-key
, the process is different.
To show the keys you should add --keyring-dir
like this example:
./cel-key list --p2p.network blockspacerace --node.type full --keyring-dir /home/user/celestia-<node-type>-location/keys/
Troubleshooting
Network selection
Note: If you do not select a network, the default network will be 'Mocha'.
celestia <node-type> init --p2p.network <network>
celestia <node-type> start --p2p.network <network> --core.ip <address> --gateway --gateway.addr <ip-address> --gateway.port <port>
Please refer to the ports section for information on which ports are required to be open on your machine.
NOTE: It is advised before switching networks to reinitialize your node via
init
command. This is due to an old config being present. Re-initialisation will reset the config.
Resetting your config
If you an encounter an error, it is likely that an old config file is present:
Error: nodebuilder/share: interval must be positive; nodebuilder/core: invalid IP addr given:
# or
Error: nodebuilder/share: interval must be positive
You can re-initialize your node's config with the following commands:
Save your config so custom values are not lost.
- v0.9.1 and later
- v0.9.0 and earlier
All node types on v0.9.1 and later
Run the following command to update your config:
celestia <node-type> config-update --p2p.network <network>
This will pull in any new values from new configuration and merge them into the existing configuration.
After using the config-update
command, it is encouraged to
double-check that your custom values are preserved.
Then, to start your node again:
celestia <node-type> start --p2p.network <network>
All node types on v0.9.0 and earlier
- First, remove your config:
rm ~./<path-to-node-store>/config.toml
- Re-initialize the node:
celestia <node-type> init --p2p.network <network>
If you have saved any custom values, add them back to the config.
- Start the node:
celestia <node-type> start --p2p.network <network>
Please refer to the ports section for information on which ports are required to be open on your machine.
Clearing the data store
- v0.9.0 and later
- v0.8.2 and earlier
Version 0.9.0+
For bridge, full, and light nodes, remove the data store with this command:
celestia <node-type> unsafe-reset-store --p2p.network <network>
Example for light node on Blockspace Race on v0.9.0+
celestia light unsafe-reset-store --p2p.network blockspacerace
Bridge and full nodes v0.8.2 and earlier
Make sure not to remove anything except the directories listed below.
- First, remove the data store:
rm -rf ~./<path-to-node-store>/data
rm -rf ~./<path-to-node-store>/transients
rm -rf ~./<path-to-node-store>/index
rm -rf ~./<path-to-node-store>/blocks
- Re-initialize the node:
celestia <node type> init --p2p.network <network>
- Start the node:
celestia <node type> start --p2p.network <network>
Please refer to the ports section for information on which ports are required to be open on your machine.
Light nodes v0.8.2 and earlier
Make sure not to remove anything except the
<path-to-node-store>/data
directory.
- First, remove the data store:
rm -rf ~./<path-to-node-store>/data
- Re-initialize the node:
celestia light init --p2p.network <network>
- Start the node:
celestia light start --p2p.network <network>
Please refer to the ports section for information on which ports are required to be open on your machine.
Example for Blockspace Race on v0.8.2 and earlier
Here's an example for clearing the data store on Blockspace Race with a light node:
Make sure not to remove anything except the
<path-to-node-store>/data
directory.
rm -rf ~./celestia-light-blockspacerace-0/data
celestia light init --p2p.network blockspacerace
Your output will look similar to below:
2022-11-01T22:23:19.581+0100 INFO node nodebuilder/init.go:20 Initializing Light Node Store over '/Users/joshstein/.celestia-light-blockspacerace-0'
2022-11-01T22:23:19.582+0100 INFO node nodebuilder/init.go:51 Saving config {"path": "/Users/joshstein/.celestia-light-blockspacerace-0/config.toml"}
2022-11-01T22:23:19.582+0100 INFO node nodebuilder/init.go:52 Node Store initialized
Then start your node:
celestia light start --p2p.network blockspacerace --core.ip <address> --gateway --gateway.addr <ip-address> --gateway.port <port>
Please refer to the ports section for information on which ports are required to be open on your machine.
FATAL headers given to the heightSub are in the wrong order
If you observe a FATAL log line like:
FATAL header/store store/heightsub.go:87 PLEASE FILE A BUG REPORT: headers given to the heightSub are in the wrong order"
then it is possible the celestia-node data/
directory contains headers from a
previous instance of the network that you are currently trying to run against.
One resolution strategy is to delete the existing celestia-node config for the
target network and re-initialize it:
# rm -rf ~/.celestia-<node-type>-<network>
rm -rf ~/.celestia-bridge-private
# celestia <node-type> init --p2p.network <network>
celestia bridge init --p2p.network private