Mainnet
Irisnet

How To Install Full Node IrisNet Mainnet
Setting up vars
Your Nodename (validator) that will shows in explorer
NODENAME=<Your_Nodename_Moniker>
Save variables to system
echo "export NODENAME=$NODENAME" >> $HOME/.bash_profile
if [ ! $WALLET ]; then
echo "export WALLET=wallet" >> $HOME/.bash_profile
fi
echo "export IRIS_CHAIN_ID=irishub-1" >> $HOME/.bash_profile
source $HOME/.bash_profile
Update packages
sudo apt update && sudo apt upgrade -y
Install dependencies
sudo apt install curl build-essential git wget jq make gcc tmux net-tools ccze -y
Install go
if ! [ -x "$(command -v go)" ]; then
ver="1.18.2"
cd $HOME
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile
source ~/.bash_profile
fi
Download and build binaries
cd $HOME
git clone https://github.com/irisnet/irishub
cd irishub
git checkout v4.0.1
make install
Config app
iris config chain-id $IRIS_CHAIN_ID
Init app
iris init $NODENAME --chain-id $IRIS_CHAIN_ID
Download configuration
curl -o ~/.iris/config/config.toml https://raw.githubusercontent.com/irisnet/mainnet/master/config/config.toml
curl -o ~/.iris/config/genesis.json https://raw.githubusercontent.com/irisnet/mainnet/master/config/genesis.json
Disable indexing
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.iris/config/config.toml
Set minimum gas price
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.2uiris"|g' $HOME/.iris/config/app.toml
Create service
sudo tee /etc/systemd/system/iris.service > /dev/null << EOF
[Unit]
Description=Iris Node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which iris) start
Restart=on-failure
RestartSec=10
LimitNOFILE=10000
[Install]
WantedBy=multi-user.target
EOF
Register and start service
sudo systemctl daemon-reload
sudo systemctl enable iris
sudo systemctl restart iris && sudo journalctl -u iris -f -o cat
Guidence for create validator
Create wallet
To create new wallet you can use command below. Don’t forget to save the mnemonic
iris keys add $WALLET
To recover your wallet using seed phrase
iris keys add $WALLET --recover
Show your wallet list
iris keys list
Save wallet info
Add wallet and validator address into variables
IRIS_WALLET_ADDRESS=$(iris keys show $WALLET -a)
IRIS_VALOPER_ADDRESS=$(iris keys show $WALLET --bech val -a)
echo 'export IRIS_WALLET_ADDRESS='${IRIS_WALLET_ADDRESS} >> $HOME/.bash_profile
echo 'export IRIS_VALOPER_ADDRESS='${IRIS_VALOPER_ADDRESS} >> $HOME/.bash_profile
source $HOME/.bash_profile
Fund your wallet
In order to create validator first you need to fund your wallet with discord faucet.
N/A
Create validator
check your wallet balance:
iris query bank balances $IRIS_WALLET_ADDRESS
To create your validator run command below
iris tx staking create-validator \
--amount 1000000uiris \
--from $WALLET \
--commission-max-change-rate "0.01" \
--commission-max-rate "0.2" \
--commission-rate "0.07" \
--min-self-delegation "1" \
--pubkey $(iris tendermint show-validator) \
--moniker $NODENAME \
--chain-id $IRIS_CHAIN_ID
Check your validator key
[[ $(iris q staking validator $IRIS_VALOPER_ADDRESS -oj | jq -r .consensus_pubkey.key) = $(iris status | jq -r .ValidatorInfo.PubKey.value) ]] && echo -e "\n\e[1m\e[32mTrue\e[0m\n" || echo -e "\n\e[1m\e[31mFalse\e[0m\n"
Get list of validators
iris q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Usefull commands
Service management
Check logs
journalctl -fu iris -o cat
Start service
sudo systemctl start iris
Stop service
sudo systemctl stop iris
Restart service
sudo systemctl restart iris
Node info
Synchronization info
iris status 2>&1 | jq .SyncInfo
Validator info
iris status 2>&1 | jq .ValidatorInfo
Node info
iris status 2>&1 | jq .NodeInfo
Show node id
iris tendermint show-node-id
Wallet operations
List of wallets
iris keys list
Recover wallet
iris keys add $WALLET --recover
Delete wallet
iris keys delete $WALLET
Get wallet balance
iris query bank balances $IRIS_WALLET_ADDRESS
Transfer funds
iris tx bank send $IRIS_WALLET_ADDRESS <TO_IRIS_WALLET_ADDRESS> 1000000uiris
Voting
iris tx gov vote 1 yes --from $WALLET --chain-id=$IRIS_CHAIN_ID
Staking, Delegation and Rewards
Delegate stake
iris tx staking delegate $IRIS_VALOPER_ADDRESS 1000000uiris --from=$WALLET --chain-id=$IRIS_CHAIN_ID --gas=auto
Redelegate stake from validator to another validator
iris tx staking redelegate <srcValidatorAddress> <destValidatorAddress> 1000000uiris --from=$WALLET --chain-id=$IRIS_CHAIN_ID --gas=auto
Withdraw all rewards
iris tx distribution withdraw-all-rewards --from=$WALLET --chain-id=$IRIS_CHAIN_ID --gas=auto
Withdraw rewards with commision
iris tx distribution withdraw-rewards $IRIS_VALOPER_ADDRESS --from=$WALLET --commission --chain-id=$IRIS_CHAIN_ID
Validator management
Edit validator
iris tx staking edit-validator \
--moniker=$NODENAME \
--identity=<your_keybase_id> \
--website="<your_website>" \
--details="<your_validator_description>" \
--chain-id=$IRIS_CHAIN_ID \
--from=$WALLET
Unjail validator
iris tx slashing unjail \
--broadcast-mode=block \
--from=$WALLET \
--chain-id=$IRIS_CHAIN_ID \
--gas=auto
RPC
https://mainnet-iris-rpc.konsortech.xyz
API
https://mainnet-iris-api.konsortech.xyz
JSON RPC (EVM)
https://mainnet-iris-evm.konsortech.xyz
gRPC
mainnet-iris-evm.konsortech.xyz:22090
Peers
a19022cc07010836ed2a9c77dd56968965edb454@mainnet-iris.konsortech.xyz:22656
Seed
4453dfbd962d70deff313c074c54899ee05c4035@mainnet-seed.konsortech.xyz:30165
Addrbook
https://snapshot.konsortech.xyz/mainnet/irisnet/addrbook.json
Genesis File
https://snapshot.konsortech.xyz/mainnet/irisnet/genesis.json
Statesync
sudo systemctl stop iris
cp $HOME/.iris/data/priv_validator_state.json $HOME/.iris/priv_validator_state.json.backup
iris tendermint unsafe-reset-all --home $HOME/.iris --keep-addr-book
SNAP_RPC="https://mainnet-iris-rpc.konsortech.xyz:443"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.iris/config/config.toml
mv $HOME/.iris/priv_validator_state.json.backup $HOME/.iris/data/priv_validator_state.json
sudo systemctl restart iris
sudo journalctl -u iris -f --no-hostname -o cat
Daily Snapshot
sudo systemctl stop iris
cp $HOME/.iris/data/priv_validator_state.json $HOME/.iris/priv_validator_state.json.backup
rm -rf $HOME/.iris/data
SNAP_NAME=$(curl -s https://snapshot.konsortech.xyz/mainnet/irisnet/ | egrep -o ">iris-snapshot.*\.tar.lz4" | tr -d ">")
curl https://snapshot.konsortech.xyz/mainnet/irisnet/${SNAP_NAME} | lz4 -dc - | tar -xf - -C $HOME/.iris
mv $HOME/.iris/priv_validator_state.json.backup $HOME/.iris/data/priv_validator_state.json
sudo systemctl restart iris && journalctl -u iris -f --no-hostname -o cat