Celestia - Bridge Node

Celestia is a modular data availability network that securely scales with the number of users, making it easy for anyone to launch their own blockchain.

Type of node: Bridge Node

ChainID: mocha-4

Resources

Hardware requirements

6 cores

16 GB

10 TB SSD

100 mbps

Linux (Ubuntu 20.04 x64)

Installation 💾

Install dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make gcc tar clang pkg-config libssl-dev ncdu -y

Install GO 1.22.2

sudo rm -rf /usr/local/go && \
curl -L https://go.dev/dl/go1.22.2.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local && \
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile && \
source .bash_profile && \
go version

Install celestia-node and celestia-app

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

cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app
git checkout tags/v1.13.0 -b v1.13.0
make install

Init app

you can find other core-ip if this one stops working - https://docs.celestia.org/nodes/mocha-testnet#rpc-endpoints

celestia bridge init --core.ip full.consensus.mocha-4.celestia-mocha.com --p2p.network mocha

Next, we get the address of the wallet to be funded. To pay for transactions

cd $HOME/celestia-node
./cel-key list --node.type bridge --keyring-backend test --p2p.network mocha

Request tokens from the faucet 🆓

Request tokens from discord "faucet" channel https://discord.com/invite/YsnTPcSfWQ

Create service file

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

[Service]
User=$USER
ExecStart=$(which celestia) bridge start  --core.ip full.consensus.mocha-4.celestia-mocha.com --core.grpc.port 9090 --rpc.port 26657 --p2p.network mocha --metrics.tls=true --metrics --metrics.endpoint otel.celestia-mocha.com --keyring.accname my_celes_key --gateway --gateway.addr 0.0.0.0 --gateway.port 26659 --rpc.addr 0.0.0.0 --node.store /mnt/data/celestia-bridge/.celestia-bridge-mocha-4/
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Enable and start service

sudo systemctl daemon-reload
sudo systemctl enable celestia-bridge && sudo systemctl restart celestia-bridge && sudo journalctl -u celestia-bridge -f

Get your node's peerID

NODE_TYPE=bridge
AUTH_TOKEN=$(celestia $NODE_TYPE auth admin --p2p.network mocha)

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

Get NodeID

celestia p2p info --node.store $HOME/.celestia-bridge-mocha-4/

Useful commands ⚙️

Check bridge node status

celestia header sync-state --url "http://127.0.0.1:26657" --node.store $HOME/.celestia-bridge-mocha-4/

Check bridge wallet balance

celestia state balance --url "http://127.0.0.1:26657" --node.store $HOME/.celestia-bridge-mocha-4/ 

Upgrade Bridge Node

Stop bridge node

sudo systemctl stop celestia-bridge

Download and install new binary

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

Update config

celestia bridge config-update --p2p.network mocha

Start bridge node

sudo systemctl restart celestia-bridge && sudo journalctl -u celestia-bridge -f

Delete node 🗑️

sudo systemctl stop celestia-bridge && sudo systemctl disable celestia-bridge
sudo rm /etc/systemd/system/celestia-bridge*
rm -rf $HOME/celestia-node $HOME/.celestia-app $HOME/.celestia-bridge-mocha-4

Last updated