Join The Mainnet

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.
On Uniswap, please confirm that the WIOV ERC20 contract is 0x175D9Dfd6850AA96460E29bC0cEad05756965E91 with token name "Starname" and ticker "WIOV".

Update starname.env and iovnsd.sh

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.
1
sudo su # make life easier for the next ~60 lines
2
3
systemctl stop starname.service
4
5
cd /etc/systemd/system
6
7
export USER_IOV=iov # "iov" is not recommended
8
export SIGNER=dave # signer for the gentx/create-validator
9
10
# overwrite the environment file for the IOV Name Service services
11
cat <<__EOF_IOVNS_ENV__ > starname.env
12
# operator variables
13
CHAIN_ID=iov-mainnet-2
14
MONIKER=$(hostname)
15
SIGNER=${SIGNER}
16
USER_IOV=${USER_IOV}
17
18
# directories (without spaces to ease pain)
19
DIR_IOVNS=/opt/iovns/bin
20
DIR_WORK=/home/${USER_IOV}/iov-mainnet-2
21
22
# artifacts
23
IOVNS=https://github.com/iov-one/iovns/releases/download/v0.9.1/iovns-0.9.1-linux-amd64.tar.gz
24
__EOF_IOVNS_ENV__
25
26
chgrp $(id -g ${USER_IOV}) starname.env
27
chmod g+r starname.env
28
29
set -o allexport ; source /etc/systemd/system/starname.env ; set +o allexport # pick-up env vars
30
31
cd ${DIR_IOVNS}
32
33
# create iovnsd.sh, a wrapper for iovnsd
34
cat <<__EOF_IOVNSD_SH__ > iovnsd.sh
35
#!/bin/bash
36
37
exec $PWD/iovnsd start \\
38
--home=${DIR_WORK} \\
39
--minimum-gas-prices='1.0uiov' \\
40
--moniker="${MONIKER}" \\
41
--p2p.laddr='tcp://0.0.0.0:46656' \\
42
--p2p.seeds='[email protected]:46656' \\
43
--rpc.laddr='tcp://127.0.0.1:46657' \\
44
--rpc.unsafe=false \\
45
46
__EOF_IOVNSD_SH__
47
48
chgrp $(id -g ${USER_IOV}) iovnsd.sh
49
chmod a+x iovnsd.sh
50
51
# initialize the IOV Name Service
52
su - ${USER_IOV}
53
set -o allexport ; source /etc/systemd/system/starname.env ; set +o allexport # pick-up env vars
54
55
rm -rf ${DIR_WORK} && mkdir -p ${DIR_WORK} && cd ${DIR_WORK}
56
57
# initialize IOV Name Service (iovnsd)
58
${DIR_IOVNS}/iovnsd init ${MONIKER} --chain-id ${CHAIN_ID} --home ${DIR_WORK} 2>&1 | jq -r .chain_id
59
60
curl --fail https://gist.githubusercontent.com/davepuchyr/4fe7e002061c537ddb116fee7a2f8e47/raw/2ac02aea0e7ba2e0aab6cd00819a4d8d45c30f29/genesis.json > config/genesis.json
61
sha256sum config/genesis.json | grep 27898a4fb858ddee28202b6f8e8d0f4b608d9587f39529f7a18be331c5d7a4fc || echo 'BAD GENESIS FILE!'
62
63
exit # ${USER_IOV}
64
65
journalctl -f -u starname.service & # watch the chain sync
66
systemctl start starname.service
67
68
exit # root
Copied!

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
1
#!/bin/bash
2
3
exec $PWD/iovnsd start \
4
--home=${DIR_WORK} \
5
--minimum-gas-prices='1.0uiov' \
6
--moniker='${MONIKER}' \
7
--p2p.laddr='tcp://0.0.0.0:46656' \
8
--p2p.pex=true \
9
--p2p.private_peer_ids='VALIDATOR_ID' \
10
--p2p.seeds='[email protected]:46656' \
11
--rpc.laddr='tcp://127.0.0.1:46657' \
12
--rpc.unsafe=false \
Copied!
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.id on 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
1
#!/bin/bash
2
3
exec $PWD/iovnsd start \
4
--home=${DIR_WORK} \
5
--minimum-gas-prices='1.0uiov' \
6
--moniker='${MONIKER}' \
7
--p2p.laddr='tcp://0.0.0.0:46656' \
8
--p2p.persistent_peers='[email protected]_IP0:SENTRY_PORT0,[email protected]_IP1:SENTRY_PORT1' \
9
--p2p.pex=false \
10
--priv_validator_laddr='tcp://HSM_IP:HSM_PORT' \
11
--rpc.laddr='tcp://127.0.0.1:46657' \
12
--rpc.unsafe=false \
Copied!
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.
1
set -o allexport ; source /etc/systemd/system/starname.env ; set +o allexport # pick-up env vars
2
3
export PATH=${DIR_IOVNS}:$PATH
4
5
iovnscli tx staking create-validator \
6
--moniker "${MONIKER}" \
7
--amount 100000000uiov \
8
--commission-max-change-rate 0.01 \
9
--commission-max-rate 0.2 \
10
--commission-rate 0.1 \
11
--min-self-delegation 1 \
12
--from ${SIGNER} \
13
--pubkey $(iovnsd tendermint show-validator --home ${DIR_WORK}) \
14
--gas-prices 1.0uiov \
15
--node https://rpc.iov-mainnet-2.iov.one:443 \
16
--chain-id ${CHAIN_ID}
Copied!
Happy validating!
Last modified 7mo ago