install_mainnet

Humans mainnet validator node

Official documentation:

Validator setup instructions

Explorer:

https://explorer.creeptah.xyz/humans

Install guide

Update packages

sudo apt update && sudo apt upgrade -y

Install dependencies

sudo apt install curl git jq lz4 build-essential libssl-dev -y

Install variables

MONIKER="your_moniker"
CHAIN_ID="humans_1089-1"

Install go

cd $HOME && \
wget "https://golang.org/dl/go1.20.1.linux-amd64.tar.gz" && \
sudo tar -C /usr/local -xzf "go1.20.1.linux-amd64.tar.gz" && \
rm "go1.20.1.linux-amd64.tar.gz" && \
echo "export GOROOT=/usr/local/go" >> ~/.bash_profile && \
echo "export GOPATH=$HOME/go" >> ~/.bash_profile && \
echo "export GO111MODULE=on" >> ~/.bash_profile && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version

Download and build binaries

cd $HOME && \
git clone https://github.com/humansdotai/humans.git && \
cd humans && \
git checkout v1.0.0 && \
make build

Install Cosmovisor

go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0

Setup Cosmovisor

mkdir -p $HOME/.humansd/cosmovisor/genesis/bin && \
mv build/humansd $HOME/.humansd/cosmovisor/genesis/bin/ && \
sudo ln -s $HOME/.humansd/cosmovisor/genesis $HOME/.humansd/cosmovisor/current -f && \
sudo ln -s $HOME/.humansd/cosmovisor/current/bin/humansd /usr/local/bin/humansd -f

Init app

humansd init "$MONIKER" --chain-id $CHAIN_ID

Download genesis

wget -O $HOME/.humansd/config/genesis.json "https://raw.githubusercontent.com/humansdotai/mainnet/main/mainnet/1/genesis_1089-1.json"

Config app

Setup chain to config

humansd config chain-id $CHAIN_ID

Setup peers

peers="78957f3ca436c1086d08b713b9eb81d55998b1f5@65.109.159.94:15656" && \
sed -i "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/;" $HOME/.humansd/config/config.toml

Config pruning

sed -i -e "s/^pruning *=.*/pruning = \"nothing\"/" $HOME/.humansd/config/app.toml

Set min gas price

sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"1800000000aheart\"/" $HOME/.humansd/config/app.toml

Enable/Disable snapshot (optional)

snapshot_interval="1000" && \
sed -i.bak -e "s/^snapshot-interval *=.*/snapshot-interval = \"$snapshot_interval\"/" ~/.humansd/config/app.toml

Enable prometheus (optional)

sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.humansd/config/config.toml

Create service

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

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start --metrics --pruning=nothing --evm.tracer=json --minimum-gas-prices=1800000000aheart json-rpc.api eth,net,web3,miner --api.enable
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.humansd"
Environment="DAEMON_NAME=humansd"
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/.humansd/cosmovisor/current/bin"

[Install]
WantedBy=multi-user.target
EOF

Register and start service

sudo systemctl daemon-reload && \
sudo systemctl enable humansd && \
sudo systemctl restart humansd && sudo journalctl -u humansd -f -o cat

Check synchronization status ("catching_up": false is synced)

humansd status 2>&1 | jq .SyncInfo

Create wallet (!Safe your mnemonic)

humansd keys add wallet

To recover your wallet using seed phrase (optional)

humansd keys add wallet --recover

Check balance

humansd query bank balances <wallet_address>

Create validator

humansd tx staking create-validator \
--amount 1000000aheart \
--pubkey $(humansd tendermint show-validator) \
--moniker "$MONIKER" \
--chain-id $CHAIN_ID \
--commission-rate 0.05 \
--commission-max-rate 0.20 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--identity "KEYBASE_ID" \
--details "DETAILS" \
--website "WEBSITE_URL" \
--from wallet \
--gas-adjustment 1.4 \
--gas auto \
--gas-prices 1800000000aheart \
-y

Optimisation config.toml

sed -i \
  -e 's|^create_empty_blocks *=.*|create_empty_blocks = false|' \
  -e 's|^prometheus *=.*|prometheus = true|' \
  -e 's|^create_empty_blocks_interval *=.*|create_empty_blocks_interval = "30s"|' \
  -e 's|^timeout_propose *=.*|timeout_propose = "30s"|' \
  -e 's|^timeout_propose_delta *=.*|timeout_propose_delta = "5s"|' \
  -e 's|^timeout_prevote *=.*|timeout_prevote = "10s"|' \
  -e 's|^timeout_prevote_delta *=.*|timeout_prevote_delta = "5s"|' \
  -e 's|^cors_allowed_origins *=.*|cors_allowed_origins = ["*.humans.ai","*.humans.zone"]|' \
  -e 's|^timeout_prevote_delta *=.*|timeout_prevote_delta = "5s"|' \
  $HOME/.humansd/config/config.toml

Optimisation app.toml

sed -i \
  -e 's|^prometheus-retention-time *=.*|prometheus-retention-time = 1000000000000|' \
  -e 's|^enabled *=.*|enabled = true|' \
  -e '/^\[api\]$/,/^\[/ s/enable = false/enable = true/' \
  -e 's|^swagger *=.*|swagger = true|' \
  -e 's|^max-open-connections *=.*|max-open-connections = 100|' \
  -e 's|^rpc-read-timeout *=.*|rpc-read-timeout = 5|' \
  -e 's|^rpc-write-timeout *=.*|rpc-write-timeout = 3|' \
  -e 's|^rpc-max-body-bytes *=.*|rpc-max-body-bytes = 1000000|' \
  -e 's|^enabled-unsafe-cors *=.*|enabled-unsafe-cors = false|' \
  $HOME/.humansd/config/app.toml

Last updated