Loading...

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.22.0.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 binary

Clone project repository
cd $HOME
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app
gut pull
git checkout v1.11.0
make install
celestia-appd version
which celestia-appd

Initialize the node

Set node configuration
celestia-appd config chain-id celestia
Initialize the node
celestia-appd init you-node-name --chain-id mocha-4
Download genesis and addrbook
curl -Ls https://snapshots.tienthuattoan.com/testnet/celestia/genesis.json > $HOME/.celestia-app/config/genesis.json
curl -Ls https://snapshots.tienthuattoan.com/testnet/celestia/addrbook.json > $HOME/.celestia-app/config/addrbook.json
Add seed
sed -i -e "s|^seeds *=.*|seeds = \"2485eb8608f2e259bc347ec83e6deac8f30fad64@celestia-testnet-rpc.tienthuattoan.com:26656\"|" $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 commit timeout
sed -i -e "s|^target_height_duration *=.*|timeout_commit = \"11s\"|" $HOME/.celestia-app/config/config.toml
Set pruning
sed -i -e 's|^pruning *=.*|pruning = "nothing"|' $HOME/.celestia-app/config/app.toml

Download Snapshot

wget -O celestia_latest.tar.lzd https://snapshots.tienthuattoan.com/testnet/celestia/celestia_latest.tar.lz4 && lz4 -c -d celestia_latest.tar.lz4 | tar -x -C $HOME/.celestia-app

Create service

sudo tee </dev/null /etc/systemd/system/celestia-appd.service
[Unit]
Description=Celestia node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which celestia-appd) start
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Start the service and check the logs
sudo systemctl daemon-reload
sudo systemctl enable celestia-appd
sudo systemctl restart celestia-appd
sudo journalctl -u celestia-appd -f

Set up validator

Official documentation https://docs.celestia.org/nodes/validator-node
1. Create a wallet
celestia-appd keys add 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
celestia-appd keys list
2. Top up wallet with tokens
You can buy tokens at https://app.osmosis.zone

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.
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 \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 0.005utia

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

Official documentation https://docs.celestia.org/nodes/bridge-node
Download and build binaries
cd $HOME 
git clone https://github.com/celestiaorg/celestia-node.git 
cd celestia-node
git pull
git checkout v0.14.0
make install

celestia version

make cel-key
make install-key

which cel-key

Add Bridge wallet

Generate new wallet
cel-key add bridge-wallet --node.type bridge --p2p.network mocha
Recover existing wallet
cel-key add bridge-wallet --node.type bridge --p2p.network mocha --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
Initialize Bridge node
celestia bridge init \
  --keyring.accname bridge-wallet \
  --core.ip http://localhost \
  --p2p.network mocha
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 --metrics.tls=true \
--metrics --metrics.endpoint otel.celestia-mocha.com \
--keyring.accname bridge-wallet \
--core.ip http://localhost \
--p2p.network mocha
Restart=on-failure
RestartSec=5
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
Start Bridge node
sudo systemctl daemon-reload
sudo systemctl enable celestia-bridge
sudo systemctl restart celestia-bridge
sudo journalctl -u celestia-bridge -f

Useful commands

Get Bridge Node ID
AUTH_TOKEN=$(celestia bridge auth admin --p2p.network mocha)
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:26658 | jq -r .result.ID
Get Bridge Node ID
celestia p2p info --node.store ~/.celestia-bridge-mocha-4
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
Reset node
celestia bridge unsafe-reset-store --p2p.network mocha
Delete bridge node
sudo systemctl stop celestia-bridge
sudo systemctl disable celestia-bridge
sudo rm /etc/systemd/system/celestia-bridge.service
rm -rf $HOME/celestia-node $HOME/.celestia-app $HOME/.celestia-bridge-mocha-4