# Celestia - Validator Node

RPC: <https://celestia-mocha-rpc.cryptomolot.com/>

Type of node: **Validator Node**

ChainID: **mocha4**

## Resources

<table><thead><tr><th width="192"></th><th></th></tr></thead><tbody><tr><td>Website</td><td><a href="https://celestia.org/">https://celestia.org/</a></td></tr><tr><td>Github</td><td><a href="https://github.com/celestiaorg/">https://github.com/celestiaorg/</a></td></tr><tr><td>x.com</td><td><a href="https://x.com/CelestiaOrg">https://x.com/CelestiaOrg</a></td></tr><tr><td>Discord</td><td><a href="https://discord.com/invite/YsnTPcSfWQ">https://discord.com/invite/YsnTPcSfWQ</a></td></tr><tr><td>Docs</td><td><a href="https://docs.celestia.org/">https://docs.celestia.org/</a></td></tr></tbody></table>

## Hardware requirements

<table data-view="cards"><thead><tr><th>CPU</th><th>RAM</th><th>Storage</th><th>Network</th><th>OS</th><th></th></tr></thead><tbody><tr><td>32 cores</td><td>32 GB</td><td>2 TB NVME</td><td>1 Gbps</td><td>Linux (Ubuntu 20.04 x64)</td><td><p></p><ul><li>GFNI (Galois Field New Instructions) support</li><li>SHA-NI (SHA New Instructions) support</li></ul></td></tr></tbody></table>

## Installation 💾

Install dependencies

```bash
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 1.22.2

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

Set vars (change \<wallet-name> , \<moniker> and port)

```bash
echo "export WALLET="<wallet-name>"" >> $HOME/.bash_profile
echo "export MONIKER="<moniker>"" >> $HOME/.bash_profile
echo "export CELESTIA_CHAIN_ID="mocha-4"" >> $HOME/.bash_profile
echo "export CELESTIA_PORT="26"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

Get binary

```bash
cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app/
APP_VERSION=v6.4.4-mocha
git checkout tags/$APP_VERSION -b $APP_VERSION
make install
```

Set config and init

```bash
celestia-appd config node tcp://localhost:${CELESTIA_PORT}657
celestia-appd config keyring-backend os
celestia-appd config chain-id mocha-4
celestia-appd init $MONIKER --chain-id mocha-4
celestia-appd download-genesis mocha-4
```

Get genesis and addrbook&#x20;

```bash
wget -O $HOME/.celestia-app/config/genesis.json https://testnet-files.itrocket.net/celestia/genesis.json
```

```bash
wget -O $HOME/.celestia-app/config/addrbook.json https://testnet-files.itrocket.net/celestia/addrbook.json
```

Add seeds and peers in config.toml

```bash
SEEDS="5d0bf034d6e6a8b5ee31a2f42f753f1107b3a00e@celestia-testnet-seed.itrocket.net:11656"
PEERS="daf2cecee2bd7f1b3bf94839f993f807c6b15fbf@celestia-testnet-peer.itrocket.net:11656,e726816f42831689eab9378d5d577f1d06d25716@164.152.163.148:36656,c17c0cbf05e98656fee5f60fad469fc528f6d6de@65.109.25.113:11656,a95320e4abc5f2eaa4183ce41b0c3f180b8bcc4d@138.201.85.176:20156,7bb64cb482c0c6869df808a2c0ee7b6c3216079e@94.130.35.35:17656,59b72c3ef197ee18371a7bf2de5be0065e516843@62.171.148.127:26656,21833c6e07b2cb848ec0da6f405cd06f8e51eeed@65.109.88.22:26656,ca328c8c75dbbc9d753ed50a52dfcb02af829a29@85.207.33.76:26656,bc76a0ddb6b5fd0089ee82938181f1e5219414b6@62.169.25.91:26656,33acbad5e87d62df89a498b27f180d3e020ff9f0@65.108.235.238:26656,3cd0b4f0d84a6e87ec85b35a061c9bacc5b7be15@104.243.40.16:11656,9a6ecd59ecf02a97edb663ce73fb643d07ec087d@162.19.19.41:26656,d61e37eadcc45d382abf8fb11b7851d4342bece6@93.159.130.38:35656,e3bd52521309b0958da511188ae863fcf613548b@5.75.182.123:11656,43e9da043318a4ea0141259c17fcb06ecff816af@141.94.73.39:43656,6cabdecd60b320c9481df4e63678623026283fab@136.243.94.113:26656,5a7566aa030f7e5e7114dc9764f944b2b1324bcd@65.109.23.114:11656,5615ba73e88e3613749b188634793ffd9095bc1b@158.247.202.9:26656,ac68d93b828f8f491d01e30d734355207aa20eb2@65.109.106.211:22656,3dde9caede9f1930211e62859c6d85e3b5086bd8@218.155.161.169:30592,7f7041ab4af1dc5abf917357da3bfdc0bddda5cf@148.113.8.66:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.celestia-app/config/config.toml
```

Set minimum gas-price, enable prometheus and disable indexing

```bash
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.002utia"|g' $HOME/.celestia-app/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.celestia-app/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.celestia-app/config/config.toml
```

set custom ports in app.toml

```bash
sed -i.bak -e "s%:1317%:${CELESTIA_PORT}317%g;
s%:8080%:${CELESTIA_PORT}080%g;
s%:9090%:${CELESTIA_PORT}090%g;
s%:9091%:${CELESTIA_PORT}091%g;
s%:8545%:${CELESTIA_PORT}545%g;
s%:8546%:${CELESTIA_PORT}546%g;
s%:6065%:${CELESTIA_PORT}065%g" $HOME/.celestia-app/config/app.toml
```

set custom ports in config.toml

```bash
sed -i.bak -e "s%:26658%:${CELESTIA_PORT}658%g;
s%:26657%:${CELESTIA_PORT}657%g;
s%:6060%:${CELESTIA_PORT}060%g;
s%:26656%:${CELESTIA_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${CELESTIA_PORT}656\"%;
s%:26660%:${CELESTIA_PORT}660%g" $HOME/.celestia-app/config/config.toml
```

configure pruning

```bash
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"50\"/" $HOME/.celestia-app/config/app.toml
```

Create a service

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

[Service]
User=$USER
WorkingDirectory=$HOME/.celestia-app
ExecStart=$(which celestia-appd) start --home $HOME/.celestia-app
Restart=on-failure
RestartSec=5
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
```

```bash
sudo systemctl daemon-reload
```

## Download snapshot for fast sync

backup priv\_validator\_state.json

```bash
cp $HOME/.celestia-app/data/priv_validator_state.json $HOME/.celestia-app/priv_validator_state.json.backup
```

download and extract files from archive

```bash
curl https://testnet-files.itrocket.net/celestia/snap_celestia.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.celestia-app
```

move priv\_validator\_state.json back

```bash
mv $HOME/.celestia-app/priv_validator_state.json.backup $HOME/.celestia-app/data/priv_validator_state.json
```

Start the node and check logs

```bash
sudo systemctl restart celestia-appd && sudo journalctl -u celestia-appd -f
```

Check sync status. false = synced

```bash
celestia-appd status 2>&1 | jq .SyncInfo
```

## Create or recover wallet

> Dont forget to save mnemonic

create wallet

```bash
celestia-appd keys add $WALLET
```

recover wallet

```bash
celestia-appd keys add $WALLET --recover
```

set your wallet var

```bash
WALLET_ADDRESS=$(celestia-appd keys show $WALLET -a)
VALOPER_ADDRESS=$(celestia-appd keys show $WALLET --bech val -a)
echo "export WALLET_ADDRESS="$WALLET_ADDRESS >> $HOME/.bash_profile
echo "export VALOPER_ADDRESS="$VALOPER_ADDRESS >> $HOME/.bash_profile
source $HOME/.bash_profile
```

## Request tokens from the faucet 🆓

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

Check wallet balance

```bash
celestia-appd query bank balances $WALLET_ADDRESS
```

## Create a Validator

```bash
celestia-appd tx staking create-validator \
--amount 1000000utia \
--from $WALLET \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(celestia-appd tendermint show-validator) \
--moniker "moniker" \
--identity "" \
--website "" \
--details "" \
--chain-id mocha-4 \
--gas auto --gas-adjustment 1.5 --gas-prices 0.005utia \
-y
```

## Useful commands ⚙️

Sync status

```bash
celestia-appd status 2>&1 | jq .SyncInfo
```

Node status

```bash
celestia-appd status 2>&1 | jq
```

Query your validator

```bash
celestia-appd q staking validator $(celestia-appd keys show $WALLET --bech val -a) 
```

Delegate tokens to your validator

```bash
celestia-appd tx staking delegate $(celestia-appd keys show $WALLET --bech val -a) 1000000utia --from $WALLET --chain-id mocha-4 --gas auto --gas-adjustment 1.5 --gas-prices 0.005utia -y 
```

## Delete node 🗑️

```bash
sudo systemctl stop celestia-appd
sudo systemctl disable celestia-appd
sudo rm -rf /etc/systemd/system/celestia-appd.service
sudo rm $(which celestia-appd)
sudo rm -rf $HOME/.celestia-app
sed -i "/CELESTIA_/d" $HOME/.bash_profile
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cryptomolot.gitbook.io/cryptomolot-docs/testnets/celestia/celestia-validator-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
