Installation

Chain ID: mocha-4Celestia-app Version: v2.3.1-mochaCelestia-Bridge Version: v0.18.3-mocha

Setup validator name

Replace **MONIKER** with your validator name
MONIKER="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.1.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 v2.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

# Create application symlinks
sudo 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.5.0

# Create service
sudo tee /etc/systemd/system/celestia-appd.service > /dev/null << EOF
[Unit]
Description=celestia-testnet 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-appd

Initialize the node

# Set node configuration
celestia-appd config chain-id mocha-4

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

# Download genesis and addrbook
curl -Ls /genesis.json > $HOME/.celestia-app/config/genesis.json
curl -Ls /addrbook.json > $HOME/.celestia-app/config/addrbook.json

# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"59\"|" $HOME/.celestia-app/config/config.toml

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

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "nothing"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.celestia-app/config/app.toml

# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:12058\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:12057\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:12060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:12056\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":12066\"%" $HOME/.celestia-app/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:12017\"%; s%^address = \":8080\"%address = \":12080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:12090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:12091\"%; s%:8545%:12045%; s%:8546%:12046%; s%:6065%:12065%" $HOME/.celestia-app/config/app.toml

Start service and check the logs

sudo systemctl start celestia-appd && sudo journalctl -u celestia-appd -f --no-hostname -o cat

Set up validator

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

Create a wallet

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

CREATE NEW WALLET

celestia-appd keys add wallet

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

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:

$request celestia1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

To check wallet balance use command below

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

Create validator

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

celestia-appd tx staking create-validator \
--amount 1000000utia \
--pubkey $(celestia-appd tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id mocha-4 \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.05 \
--min-self-delegation 1 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.005utia \
-y

Save the ~/.celestia-app/config/priv_validator_key.json file as this is the only way to recover your validator signing key in case you lose it!

Install Bridge Node

Download and build binaries

cd $HOME 
rm -rf celestia-node 
git clone https://github.com/celestiaorg/celestia-node.git 
cd celestia-node
git checkout v0.18.3-mocha
make build
sudo mv build/celestia /usr/local/bin
make cel-key
sudo mv cel-key /usr/local/bin

Add Bridge wallet

Generate new wallet

cel-key add bridge-wallet --node.type bridge --p2p.network mocha-4

Recover existing wallet

cel-key add bridge-wallet --node.type bridge --p2p.network mocha-4 --recover

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

celestia bridge init \
  --keyring.accname bridge-wallet \
  --core.ip http://localhost \
  --core.rpc.port 26657 \
  --core.grpc.port 9090 \
  --p2p.network mocha-4 \
  --rpc.port 26658 \
  --gateway.port 26659

Create service

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

[Service]
User=$USER
ExecStart=$(which celestia) bridge start \\
--keyring.accname bridge-wallet \\
--core.ip http://localhost \\
--core.rpc.port 26657 \\
--core.grpc.port 9090 \\
--p2p.network mocha-4 \\
--rpc.port 26658 \\
--gateway.port 26659 \\
--metrics.tls=false \\
--metrics \\
--metrics.endpoint=otel.celestia-mocha.com 
Restart=on-failure
RestartSec=10
LimitNOFILE=65535

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

Start Bridge node

systemctl restart celestia-bridge

Check Bridge node logs

journalctl -u celestia-bridge -f -o cat

Useful commands

Get Bridge Node ID

AUTH_TOKEN=$(celestia bridge auth admin --p2p.network blockspacerace)
curl -s -X POST -H "Authorization: Bearer $AUTH_TOKEN" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":0,"method":"p2p.Info","params":[]}' http://localhost:12058 | jq -r .result.ID

Get Bridge node key

cel-key show bridge-wallet --node.type bridge --p2p.network mocha-4 -a | tail -1

Check Bridge node wallet balance

celestia-appd q bank balances $(cel-key show bridge-wallet --node.type bridge --p2p.network mocha-4 -a | tail -1)

Upgrade Bridge Node

Stop Bridge node

sudo systemctl stop celestia-bridge

Download and build binaries

cd $HOME 
rm -rf celestia-node 
git clone https://github.com/celestiaorg/celestia-node.git 
cd celestia-node
git checkout v0.14.1
make build
sudo mv build/celestia /usr/local/bin
make cel-key
sudo mv cel-key /usr/local/bin

Check Bridge node version

celestia version

Node upgrade

To upgrade Celestia Bridge node you have two options

Soft upgrade

This option will only update attributes of configuration files without deleting any data.

Update configuration file

celestia bridge config-update --p2p.network mocha-4

Hard upgrade

This option will clear data store and re-initialize the node. Keys will not be deleted.

Clear data store and remove configuration file

celestia bridge unsafe-reset-store --p2p.network mocha-4
rm -rf $HOME/.celestia-bridge-mocha-4/config.toml

Initialize Bridge node

celestia bridge init \
  --keyring.accname bridge-wallet \
  --core.ip localhost \
  --core.rpc.port 26657 \
  --core.grpc.port 9090 \
  --p2p.network mocha-4 \
  --rpc.port 26658 \
  --gateway.port 26659

Start Bridge node

sudo systemctl start celestia-bridge

Check Bridge node logs

journalctl -fu celestia-bridge -o cat

Install Blobstream Orchestrator

Download and build binaries

cd $HOME 
rm -rf orchestrator-relayer
git clone https://github.com/celestiaorg/orchestrator-relayer.git
cd orchestrator-relayer
git checkout v1.0.0
make build
sudo mv build/qgb /usr/local/bin

Initialize Orchestrator node

blobstream orchestrator init

Add Orchestrator EVM wallet

The EVM private key needs to correspond to the EVM address provided when creating the validator.

Import EVM wallet private key

blobstream orchestrator keys evm import ecdsa <private key in hex format>

Register EVM address to your validator

celestia-appd tx qgb register \
$(celestia-appd keys show wallet --bech val -a) \
<EVM_ADDRESS> \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.002utia \
-y

Verify EVM address that is linked to your validator

celestia-appd query qgb evm $(celestia-appd keys show wallet --bech val -a)

Create service

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

[Service]
User=$USER
ExecStart=$(which blobstream) orchestrator start \\
--core.grpc 127.0.0.1:9090 \\
--core.rpc tcp://127.0.0.1:26657 \\
--evm.account $(celestia-appd query qgb evm $(celestia-appd keys show wallet --bech val -a)) \\
--evm.passphrase <EVM_PASSPHRASE> \\
--p2p.bootstrappers /dns/bootstr-0-mocha-blobstream.celestia-mocha.com/tcp/30000/p2p/12D3KooWLrw6EQgDwvgqrqT8wLNJoQYN3SDAzaAxJgyiTa2xowyF
Restart=on-failure
RestartSec=10
LimitNOFILE=65535

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

Example of service execution command

ExecStart=$(which blobstream) orchestrator start \\
--core.grpc 127.0.0.1:9090 \\
--core.rpc tcp://127.0.0.1:26657 \\
--evm.account $(celestia-appd query qgb evm $(celestia-appd keys show wallet --bech val -a)) \\
--evm.passphrase mypassphrasegoeshere \\
--p2p.bootstrappers /dns/bootstr-0-mocha-blobstream.celestia-mocha.com/tcp/30000/p2p/12D3KooWLrw6EQgDwvgqrqT8wLNJoQYN3SDAzaAxJgyiTa2xowyF
Before running the orchestrator, make sure to have the indexing enabled on your RPC node. If the indexer was just activated, then, by default, it will not have the previous transactions indexed. And, if you run the orchestrator at the same time, it will try to create the commitments and will fail as the transactions are not indexed.

Start Orchestrator node

systemctl start celestia-orchestrator

Check Bridge node logs

journalctl -fu celestia-orchestrator -o cat

Useful commands

View validator details

Check the evm_address field if it has an address that you want to use to sign attestations.

celestia-appd query qgb evm $(celestia-appd keys show wallet --bech val -a)

Change validator evm_address

celestia-appd tx qgb register \
$(celestia-appd keys show wallet --bech val -a) \
<NEW_EVM_ADDRESS> \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.002utia \
-y