Page cover

Celestia Testnet - Mocha

Guide to setting up Validator Node, Bridge Node, and Light Node on Celestia

Install dependencies

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

sudo rm -rf /usr/local/go curl -Ls https://go.dev/dl/go1.23.5.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)

Clone project repository

cd $HOME rm -rf celestia-app git clone https://github.com/celestiaorg/celestia-app.git cd celestia-app git checkout v3.3.1-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

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

Set node configuration

celestia-appd config chain-id mocha celestia-appd config keyring-backend test

Initialize the node

celestia-appd init $MONIKER --chain-id mocha-4

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 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

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

1. Create a wallet

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

Option 1 - Create new wallet

Option 2 - Recover existing wallet

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

Fund a wallet

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

To check wallet balance use command below

Create validator

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

SystemD

Install Bridge Node

Official documentation: https://docs.celestia.org/nodes/bridge-node

Download and build binaries

Add Bridge wallet

Generate new wallet

Recover existing wallet

Fund the wallet with testnet tokens

Once you start the Bridge Node, a wallet key will be generated for you. You will need to fund that address with Testnet tokens to pay for PayForBlob transactions

Initialize Bridge node

Create service

Start Bridge node

Check Bridge node logs

Useful commands

Get Bridge Node ID

Get Bridge node key

Check Bridge node wallet balance

Upgrade Bridge Node

Stop Bridge node

Download and build binaries

Check Bridge node version

Install LightNode

Config and init app:

Create wallet:

(Optional) Restore an existing cel_key:

You can find the address by running the following command in the celestia-node directory:

Create Service file and replace FULL node ip, RPC and gRPC ports:

Enable and start service:

Last updated