Installation

Setting up your validator node has never been so easy. Get your validator running in minutes by following step by step instructions.

Chain ID: core-1 | Latest Version Tag: v11.8.1

Setup validator name

Replace YOUR_MONIKER_GOES_HERE with your validator name

MONIKER="YOUR_MONIKER_GOES_HERE"

Install dependencies

Update system and install build tools

sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade

Install Go

sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.21.5.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)

Download and build binaries

# Clone project repository
cd $HOME
rm -rf persistence
git clone https://github.com/persistenceOne/persistenceCore.git
cd persistence
git checkout v11.8.1

# Build binaries
make build

# Prepare binaries for Cosmovisor
mkdir -p $HOME/.persistence/cosmovisor/genesis/bin
mv target/dist/persistenceCore $HOME/.persistence/cosmovisor/genesis/bin/
rm -rf build

# Create application symlinks
ln -s $HOME/.persistence/cosmovisor/genesis $HOME/.persistence/cosmovisor/current
sudo ln -s $HOME/.persistence/cosmovisor/current/bin/persistenceCore /usr/local/bin/persistenceCore

Install Cosmovisor and create a service

# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]

# Create service
sudo tee /etc/systemd/system/persistenced.service > /dev/null << EOF
[Unit]
Description=persistence-main node service
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.persistence"
Environment="DAEMON_NAME=persistenceCore"
Environment="UNSAFE_SKIP_BACKUP=true"

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable persistenced

Initialize the node

# Set node configuration
persistence config chain-id core-1
persistence config keyring-backend test

# Initialize the node
persistence init $MONIKER --chain-id core-1
# Download genesis and addrbook
curl -Ls https://raw.githubusercontent.com/persistenceOne/networks/master/core-1/final_genesis.json > $HOME/.persistence/config/genesis.json
curl -Ls https://eu2.contabostorage.com/455b75bbb3764f6aa13e1ab821e1bf5e:stakeandrelax/addrbook/persistence/addrbook.json > $HOME/.persistence/config/addrbook.json

# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"622c1236dbc3e6c56d75eb3f06e046140997b0d1@persistence-rpc.stakeandrelax.net:15456\"|" $HOME/.persistence/config/config.toml

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.persistence/config/app.toml

Download latest chain snapshot

curl -L https://eu2.contabostorage.com/455b75bbb3764f6aa13e1ab821e1bf5e:stakeandrelax/snapshots/persistence/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.persistence
[[ -f $HOME/.persistence/data/upgrade-info.json ]] && cp $HOME/.persistence/data/upgrade-info.json $HOME/.persistence/cosmovisor/genesis/upgrade-info.json

Start service and check the logs

sudo systemctl start persistenced && sudo journalctl -u persistenced -f --no-hostname -o cat

Last updated