Full node build

Install Go and Cosmovisor

Feel free to skip this step if you already have Go and Cosmovisor.

Install Go

We will use Go v1.20.4 as example here. The code below also cleanly removes any previous Go installation.

sudo rm -rvf /usr/local/go/
wget https://golang.org/dl/go1.20.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz
rm go1.20.4.linux-amd64.tar.gz

Configure Go

Unless you want to configure in a non-standard way, then set these in the ~/.profile file.

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin

Install Cosmovisor

We will use Cosmovisor v1.0.0 as example here.

go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v1.0.0

Install Node

Install the current version of node binary.

git clone https://github.com/EmpowerPlastic/empowerchain && \
cd empowerchain && \
git checkout v1.0.0-rc1 &&
cd chain &&
make install

Configure Node

Initialize Node

Please replace YOUR_MONIKER with your own moniker.

empowerd init YOUR_MONIKER --chain-id circulus-1

Download Genesis

The genesis file link below is Polkachu's mirror download. The best practice is to find the official genesis download link.

wget -O genesis.json https://github.com/EmpowerPlastic/empowerchain/raw/main/testnets/circulus-1/genesis.json --inet4-only
mv genesis.json ~/.empowerchain/config

Configure Seeds and Peers

Using a seed node to bootstrap is the best practice in our view. Alternatively, you can use addrbook or persistent_peers.

seeds="d6a7cd9fa2bafc0087cb606de1d6d71216695c25@51.159.161.174:26656"
peers="e8b3fa38a15c426e046dd42a41b8df65047e03d5@95.217.144.107:26656,89ea54a37cd5a641e44e0cee8426b8cc2c8e5dfb@51.159.141.221:26656,0747860035271d8f088106814a4d0781eb7b2bc7@142.132.203.60:27656,3c758d8e37748dc692621a0d59b454bacb69b501@65.108.224.156:26656,41b97fced48681273001692d3601cd4024ceba59@5.9.147.185:26656"
sed -i -e 's|^seeds *=.*|seeds = "'$seeds'"|; s|^persistent_peers *=.*|persistent_peers = "'$peers'"|' $HOME/.empowerchain/config/config.toml

Set Minimum Gas

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.025umpwr\"/" $HOME/.empowerchain/config/app.toml

Setup cosmovisor

Follow the Setup Cosmovisor instructions to setup cosmovisor and start the node.

Upgrade to a validator

Do not attempt to upgrade your node to a validator until the node is fully in sync as per the previous step.

To upgrade the node to a validator, you will need to submit a create-validator transaction:

empowerd tx staking create-validator \
  --amount 1000000umpwr \
  --commission-max-change-rate "0.1" \
  --commission-max-rate "0.20" \
  --commission-rate "0.1" \
  --min-self-delegation "1" \
  --details "validators write bios too" \
  --pubkey=$(empowerd tendermint show-validator) \
  --moniker $MONIKER_NAME \
  --chain-id circulus-1 \
  --gas-prices 0.025umpwr \
  --from <KEYNAME>

The above transaction is just an example. There are many more flags that can be set to customise your validator, such as your validator website, or keybase.io id, etc. To see a full list:

empowerd tx staking create-validator --help

Backup critical files

There are certain files that you need to backup to be able to restore your validator if, for some reason, it damaged or lost in some way. Please make a secure backup of the following files located in ~/.empowerchain/config/:

  • priv_validator_key.json

  • node_key.json

It is recommended that you encrypt the backup of these files.

Last updated

Logo

Made with ❤️ by WhisperNode // © 2024.