✔️Celestia
Install go
cd $HOME
VER="1.21.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"
[ ! -f ~/.bash_profile ] && touch /.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
set vars
echo "export WALLET="wallet"" >> $HOME/.bash_profile
echo "export MONIKER="test"" >> $HOME/.bash_profile
echo "export CELESTIA_CHAIN_ID="celestia"" >> $HOME/.bash_profile
echo "export CELESTIA_PORT="40"" >> $HOME/.bash_profile
source $HOME/.bash_profile
download binary
cd $HOME
rm -rf celestia-app
git clone https://github.com/celestiaorg/celestia-app.git
cd celestia-app/
APP_VERSION=v1.10.1
git checkout tags/$APP_VERSION -b $APP_VERSION
make install
cd $HOME
rm -rf networks
git clone https://github.com/celestiaorg/networks.git
celestia-appd init $MONIKER --chain-id $CELESTIA_CHAIN_ID
config and init app
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 "test" --chain-id mocha-4
download genesis and addrbook
wget -O $HOME/.celestia-app/config/genesis.json https://testnet-files.itrocket.net/celestia/genesis.json
wget -O $HOME/.celestia-app/config/addrbook.json https://testnet-files.itrocket.net/celestia/addrbook.json
set seeds and peers
SEEDS="5d0bf034d6e6a8b5ee31a2f42f753f1107b3a00e@celestia-testnet-seed.itrocket.net:11656"
PEERS="daf2cecee2bd7f1b3bf94839f993f807c6b15fbf@celestia-testnet-peer.itrocket.net:11656,f07813ee16dabdeb370c7ffbdbbc73d9f4db48d5@139.45.205.58:28656,3e30bcfc55e7d351f18144aab4b0973e9e9bf987@65.108.226.183:11656,e726816f42831689eab9378d5d577f1d06d25716@164.152.163.148:36656,c17c0cbf05e98656fee5f60fad469fc528f6d6de@65.109.25.113:11656,c8a8e1882a4a8a977fc7e030b93cc7aaec3180b6@211.219.19.78:26656,837134836acf3a5c8c27d155afdc268cc85267f5@65.21.136.101:26656,edebca7508b70df9659c1293b0d8cbc05c77c91f@65.108.12.253:16007,8194b4f9c4d558a0a4d4242bce9274892cbfb386@20.250.38.245:26656,85aef6d15d0197baff696b6e31c88e0f21073c59@162.55.245.144:2400,5e5284c5ceff1913eae6ba76cc9e64cbf539bfd6@86.48.2.78:26656,a8bb0bc58133022effcf415663d93c0ca835ebde@13.212.141.100:26656,d468354f164a374f9560d6ad46572668020a222e@195.14.6.178:26656,d1b54cbb969c57ed74b10b69c318e42689beb0bb@141.95.35.218:26656,23711b72518bf5ce249d3f06110858cefc5f294a@94.130.54.216:11656,269d63adbe022d956fdd6735b93fc8e5b2fad5a8@93.190.143.6:26656,a98484ac9cb8235bd6a65cdf7648107e3d14dab4@116.202.231.58:12056,77244576dd7734b5f0b07a24a5d9a9ac3f6bd3d1@141.94.135.203:26656,8467ece74c4e62832898d350334e77da9eb0808a@57.128.54.105:26656,7bb64cb482c0c6869df808a2c0ee7b6c3216079e@94.130.35.35:17656,b561cba96931553cc61d3b5a8a2aaf3ea1864ea4@89.58.51.28:26653"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*seeds *=.*/seeds = \"$SEEDS\"/}" \
-e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.celestia-app/config/config.toml
set custom ports in app.toml
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 file
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
config pruning
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
set minimum gas price, enable prometheus and disable indexing
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
create service file
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
reset and download snapshot
celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app
if curl -s --head curl https://testnet-files.itrocket.net/celestia/snap_celestia.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
curl https://testnet-files.itrocket.net/celestia/snap_celestia.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.celestia-app
else
echo no have snap
fi
enable and start service
sudo systemctl daemon-reload
sudo systemctl enable celestia-appd
sudo systemctl restart celestia-appd && sudo journalctl -u celestia-appd -f
Last updated