Buy tokens for staking your validator from Bilaxy or on Uniswap
The staking token for the Starname network is IOV, which can be purchased outright from Bilaxy. If you prefer to buy on Uniswap then you'll have to convert the WIOV from Uniswap to IOV by using the swap feature of the Starname Manager.
This document assumes that you are migrating your testnet nodes to mainnet nodes. Given that, the setup for the mainnet is basically identical to that for a testnet. The only difference between the two are entries in /etc/systemd/system/starname.env file and ${DIR_IOVNS}/iovnsd.sh, so let's re-create those files.
sudosu# make life easier for the next ~60 linessystemctlstopstarname.servicecd/etc/systemd/systemexport USER_IOV=iov # "iov" is not recommendedexport SIGNER=dave # signer for the gentx/create-validator# overwrite the environment file for the IOV Name Service servicescat<<__EOF_IOVNS_ENV__>starname.env# operator variablesCHAIN_ID=iov-mainnet-2MONIKER=$(hostname)SIGNER=${SIGNER}USER_IOV=${USER_IOV}# directories (without spaces to ease pain)DIR_IOVNS=/opt/iovns/binDIR_WORK=/home/${USER_IOV}/iov-mainnet-2# artifactsIOVNS=https://github.com/iov-one/iovns/releases/download/v0.9.1/iovns-0.9.1-linux-amd64.tar.gz__EOF_IOVNS_ENV__chgrp $(id-g ${USER_IOV}) starname.envchmodg+rstarname.envset-oallexport ; source/etc/systemd/system/starname.env ; set+oallexport# pick-up env varscd ${DIR_IOVNS}# create iovnsd.sh, a wrapper for iovnsdcat<<__EOF_IOVNSD_SH__>iovnsd.sh#!/bin/bashexec $PWD/iovnsd start \\ --home=${DIR_WORK} \\ --minimum-gas-prices='1.0uiov' \\ --moniker="${MONIKER}" \\ --p2p.laddr='tcp://0.0.0.0:46656' \\ --p2p.seeds='c00e2f8ff7f521cc6385dcc4ad4c7053d9895e9e@167.99.194.126:46656' \\ --rpc.laddr='tcp://127.0.0.1:46657' \\ --rpc.unsafe=false \\__EOF_IOVNSD_SH__chgrp $(id-g ${USER_IOV}) iovnsd.shchmoda+xiovnsd.sh# initialize the IOV Name Servicesu- ${USER_IOV}set-oallexport ; source/etc/systemd/system/starname.env ; set+oallexport# pick-up env varsrm-rf ${DIR_WORK} &&mkdir-p ${DIR_WORK} &&cd ${DIR_WORK}# initialize IOV Name Service (iovnsd)${DIR_IOVNS}/iovnsd init ${MONIKER} --chain-id ${CHAIN_ID} --home ${DIR_WORK} 2>&1|jq-r.chain_idcurl --fail https://gist.githubusercontent.com/davepuchyr/4fe7e002061c537ddb116fee7a2f8e47/raw/2ac02aea0e7ba2e0aab6cd00819a4d8d45c30f29/genesis.json > config/genesis.json
sha256sum config/genesis.json | grep 27898a4fb858ddee28202b6f8e8d0f4b608d9587f39529f7a18be331c5d7a4fc || echo 'BAD GENESIS FILE!'
exit# ${USER_IOV}journalctl-f-ustarname.service&# watch the chain syncsystemctlstartstarname.serviceexit# root
Specialize the nodes
Now that you have sentry node(s) and a validator, they need to be made aware of their role and pointed at each other.
Sentry node configuration
Change ${DIR_IOVNS}/iovnsd.sh so that each of your sentry nodes gossip while keeping their validator hidden. On the validator node, execute curl -s http://localhost:46657/status | jq -r .result.node_info.id to get the value for VALIDATOR_ID. Change the ${DIR_IOVNS}/iovnsd.sh to something like
There are a lot more tendermint configuration options available than those shown above. Customize them as you see fit. When you're done customizing then execute sudo systemctl restart starname.service on each sentry node.
Validator configuration
Change ${DIR_IOVNS}/iovnsd.sh so that the node gossips with its sentry node(s) only, ie set p2p.pex=false and add an explicit list of p2p.persistent_peers. Obtain the sentry node ids for p2p.persistent_peers by executing curl -s http://localhost:46657/status | jq -r .result.node_info.idon each sentry node. You know the IP and PORT of the nodes, so include them appropriately. Change the ${DIR_IOVNS}/iovnsd.sh file to something like
Setup of the HSM is detailed here. When you're done customizing then execute sudo systemctl restart iovns.service.
Light-up the validator
Once your sentry nodes and validator are sync'ed then the final step to becoming a validator is to execute the create-validator command just like for any Cosmos-based chain.