Skip to main content

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​

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

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>

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​

All nodes​

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:

tip

Save your config so custom values are not lost.

  1. First, remove your config:

    rm ~./<path-to-node-store>/config.toml
  2. Re-initialize the node:

    celestia <node-type> init --p2p.network <network>
tip

If you have saved any custom value, add them back to the config.

  1. Start the node:

    celestia <node-type> start --p2p.network <network>
Example for blockspacerace​

Here's an example for blockspacerace with a light node:

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>

Clearing the data store​

Bridge and full nodes​

  1. 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
  2. Re-initialize the node:

    celestia <node type> init --p2p.network <network>
  3. Start the node:

    celestia <node type> start --p2p.network <network>

Light nodes​

  1. First, remove the data store:

    rm -rf ~./<path-to-node-store>/data
  2. Re-initialize the node:

    celestia light init --p2p.network <network>
  3. Start the node:

    celestia light start --p2p.network <network>