Celestia Full Storage Node- Blockspace race

Set up guide for a Full Storage Node on Celestia ‘Blockspace Race’ Incentivised Testnet.

(document last update: 5/4/23)

the Blockspace Race, Celestia’s incentivized testnet program! Mocha is Celestia’s long term testnet, the blockspacerace its own testnet ahead of mainnet. The largest ever to support data availability sampling, with more than 800+ sampling light nodes.

Full Storage Nodes: The Full storage node is a Data Availability Node, which stores all the data but does not connect to Consensus (Celestia App). A bridge node is used to bridge between consensus nodes and data (storage & light) nodes.

Full Storage nodes send block shares, headers, and fraud proofs to Light Nodes. The Light Nodes gossip headers, fraud proofs, and sometimes block shares, between one another.
Full Storage nodes send block shares, headers, and fraud proofs to Light Nodes. The Light Nodes gossip headers, fraud proofs, and sometimes block shares, between one another.

Install Full Storage node for blockspacerace testnet

A setup script, for easier install is available here:

Hardware Requirements:

4vCPU / 8GB RAM / 250GB SSD / 1 Gbps Download/100 Mbps Upload

OS: Ubuntu Linux 20.04 (LTS) x64

See Official guides for Celestia on setting up a Full Storage Node here, this document is designed for an easy step by step setup for beginner users.

1. Setup Depenencies

Update and install packages

sudo apt update && sudo apt upgrade -y

sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu -y

Install Golang

ver="1.20.3" 
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"

Add the /usr/local/go/bin directory to $PATH

echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile

Confirm installed correctly with go version

2. Install Celestia node

celestia node is the software stack for data availability nodes, which include full storage and light nodes.

Install Celestia Node

cd $HOME 
rm -rf celestia-node 
git clone https://github.com/celestiaorg/celestia-node.git 
cd celestia-node/ 
git checkout tags/v0.9.2 
make build 
sudo make install 
make cel-key

Verify installed correctly with celestia version

Initialize as Full Storage Node

celestia full init --p2p.network blockspacerace

what this does is create folders in the working directory `.celestia-full-blockspacerace-0` a `config.toml` and a wallet key and folders.

the wallet mnemonic will be displayed, save this should you be using the wallet generated for you
the wallet mnemonic will be displayed, save this should you be using the wallet generated for you

3. Ports

Important ports for celestia node

2121 # p2p port
4318 # metrics port

sudo ufw allow ssh
sudo ufw allow 2121
sudo ufw allow 4318
sudo ufw enable  

if you are running this on a vps server ensure that you enable ssh

4. Wallet

When initiating the node, a directory for wallet is created and a new key is generated for you, you can import an existing key.

You will need to fund that address with testnet tokens to pay for PayForData transactions.

Run with a Custom Key

Must be passed to the start command like so (this is done later- step 5/6)

--keyring.accname <name-of-custom-key>

The custom key must exist inside the celestia full storage node directory at the correct path default: .celestia-full-blockspacerace-0/keys/keyring-test

Import custom key

./cel-key add <name_of_custom_key> --keyring-backend test --node.type full --p2p.network blockspacerace --recover

example

./cel-key add cel-wallet --keyring-backend test --node.type full --p2p.network blockspacerace --recover

you will be prompted to enter the wallet mnemonic (seed phrase) into the terminal

Create New Key

once you start the Full Storage Node, a wallet key will be generated for you, to view keys (see below). Alternatively, you can generate a new key by omitting the --recover flag from the above command.

View keys (addresses)

./cel-key list --node.type full --p2p.network blockspacerace --keyring-backend test

5. Start the Node

Node Start

celestia <node-type> start --p2p.network <network> --core.ip <address> --gateway --gateway.addr <ip-address> --gateway.port <port>

Example

celestia full start --p2p.network blockspacerace --core.ip https://rpc-blockspacerace.pops.one/ --gateway --gateway.addr localhost --gateway.port 26659 --metrics

to stop the node enter ctrl + c

6. Setup SystemD to run the Node

sudo tee <<EOF >/dev/null /etc/systemd/system/celestia-full.service
[Unit]
Description=celestia-full Cosmos daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$(which celestia) full start
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF

Add the following flags to the start command (after full start)

--keyring.accname <name of wallet> enter the wallet to be used with the node
--p2p.network <test network> Enter the testnet network, use blockspacerace
--core.ip <ip url> the IP of a gRPC endpoint which can be found here: example https://rpc-blockspacerace.pops.one/`--gateway` enables the REST gateway
--gateway.addr <address> address for gateway, use localhost
--gateway.port port for gateway, the default is 26659

Check service

cat /etc/systemd/system/celestia-full.service

this should print out the contents of the service file if successful.

Start the node

sudo systemctl daemon-reload
sudo systemctl enable celestia-full
sudo systemctl start celestia-full

View Logs

journalctl -u celestia-full.service -f

Additional Commands

Stop node

sudo systemctl stop celestia-full

View additional cli arguments

From working directory

celestia full --help

this will display all the cli arguments that can be added to service file or start command

Check version

From working directory

celestia version

Check space

Useful to monitor (particularly for full storage nodes) disk space, data is stored in /.celestia-full-blockspacerace-0/data

du -hs /path/to/directory

working example

du -hs /home/ubuntu/.celestia-full-blockspacerace-0/data

Note: should you need to clear data see the following in docs

Adding Metrics

add metrics flags to the service file (or the start command)

--metrics --metrics.tls=false --metrics.endpoint otel.celestia.tools:4318

To Find Node ID

AUTH_TOKEN=$(celestia full auth admin --p2p.network blockspacerace)
curl -X POST \
     -H "Authorization: Bearer $AUTH_TOKEN" \
     -H 'Content-Type: application/json' \
     -d '{"jsonrpc":"2.0","id":0,"method":"p2p.Info","params":[]}' \
     http://localhost:26658
This should display an output like so
This should display an output like so

Update Node Version

Stop the service

sudo systemctl stop celestia-full

fetch new version

cd celestia-node
git fetch
git checkout <lastest version>
make build
sudo make install

make any changes to the config.toml or service file if needed

Remove the data store: only if needed

some upgrades may require a new sync, this is only the case for breaking changes (such as upgrade to v0.8.2)

Remove old config.toml

cd
mkdir cel-itn-backups
sudo mv /home/ubuntu/.celestia-full-blockspacerace-0/config.toml /home/ubuntu/cel-itn-backups

Remove old data

cd
cd .celestia-full-blockspacerace-0
rm -rf data
rm -rf transients
rm -rf index
rm -rf blocks

re-initialize node (as full storage)

cd
cd celestia-node
celestia full init --p2p.network blockspacerace

Restart the node

sudo systemctl daemon-reload
sudo systemctl restart celestia-full

Block explorer for Celestia

Celestia Docs

Blockspace race metrics

Subscribe to GLCstaked
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.