πŸ’»Installation Consensus Node

Server preparation

apt update && apt upgrade -y
apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y

Install GO

ver="1.20.2"
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

Node installation

git clone https://github.com/celestiaorg/celestia-app && cd celestia-app
git checkout v0.13.0
make install
celestia-appd version --long | grep -e version -e commit -e build
# version 0.13.0
# commit 6ba60e18fec27d3e3a42a71be082e255913cf4cf
# build_tags: ""

We initialize the node to create the necessary configuration files

cd $HOME
git clone https://github.com/celestiaorg/networks
celestia-appd init UTSA_gude --chain-id blockspacerace-0

Download Genesis

cp $HOME/networks/blockspacerace/genesis.json $HOME/.celestia-app/config

# ΠŸΡ€ΠΎΠ²Π΅Ρ€ΠΈΠΌ гСнСзис
sha256sum ~/.celestia-app/config/genesis.json
# 877046754f4e730b75c72fea2ffdbf79a1663edbf40a86a838321a163322a7ae

At this stage, we can download the address book

wget -O $HOME/.celestia-app/config/addrbook.json "https://snapshots.kjnodes.com/celestia-testnet/addrbook.json"

Set up node configuration

celestia-appd config keyring-backend test
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.001utia\"/;" ~/.celestia-app/config/app.toml
EXTERNAL_ADDRESS=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address = \"\"/external_address = \"$EXTERNAL_ADDRESS:26656\"/" $HOME/.celestia-app/config/config.toml
PERSISTENT_PEERS="be935b5942fd13c739983a53416006c83837a4d2@178.170.47.171:26656,cea09c9ac235a143d4b6a9d1ba5df6902b2bc2bd@95.214.54.28:20656,5c9cfba00df2aaa9f9fe26952e4bf912e3f1e8ee@195.3.221.5:26656,7b2f4cb70f04f2e9befb6ace66ce1ac7b3bea5b4@178.239.197.179:26656,7ee2ba21197d58679cfc1517b5bbc6465bed387a@65.109.67.25:26656,dc0656ab58280d641c8d10311d86627255bec8a1@148.251.85.27:26656,ccbd6262d0324e2e858594b639f4296cc4952c93@13.57.127.89:26656,a507b2bda6d2974c84ae1e8a8b788fc9e44d01f7@142.132.131.184:26656,9768290c60a746ee97ef1a5bcb8bee69066475e8@65.109.80.150:2600"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PERSISTENT_PEERS\"/" $HOME/.celestia-app/config/config.toml

(OPTIONAL) Set up pruning

pruning="nothing"
pruning_keep_recent="1000"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.celestia-app/config/app.toml && \
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.celestia-app/config/app.toml && \
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.celestia-app/config/app.toml

(OPTIONAL) Set up indexer

#indexer="null"
#sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.celestia-app/config/config.toml

(OPTIONAL) Enable/Disable Snapshots

#snapshot_interval=1000
#sed -i.bak -e "s/^snapshot-interval *=.*/snapshot-interval = \"$snapshot_interval\"/" ~/.celestia-app/config/app.toml

Create a service file

tee /etc/systemd/system/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
systemctl daemon-reload
systemctl enable celestia-appd
systemctl restart celestia-appd && journalctl -u celestia-appd -f -o cat

If peers do not cling for a long time or you see errors error: wrong Block.Header.AppHash, you need to use State sync or boot from a Snapshot

To view useful commands, go to Useful commands

To create a validator, go to Creating / Editing a Validator

Last updated