# Celestia Validator Node - Mocha **Published by:** [GLCstaked](https://paragraph.com/@glcstaked/) **Published on:** 2023-01-03 **URL:** https://paragraph.com/@glcstaked/celestia-validator-node-mocha ## Content Set up guide for a Validator Node on Celestia’s Mocha Testnet, this also applies to set up a Consensus full node, up to Step 7. Validator Node’s are responsible for the proof-of-stake consensus on the Celestia network, validators put up stake to be economically incentivised to keep the network secure and in doing so get rewarded. Consensus Full Node, talk to other full nodes via peer-to-peer networking to verify the chain state. Consensus concerns how the network comes to agreement on the state of balances and accounts for the Celestia chain. Every Validator will run a consensus full node, but its not necessary for a full node to run a validator. Note there can only be 100 active validators, nodes with the highest stake + delegation. If a validator does not have the required votes it will be inactive, still a live peer on the network but will not be selected to produce blocks until it reaches the active set. Hardware Requirements: 4vCPU / 8GB RAM / 250GB SSD / 1 Gbps Download/100 Mbps Upload OS: Ubuntu Linux 20.04 (LTS) x64 See Official guides for Celestia on setting up a Validator here, This document is designed for an easy step by step setup1. Setup DependenciesUpdate the OSsudo apt update && sudo apt upgrade -y Install essential packages for Celestia These are essential packages that are necessary to execute many tasks like downloading files, compiling and monitoring the node:sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu -y Change to Root User Most of the packages to install work best under root, to enter root in the terminal with sudo -i which can be exited back to normal user with exit anytime.shell prefix under rootInstall Golang remove any existing installationcd $HOME sudo rm -rf /usr/local/go sudo rm -rf ~/go Install Go and extractver="1.19.4" wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" rm "go$ver.linux-amd64.tar.gz" Add Go to PATHecho "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile source $HOME/.bash_profile Adding to the PATH variable is to allow Linux shell to know where to look for executable files is easy, to confirm this try go versionYou should have an output like this2. Install Celestia ApplicationFor Celestia Validator Node setup: running a Celestia App daemon with an internal Celestia Core node. https://docs.celestia.org/developers/celestia-app/, the application will be configured as a validator later. Install Celestia App create a binary file named celestia-appd inside $HOME/go/bin folder which will be used later to run the node. Check the Discord ‘Mocha Testnet’ announcements for the latest version (currently this is v0.11.0)cd $HOME git clone https://github.com/celestiaorg/celestia-app.git cd celestia-app git checkout v0.11.0 make install confirm installation with, in the directorycelestia-appd version 3. Set VariablesCELESTIA_NODENAME="MY_NODE" CELESTIA_WALLET="MY_WALLET" CELESTIA_CHAIN="mocha" # do not change Save Variablesecho "export CELESTIA_CHAIN=$CELESTIA_CHAIN export CELESTIA_NODENAME=${CELESTIA_NODENAME} export CELESTIA_WALLET=${CELESTIA_WALLET} " >> $HOME/.bash_profile source $HOME/.bash_profile you should be able to echo the $VAR and see the correct result returned, or check the .bash_profile itself4. Initialise Nodecelestia-appd init $CELESTIA_NODENAME --chain-id $CELESTIA_CHAIN Copy Genesis Download network configs, and move to .celestia-appcd $HOME git clone https://github.com/celestiaorg/networks cp $HOME/networks/mocha/genesis.json $HOME/.celestia-app/config/ Resetcelestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app 5. ConfigurationsPeers and SeedsSEEDS="9aa8a73ea9364aa3cf7806d4dd25b6aed88d8152@celestia.seed.mzonder.com:11156" sed -i "s|^seeds *=.*|seeds = \"$SEEDS\"|" $HOME/.celestia-app/config/config.toml Pruning and Snapshotspruning_keep_recent="10000" pruning_interval=$(shuf -n1 -e 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97) snapshot_interval="5000" sed -i "s/^pruning *=.*/pruning = \"custom\"/;\ s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/;\ s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/;\ s/^snapshot-interval *=.*/snapshot-interval = $snapshot_interval/" $HOME/.celestia-app/config/app.toml This sets the values we want for certain variables stored in $HOME/.celestia-app/config/app.toml Client Configcelestia-appd config chain-id $CELESTIA_CHAIN --home $HOME/.celestia-app celestia-appd config keyring-backend test 6. Run Node with SystemDtee $HOME/celestia-appd.service > /dev/null <<EOF [Unit] Description=celestia-appd After=network-online.target [Service] User=$USER ExecStart=$(which celestia-appd) start Restart=on-failure RestartSec=3 LimitNOFILE=65535 [Install] WantedBy=multi-user.target EOF Move to directorymv $HOME/celestia-appd.service /etc/systemd/system/ Enable Service and Startsystemctl enable celestia-appd systemctl daemon-reload systemctl start celestia-appd Display Logsjournalctl -u celestia-appd -f -o cat It will take a while to find peers, be patientOnce Peers have been found, it will begin syncing, logs should look similar to this7. Setup Validator Key (Validator Only)Before continuing the node must be synced this can be checked withcurl -s localhost:26657/status This outputs the sync info, and catching_up will be false once syncedRecover existing keycelestia-appd keys add $CELESTIA_WALLET --recover Input your seed/mnemonic, (assuming this wallet has tokens and set up for mocha Testnet) Check Balancecelestia-appd q bank balances $CELESTIA_ADDR Save addresses to Variables The validator address (VALOPER) is a derived address from your seed that is different from the normal addressCELESTIA_ADDR=$(celestia-appd keys show $CELESTIA_WALLET -a) echo $CELESTIA_ADDR echo 'export CELESTIA_ADDR='${CELESTIA_ADDR} >> $HOME/.bash_profile CELESTIA_VALOPER=$(celestia-appd keys show $CELESTIA_WALLET --bech val -a) echo $CELESTIA_VALOPER echo 'export CELESTIA_VALOPER='${CELESTIA_VALOPER} >> $HOME/.bash_profile source $HOME/.bash_profile Set up QGB Keys https://docs.celestia.org/nodes/validator-node#setup-qgb-keyscelestia-appd keys add ORCHESTRATOR_ADDRESS SAVE THE SEED THAT IS OUTPUT Save Orchestrator address to variablesORCHESTRATOR_ADDRESS=$(celestia-appd keys show ORCHESTRATOR_ADDRESS -a) echo $ORCHESTRATOR_ADDRESS echo 'export ORCHESTRATOR_ADDRESS='${ORCHESTRATOR_ADDRESS} >> $HOME/.bash_profile Save an EVM address to variables This should be an address under your controlEVM_ADDRESS=<ETH ADDRESS WALLET HERE> echo $EVM_ADDRESS echo 'export EVM_ADDRESS='${EVM_ADDRESS} >> $HOME/.bash_profile 8. Create Validatorcelestia-appd tx staking create-validator \ --amount=1000000utia \ --pubkey=$(celestia-appd tendermint show-validator) \ --moniker=$CELESTIA_NODENAME \ --chain-id=$CELESTIA_CHAIN \ --commission-rate=0.1 \ --commission-max-rate=0.2 \ --commission-max-change-rate=0.01 \ --min-self-delegation=1000000 \ --from=$CELESTIA_WALLET \ --evm-address=$EVM_ADDRESS \ --orchestrator-address=$ORCHESTRATOR_ADDRESS \ --fees 5000utia \ --gas auto \ --gas-adjustment 1.5 NOTE: 1000000 is equal to 1 TIA Check the Validatorcelestia-appd q staking validator $CELESTIA_VALOPER this will only work after the transaction is confirmed, may take a few minutes. alternatively validator can be seen on an explorerMain Project Information | Celestia (TIA) Blockchain ExplorerFast, simple and secure blockchain solution to stake your crypto assets and earn yields. Stake with the best validator. High performance. Delivered.https://celestia.explorers.guruAdditional CommandsChange Monikercelestia-appd tx staking edit-validator --identity "YOUR_KEYBASE_ID" --from $CELESTIA_WALLET --fees 500utia Delegate Morecelestia-appd tx staking delegate $CELESTIA_VALOPER 10000000utia --from=$CELESTIA_WALLET --fees 500utia ## Publication Information - [GLCstaked](https://paragraph.com/@glcstaked/): Publication homepage - [All Posts](https://paragraph.com/@glcstaked/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@glcstaked): Subscribe to updates