Bridge node

Recommended Hardware: 6 Cores, 4GB RAM, 10TB of storage (NVME)

Chain ID: mocha-4 | Latest Version Tag: v0.25.2-mocha

Dependencies Installation

Update system and install build tools

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y

Install GO

cd $HOME
ver="1.24.1" && \
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" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile && \
source $HOME/.bash_profile && \
go version

Automatic installation

Just copy and paste it on your server

source <(curl -s https://raw.githubusercontent.com/chaindigital/celestia/main/installbridgetest.sh)

Manual installation

Download binary files

git clone https://github.com/celestiaorg/celestia-node && cd celestia-node
git checkout tags/v0.25.2-mocha

Build

make build
make install
make cel-key

Set configuration and init node

mv $HOME/celestia-node/cel-key /usr/local/bin/ 
cel-key add bridge_wallet --keyring-backend test --node.type bridge --p2p.network mocha
cel-key list --node.type bridge --keyring-backend test --p2p.network mocha
celestia bridge init \
  --p2p.network mocha \
  --core.ip http://localhost \
  --core.port 9090 \
  --gateway \
  --gateway.addr 0.0.0.0 \
  --gateway.port 26659 \
  --rpc.addr 0.0.0.0 \
  --rpc.port 26658 \
  --keyring.keyname bridge_wallet
 

Create a service

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

[Service]
User=$USER
ExecStart=$(which celestia) bridge start \
  --p2p.network mocha --archival \
  --gateway \
  --gateway.addr 0.0.0.0 \
  --gateway.port 26659 \
  --metrics.tls=true \
  --metrics \
  --metrics.endpoint otel.mocha.celestia.observer
  --keyring.keyname bridge_wallet
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

Start service and check the logs

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

Useful commands

Check bridge wallet balance:

celestia state balance --node.store ~/.celestia-bridge-mocha-4/

Get wallet address:

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

Restore an existing cel_key:

KEY_NAME="my_celes_key"
cd ~/celestia-node
./cel-key add $KEY_NAME --keyring-backend test --node.type bridge  --recover --p2p.network mocha

Check bridge node status:

celestia header sync-state --node.store  ~/.celestia-bridge-mocha-4/

Get Node ID:

celestia p2p info --node.store ~/.celestia-bridge-mocha-4/

Delete bridge 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-bridge-mocha-4

Last updated