Skip to content

Pell Cosmovisor

Prysm banner
  • Check go version #requirement go version above v.1.22 if you have Go v.1.22 already. Please skip install Go step.

1. Install go

Terminal window
cd $HOME && \
ver="1.22.0" && \
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:$HOME/go/bin' >> ~/.bash_profile && \
source ~/.bash_profile && \
go version

2. Install Cosmovisor

Terminal window
#cosmovisor version 1.7
source $HOME/.bash_profile
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
  • Check cosmovisor version:
Terminal window
cosmovisor version

3. Create cosmovisor directory

Terminal window
mkdir -p $HOME/.pellcored/cosmovisor/genesis/bin
Terminal window
# Set permission for cosmovisor
sudo chown -R $USER:$USER $HOME/.pellcored/cosmovisor
Terminal window
# Copy new version binary to genesis folder
sudo cp $HOME/go/bin/pellcored $HOME/.pellcored/cosmovisor/genesis/bin/

4. Verify the Setup

Terminal window
# Check the story version in genesis folder. It should be old version is v1.0.22
$HOME/.pellcored/cosmovisor/genesis/bin/pellcored version
  • Update service file:
Terminal window
sudo tee /etc/systemd/system/pellcored.service > /dev/null <<EOF
[Unit]
Description=Pell Node
After=network.target
[Service]
User=root
Environment="LD_LIBRARY_PATH=/root/.pellcored/lib"
Environment="DAEMON_NAME=pellcored"
Environment="DAEMON_HOME=/root/.pellcored/"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_DATA_BACKUP_DIR=/root/.pellcored/data"
Environment="UNSAFE_SKIP_BACKUP=true"
ExecStart=/root/go/bin/cosmovisor run start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

5. Stop & Restart node

Terminal window
sudo systemctl stop pellcored
Terminal window
sudo systemctl daemon-reload
sudo systemctl restart pellcored && sudo journalctl -fu pellcored -o cat

6. Manual Setup New Binary Version (Optional)

If you want to manually prepare the upgrade:

Terminal window
# Create upgrades directory
mkdir -p $HOME/.pellcored/cosmovisor/upgrades/v1.1.1/bin
# Download new binary
wget https://github.com/0xPellNetwork/network-config/releases/download/v1.1.1-ignite/pellcored-v1.1.1-linux-amd64 -O pellcored
# Verify checksum
echo "ca510d53ddbe1b0013749911206c3feb57f1494581633342fc3024cb1e17783b pellcored" | sha256sum -c
# Make binary executable and move to upgrades folder
chmod +x pellcored
sudo mv pellcored $HOME/.pellcored/cosmovisor/upgrades/v1.1.1/bin/
# Verify binary version
$HOME/.pellcored/cosmovisor/upgrades/v1.1.1/bin/pellcored version

7. Manual Binary Switch (If Cosmovisor Auto-Switch Fails)

Terminal window
# Stop the node
sudo systemctl stop pellcored
# Remove current symlink
rm /root/.pellcored/cosmovisor/current
# Create new symlink to upgrades directory
ln -s $HOME/.pellcored/cosmovisor/upgrades/v1.1.1 /root/.pellcored/cosmovisor/current
# Verify symlink
ls -l $HOME/.pellcored/cosmovisor/current
# Start the node
sudo systemctl start pellcored
# Check logs to ensure node is running with new binary
sudo journalctl -u pellcored -f