OshVanK Node ServiceOshVanK Node Service
Celestia
Testnet

Installation

Node setup guide for Celestia Testnet (mocha-5).

💢 Setup Validator Name

Replace Your_Moniker with your validator name

MONIKER="Your_Moniker"

💢 Install Dependencies

Update system and install build tools:

sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade

💢 Install Go

sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.23.12.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

💢 Download and Build Binaries

# Clone project repository
cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app
git checkout v10.2.0-mocha

# Build binaries
make build

# Prepare binaries for Cosmovisor
mkdir -p $HOME/.celestia-app/cosmovisor/genesis/bin
mv build/celestia-appd $HOME/.celestia-app/cosmovisor/genesis/bin/
rm -rf build

# Create application symlinks
ln -s $HOME/.celestia-app/cosmovisor/genesis $HOME/.celestia-app/cosmovisor/current -f
sudo ln -s $HOME/.celestia-app/cosmovisor/current/bin/celestia-appd /usr/local/bin/celestia-appd -f

💢 Install Cosmovisor and Create a Service

# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.6.0
# Create service
sudo tee /etc/systemd/system/celestia-testnet.service > /dev/null << EOF
[Unit]
Description=celestia node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.celestia-app"
Environment="DAEMON_NAME=celestia-appd"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.celestia-app/cosmovisor/current/bin"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable celestia-testnet.service

💢 Initialize the Node

# Set node configuration
celestia-appd config set client chain-id mocha-5
celestia-appd config set client keyring-backend test
celestia-appd config set client node http://localhost:17657

# Initialize the node
celestia-appd init $MONIKER --chain-id mocha-5

# Download genesis and addrbook
curl -Ls https://snapshots.kjnodes.com/celestia-testnet/genesis.json > $HOME/.celestia-app/config/genesis.json
curl -Ls https://snapshots.kjnodes.com/celestia-testnet/addrbook.json > $HOME/.celestia-app/config/addrbook.json

# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"3f472746f46493309650e5a033076689996c8881@celestia-testnet.rpc.kjnodes.com:12059\"|" $HOME/.celestia-app/config/config.toml

# Set commit timeout
sed -i -e "s|^target_height_duration *=.*|timeout_commit = \"11s\"|" $HOME/.celestia-app/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.002utia\"|" $HOME/.celestia-app/config/app.toml

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "nothing"|' \
  $HOME/.celestia-app/config/app.toml

💢 Set Custom Ports and Configuration

# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:17058\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:17057\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:17060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:17056\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":17066\"%" $HOME/.celestia-app/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:17017\"%; s%^address = \":8080\"%address = \":17080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:17090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:17091\"%; s%:8545%:17045%; s%:8546%:17046%; s%:6065%:17065%" $HOME/.celestia-app/config/app.toml

# Set configuration for v3
sed -i -e "s|^recv_rate *=.*|recv_rate = 10485760|" -e "s|^send_rate *=.*|send_rate = 10485760|" -e "s|^ttl-num-blocks *=.*|ttl-num-blocks = 12|" $HOME/.celestia-app/config/config.toml

# Set mempool to v1
sed -i '
/^\[mempool\]/,/^\[/ {
    s/version = .*/version = "v1"/
    s/max_txs_bytes = .*/max_txs_bytes = 39485440/
    s/max_tx_bytes = .*/max_tx_bytes = 7897088/
}' $HOME/.celestia-app/config/config.toml

💢 Enable BBR

# Enable bbr
sudo modprobe tcp_bbr
echo "net.core.default_qdisc=fq" | sudo tee -a /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

💢 Download Latest Chain Snapshot

curl -L https://snapshots.kjnodes.com/celestia-testnet/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.celestia-app
[[ -f $HOME/.celestia-app/data/upgrade-info.json ]] && cp $HOME/.celestia-app/data/upgrade-info.json $HOME/.celestia-app/cosmovisor/genesis/upgrade-info.json

💢 Start Service and Check the Logs

sudo systemctl start celestia-testnet.service && sudo journalctl -u celestia-testnet.service -f --no-hostname -o cat

💢 Set Up Validator

💢 1. Create a wallet

First of all, we will need to create a wallet for our validator. You have two options for that.

Option 1 - Create new wallet

celestia-appd keys add wallet

Option 2 - Recover existing wallet

celestia-appd keys add wallet --recover

Save the mnemonic output as this is the only way to recover your validator wallet in case you lose it!

To list your wallets use command below:

celestia-appd keys list

💢 2. Fund a wallet

To create a validator you have to fund the previously created wallet via Discord by sending this message to the #mocha-faucet channel:

$request celestia1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

To check wallet balance use command below:

celestia-appd q bank balances $(celestia-appd keys show wallet -a)

💢 3. Create validator

Please make sure you have adjusted moniker, identity, details, website to match your values.

cat > validator.json << EOF
{
  "pubkey": $(celestia-appd tendermint show-validator),
  "amount": "1000000utia",
  "moniker": "Your_Moniker",
  "identity": "",
  "website": "",
  "security": "",
  "details": "",
  "commission-rate": "0.05",
  "commission-max-rate": "0.20",
  "commission-max-change-rate": "0.05",
  "min-self-delegation": "1"
}
EOF

celestia-appd tx staking create-validator validator.json \
  --chain-id mocha-5 \
  --from wallet \
  --gas 300000 \
  --fees 5000utia \
  --node tcp://localhost:17657 \
  --keyring-backend test \
  -y

💢 Unjail Validator

celestia-appd tx slashing unjail --from wallet --chain-id mocha-5 --gas-adjustment 1.4 --gas auto --gas-prices 0.002utia -y

💢 Remove Node

⚠️ Warning: Please, before proceeding with the next step! All chain data will be lost! Make sure you have backed up your priv_validator_key.json!

cd $HOME
sudo systemctl stop celestia-testnet.service
sudo systemctl disable celestia-testnet.service
sudo rm /etc/systemd/system/celestia-testnet.service
sudo systemctl daemon-reload
rm -f $(which celestia-appd)
rm -rf $HOME/.celestia-app
rm -rf $HOME/celestia-app

On this page