Celestia Consensus Full Node Installation Guide
Mocha Testnet
The following tutorial is based on Ubuntu Linux 20.04 (LTS) x64.
For more information, you can access the official Celestia documentation on full nodes here.
Table of contents
· 📌Full Node Overview
∘ ⚙️Hardware requirements
· 🛠Configure the environment
∘ Update the system
∘ Install the dependencies
∘ Install Golang
· ✔️Install the Celestia-node
∘ Install Celestia App
∘ Setup the P2P networks
∘ Configure and start the application
∘ Download genesis
∘ Set seeds and peers
∘ Configure pruning
∘ Clean up old data
∘ ♻️ Fast synchronisation with snapshot (Optional)
∘ Optional: configure for RPC endpoint
· 🛎 Service with SystemD
∘ Create the service file
∘ Enable, start service and check logs
· 🛎 SystemD commands
∘ Stop the service
∘ Start service
∘ Restart service
∘ Check logs
∘ Check status
· 📈 Node information
∘ Synchronization information
∘ Node information
∘ Get peers
· Official links Celestia community
📌Full Node Overview
Consensus Full Nodes allow you to sync blockchain history in the Celestia Consensus Layer.
⚙️Hardware requirements
The following hardware minimum requirements are recommended for running the full node:
- Memory: 8 GB RAM
- CPU: Quad-Core
- Disk: 250 GB SSD Storage
- Bandwidth: 1 Gbps for Download/100 Mbps for Upload
🛠Configure the environment
Update the system
sudo apt update && sudo apt upgrade –y
Install the dependencies
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential git make ncdu -y
Install Golang
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"
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
Check that the Golang version has been installed correctly:
go version
✔️Install the Celestia-node
Install the celestia-node binary with the Mocha Testnet version (v0.11.0) by executing the following commands:
Install Celestia App
cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app/
APP_VERSION=v0.11.0
git checkout tags/$APP_VERSION -b $APP_VERSION
make install
Verify that the binary is working and check the version with the command:
celestia-appd --help
Setup the P2P networks
cd $HOME
rm -rf networks
git clone https://github.com/celestiaorg/networks.git
Configure and start the application
To initialize the network pick a “node-name” that describes your node
celestia-appd init "full-cumulo" --chain-id mocha
Download genesis
cp $HOME/networks/mocha/genesis.json $HOME/.celestia-app/config
Set seeds and peers
Peers
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/celestiaorg/networks/master/mocha/peers.txt | tr -d '\n')
echo $PERSISTENT_PEERS
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PERSISTENT_PEERS\"/" $HOME/.celestia-app/config/config.toml
You can find more peers here:
Configure pruning
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="10"
sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.celestia-app/config/app.toml
Clean up old data
celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app
♻️ Fast synchronisation with snapshot (Optional)
You can sync your Celestia full node quickly by downloading a recent snapshot:
cd $HOME
rm -rf ~/.celestia-app/data
mkdir -p ~/.celestia-app/data
SNAP_NAME=$(curl -s https://snaps.qubelabs.io/celestia/ | \
egrep -o ">mocha.*tar" | tr -d ">")
wget -O - https://snaps.qubelabs.io/celestia/${SNAP_NAME} | tar xf - \
-C ~/.celestia-app/data/
Optional: configure for RPC endpoint
You can configure your Consensus Full Node to be a public RPC endpoint and listen to any connections from Data Availability Nodes in order to serve requests for the Data Availability API here.
EXTERNAL_ADDRESS=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external-address = \"\"/external-address = \"$EXTERNAL_ADDRESS:26656\"/" $HOME/.celestia-app/config/config.toml
sed -i 's#"tcp://127.0.0.1:26657"#"tcp://127.0.0.1:26657"#g' ~/.celestia-app/config/config.toml
🛎 Service with SystemD
Create the service file
sudo tee <<EOF >/dev/null /etc/systemd/system/celestia-appd.service
[Unit]
Description=celestia-appd Cosmos daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$HOME/go/bin/celestia-appd start
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF
Enable, start service and check logs
sudo systemctl daemon-reload
sudo systemctl enable celestia-appd
sudo systemctl restart celestia-appd
sudo journalctl -u celestia-appd -f
🛎 SystemD commands
Stop the service
sudo systemctl stop celestia-appd
Start service
sudo systemctl start celestia-appd
Restart service
sudo systemctl restart celestia-appd
Check logs
sudo journalctl -u celestia-appd -f
Check status
sudo systemctl status celestia-appd
📈 Node information
Synchronization information
celestia-appd status 2>&1 | jq .SyncInfo
With the value false, the node will indicate that it is synchronized:
Node information
celestia-appd status 2>&1 | jq .NodeInfo
Get peers
echo $(celestia-appd tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.celestia-appd/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Official links Celestia community
Web Celestia: https://celestia.org/
Twitter: https://twitter.com/CelestiaOrg
GitHub: https://github.com/celestiaorg/
Telegram: https://t.me/CelestiaCommunity
Reddit: https://www.reddit.com/r/CelestiaNetwork/
Blog: https://blog.celestia.org/
YouTube: https://www.youtube.com/channel/UCLlvAEzXBFZ-P3zS6BF2Bjg
Forum: https://forum.celestia.org/