Celestia labs

mammoblocks

Node installation

Start a codespace from a template and get to developing with the power of a virtual machine in the cloud.

Recommended Hardware

ubuntu-20.04

ubuntu-22.04

CPU:

RAM:

8 cores

24GB

Storage:

3000GB

Version

v0.8.9+commit.e5eed63a

Binary:

v3.8.1

Peers:

43

Node name

Port

Pruning

Pruning keep recent

Pruning interval

Manual upgrade

### Install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install git gcc make jq curl lz4
### Install go
cd $HOME
VER=1.23.6
wget -qO go.tar.gz "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go.tar.gz
rm go.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bashrc
source ~/.bashrc
mkdir -p ~/go/bin
### Download binary and build
cd $HOME
rm -rf celestia-appd
git clone https://github.com/celestiaorg/celestia-app.git celestia-appd
cd celestia-appd
APP_VERSION=v3.8.1
git checkout tags/$APP_VERSION -b $APP_VERSION
make install
### Config and init app
celestia-appd init --chain-id celestia
wget -O $HOME/.celestia-app/config/genesis.json https://raw.githubusercontent.com/celestiaorg/networks/master/celestia/genesis.json
### Set seeds and peers
SEED=e415416c67869eab28b572c2b0038bf90b470769@celestia-seed.stakeme.pro:45656
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 and config.toml
sed -i.bak -e "s%:1317%:317%g;
s%:8080%:080%g;
s%:9090%:090%g;
s%:9091%:091%g;
s%:8545%:545%g;
s%:8546%:546%g;
s%:6065%:065%g" $HOME/.celestia-app/config/app.toml
sed -i.bak -e "s%:26658%:658%g;
s%:26657%:657%g;
s%:6060%:060%g;
s%:26656%:656%g;
s%:26660%: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 = \"\"/" $HOME/.celestia-app/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"\"/" $HOME/.celestia-app/config/app.toml
### Set minimum gas price
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.002utia"|g' $HOME/.celestia-app/config/app.toml
### Disable indexing if needed
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 is a modular consensus and data network
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.celestia-app
ExecStart=$(which celestia-appd) start
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
### Reset and state sync
celestia-appd tendermint unsafe-reset-all --home $HOME/.celestia-app
STATYSYNC_RPC=https://celestia-rpc.stakeme.pro:443
LATEST_HEIGHT=$(curl -s $STATYSYNC_RPC/block | jq -r .result.block.header.height);
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000));
TRUST_HASH=$(curl -s "$STATYSYNC_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ;
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ;
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ;
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"| ;
s|^(seeds[[:space:]]+=[[:space:]]+).*$|\1\"\"|" $HOME/.celestia-app/config/config.toml
### Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable celestia-appd.service
sudo systemctl start celestia-appd.service

Note

### You need to enable the bbr algorithm or add the --force-no-bbr flag to the command start.

### ex. ExecStart=$(which celestia-appd) start --force-no-bbr