installation


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

Installation

Decentr
Decentr

Network name: Decentr | Chain ID: mainnet-3 | Latest version: v1.5.7 | Custom Port: 234

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 zst build-essential
sudo apt -qy upgrade

Install Go

sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.19.8.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 decentr
git clone https://github.com/Decentr-net/decentr decentr
cd decentr
git checkout v1.5.7

# Build binaries
make install

# Prepare binaries for Cosmovisor
mkdir -p $HOME/.decentr/cosmovisor/genesis/bin
mv ~/go/bin/decentrd $HOME/.decentr/cosmovisor/genesis/bin/
rm -rf build

Install Cosmovisor and create a service

# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.4.0

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

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
WorkingDirectory=$HOME/.decentr
Restart=always
RestartSec=5
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.decentr"
Environment="DAEMON_NAME=decentrd"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.decentr/cosmovisor/current/bin"

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

Initialize the node

# Set node configuration
decentrd config chain-id mainnet-3
decentrd config node tcp://localhost:23457

# Initialize the node
decentrd init $MONIKER --chain-id mainnet-3

# Download genesis and addrbook
curl -Ls https://raw.githubusercontent.com/Decentr-net/mainnets/master/3.0/genesis.json > $HOME/.decentr/config/genesis.json
curl -Ls https://snapshots.lavenderfive.com/addrbooks/decentr/addrbook.json > $HOME/.decentr/config/addrbook.json

# Add seeds
seeds="8a3485f940c3b2b9f0dd979a16ea28de154f14dd@calliope.mainnet.decentr.xyz:26656,3261bff0b7c16dcf6b5b8e62dd54faafbfd75415@hera.mainnet.decentr.xyz:26656,c37f32e202e13b0725515570f794b68573a6f58c@hera.mainnet.decentr.xyz:26656,5f3cfa2e3d5ed2c2ef699c8593a3d93c902406a9@hermes.mainnet.decentr.xyz:26656,a529801b5390f56d5c280eaff4ae95b7163e385f@melpomene.mainnet.decentr.xyz:26656,385129dbe71bceff982204afa11ed7fa0ee39430@poseidon.mainnet.decentr.xyz:26656,35a934228c32ad8329ac917613a25474cc79bc08@terpsichore.mainnet.decentr.xyz:26656,0fd62bcd1de6f2e3cfc15852cdde9f3f8a7987e4@thalia.mainnet.decentr.xyz:26656,bd99693d0dbc855b0367f781fb48bf1ca6a6a58b@zeus.mainnet.decentr.xyz:26656,6bb349e1709da784d1628fa1f8bfc5cd00af974d@seeds.badgerbite.io:16656,3fb96f1619340507e7f28fd7c4b81f4cd3d9a7e7@seeds-decentr.sxlzptprjkt.xyz:31656,89f32d5e096eadddb1b3e6e839963503ef4d2d70@rpc.decentr.nodexcapital.com:10856,49963582499c44dc8e119b4112e2f7b227003333@seed-node.mms.team:39656,8542cd7e6bf9d260fef543bc49e59be5a3fa9074@seed.publicnode.com:26656,ca6c4b66c41cfca3e1b873321527781d46c92e57@seed-decentr.ibs.team:16657"
sed -i -e "s|^seeds *=.*|seeds = \"$seeds\"|" $HOME/.decentr/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.025udec\"|" $HOME/.decentr/config/app.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/.decentr/config/app.toml

# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:23458\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:23457\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:23460\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:23456\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":23466\"%" $HOME/.decentr/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:23417\"%; s%^address = \":8080\"%address = \":23480\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:23490\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:23491\"%; s%:8545%:23445%; s%:8546%:23446%; s%:6065%:23465%" $HOME/.decentr/config/app.toml

Start service and check the logs

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

Sync

To catch up quickly, you can either use a snapshot or state sync

Last updated