💻Consensus Node
IMPORTANT - this guide uses a non-standard directory
Server preparation
apt update && apt upgrade -y
apt install curl build-essential git wget jq make gcc tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev lz4 -y
Install GO
ver="1.22.3" && \
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 v3.4.2
make build
mv $HOME/celestia-app/build/celestia-appd $HOME/go/bin/celestia-appd
celestia-appd version --long --home $HOME/.celestia-app-main
#version: 3.4.2
#commit: 5b603273
We initialize the node to create the necessary configuration files
celestia-appd init UTSA_guide --chain-id celestia --home $HOME/.celestia-app-main
Download Genesis
cd
git clone https://github.com/celestiaorg/networks
cp $HOME/networks/celestia/genesis.json $HOME/.celestia-app-main/config
wget -O $HOME/.celestia-app-main/config/genesis.json "https://share106.00.utsa.tech/celestia-mainnet/genesis.json"
sha256sum ~/.celestia-app-main/config/genesis.json
# 9727aac9bbfb021ce7fc695a92f901986421283a891b89e0af97bc9fad187793
At this stage, we can download the address book
wget -O $HOME/.celestia-app-main/config/addrbook.json "https://share106.00.utsa.tech/celestia-mainnet/addrbook.json"
Set up node configuration
chain_id="celestia"
sed -i -e "s/^chain-id *=.*/chain-id = \"$chain_id\"/" $HOME/.celestia-app-main/config/client.toml
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.002utia\"/;" ~/.celestia-app-main/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.celestia-app-main/config/config.toml
seeds="12ad7c73c7e1f2460941326937a039139aa78884@celestia-mainnet-seed.itrocket.net:40656"
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.celestia-app-main/config/config.toml
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.celestia-app-main/config/config.toml
(OPTIONAL) Set up pruning
pruning="custom"
pruning_keep_recent="100"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.celestia-app-main/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.celestia-app-main/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.celestia-app-main/config/app.toml
(OPTIONAL) Set up indexer
indexer="kv"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.celestia-app-main/config/config.toml
Create a service file
tee /etc/systemd/system/celestia-appd.service > /dev/null <<EOF
[Unit]
Description=celestia-appd mainnet
After=network-online.target
[Service]
User=$USER
ExecStart=$(which celestia-appd) start --home $HOME/.celestia-app-main
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
Last updated