IRIS Network IRISnet Blockchain: Docker guide

IRIS Network Blockchain is alive, Docker guide builds a node, add one account or recover, then be a Validator, delegate to one or just hold.

# Hello, IRIS hub the Blockchain for IRIS Network is here producing blocks now. This is about

a) Build and run a node with docker.

b) Create an account or recover one.

c) Sent Iris Tokens and received.

d) Create a Validator or Delegate to others.

e) Play with the Rainbow wallet.

f) Be Happy.

Learn more about IRIS hub Network

https://www.irisnet.org/

Source?

If want build from source (install Goland + Iris + tools) (Here)

https://medium.com/@meleacrypto/iris-network-mainnet-aka-betanet-is-alive-here-guide-for-build-a-node-add-one-account-be-a-e2c220f3ffb4

Tips

#Update setup local time and install tools

sudo apt update
sudo apt upgrade -y
sudo apt-get install build-essential
dpkg-reconfigure locales

Update open files Ubuntu

#check your user's per-process open file limit
ulimit -Sn
#OUT 1024​
​#increase username's per process limit to 4096
sudo vi /etc/security/limits.conf
#Add this for update
username soft nofile 4096

sudo reboot now

#Install Docker

sudo apt-get update
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh

Add your user to Docker Group

sudo usermod -aG docker $(whoami)

Log out of your ssh session and log back in

Docker Version

Client:
Version: 18.09.3
API version: 1.39
Go version: go1.10.8
Git commit: 774a1f4
Built: Thu Feb 28 06:40:58 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.3
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: 774a1f4
Built: Thu Feb 28 05:59:55 2019
OS/Arch: linux/amd64
Experimental: false

Now that Docker is installed, can run IRISnet Docker from docker hub repo

Iris-Docker-Hub

First for unsafe reset all, only if you need to update the software previously installed.

docker run -p 26657:26657 -p 26656:26656 -v $HOME/.iris:/root/.iris irisnet/irishub:v0.13.1 unsafe-reset-all

Build and Run IrisHub with docker

#Create the folders for IRIS on local user, root its not recommended 
docker run -v $HOME/.iriscli:/root/.iriscli -v $HOME/.iris:/root/.iris irisnet/irishub:v0.13.1 iris init --chain-id=irishub --moniker=Write-node-name-here

Permission to folders creates previously

sudo chown $(whoami) .iris/config
sudo chown $(whoami) .iris/data

Iris folders were created successfully, now setup

cd .iris/config
#Remove the test genesis.json file

rm genesis.json
#OUT rm: remove write-protected regular file 'genesis.json'?
yes
#Copy some importants file
cp priv_validator.json $HOME
cp node_key.json $HOME
#Get the genesis.json for IrisHub
wget https://raw.githubusercontent.com/irisnet/betanet/master/config/genesis.json
vi config.toml
i
#Add peers or seeds you know that can trust then.
# Comma separated list of nodes to keep persistent connections to
persistent_peers = "2153d5d6d9394dc4c7959f061b67238d81154bdb@92.222.78.22:26656,6bf311e9ef45f05e354a3e59f314f4e5abd7a621@54.39.98.105:26666,1c16fb495df7aef4cd0f7d0dd5dc432dc693262c@54.39.98.105:26656,a731b038783ff2ecd337201c6f641f3a1637dd0b@51.89.4.203:26656,c81fd7a4a08fae22546cc621a6b8fc669e5d8534@139.99.75.84:26656"
#safe the file and start iris
esc
:wq!

docker run -it -p 26657:26657 -p 26656:26656 -v $HOME/.iris:/root/.iris irisnet/irishub:v0.13.1 iris start --trace --log_level "*:debug"

Looks like this meanwhile is downloading the existing Blocks and sync the last.

When are sure that the node is downloading blocks and its sync, feel free to close for the run in detached mode.

For close (CRL+C)

For Run in detached mode add (-d) to the docker command.

docker run -it -d -p 26657:26657 -p 26656:26656 -v $HOME/.iris:/root/.iris irisnet/irishub:v0.13.1 iris start

In detached mode the process is running on docker, can close the session and back later the Cosmos is working meanwhile on docker.

For stop when is running in -d mode

docker ps
#output
#CONTAINER ID
b6d0577f8bf7
#Stop the node
docker stop b6d0577f8bf7
#Now the IRIS node is stop.

Start Iris

docker run -it -d -p 26657:26657 -p 26656:26656 -v $HOME/.iris:/root/.iris irisnet/irishub:v0.13.1 iris start

For see the Docker container ID and IP

docker ps
#output
#CONTAINER ID
b6d0577f8bf7
#Run for see the IP
docker inspect --format '{{ .NetworkSettings.IPAddress }}' b6d0577f8bf7
#Output
172.17.0.2
Add this address to External address in config.toml
vi .iris/config/config.toml
# Address to advertise to peers for them to dial
# If empty, will use the same port as the laddr,
# and will introspect on the listener or use UPnP
# to figure out the address.
external_address = "tcp://172.17.0.2:26656"

Stop Iris to apply the new setup

docker stop container-ID

Start Iris

docker run -it -d -p 26657:26657 -p 26656:26656 -v $HOME/.iris:/root/.iris irisnet/irishub:v0.13.1 iris start

For run the commands to IRISnet in docker just add ( — network=”host” )

Example to see the status from your node meanwhile is running

docker run --network="host" irisnet/irishub:v0.13.1 iriscli status

when

“catching_up”: false

the node is sync the last block.

Create one account or recover one old account from the fundraiser of Iris Network

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli keys add Key-name
  • *Important** write this seed phrase in a safe place. works to recover the account.

For recover one account unless creating a new one

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli keys add Key-name --recover

List accounts in the local node

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli keys list
# keys add Key-name
# What is Key-name?

ok, now have the account and can delegate or create Validator if you have some $Iris Tokens.

For know, the commands can run.

docker run --network="host" irisnet/irishub:v0.13.1 iriscli -h

example for check balanced

docker run-network="host" irisnet/irishub:v0.13.1 iriscli bank -h

Then

docker run --network="host" irisnet/irishub:v0.13.1 iriscli bank account iaa1hguh57kwwvv56k5kw8x3ll5kna9r3js4mzg9am --trust-node

The output shows 4 $Iris in my account balanced.

Delegate to one validator or eleven, because

“remember not to put all your eggs in the same basket”
docker run --network="host" irisnet/irishub:v0.13.1 iriscli stake -h

can check the validators in the friend’s explorers

https://irisnet-overview.genesislab.net/

https://iris.bigdipper.live/validators

https://www.irisplorer.io/#/home

then

docker run --network="host" irisnet/irishub:v0.13.1 iriscli stake delegate -h

so, for pick up, one Validator for can delegate can use the explorers or command line.

docker run --network="host" irisnet/irishub:v0.13.1 iriscli stake validators

list of validator and info

(- -node http:……….)

so for used your own local node running in docker same machine

--node http://172.17.0.2:26657

But is your node is not synced the last blocks or for any reason want to connect to another node just use this IP in the flag node

--node http://172.17.0.2:26657

or used one IP from one node full sync

--node http://92.222.78.22:26657

Check the Balanced in the account

The balanced is true when the node is totally synced the last block.

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli bank account iaa1hguh57kwwvv56k5kw8x3ll5kna9r3js4mzg9am --node http://172.17.0.2:26657 --trust-node

Need delegate to the Operator Address for the validators you liked it.

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli stake delegate --chain-id=irishub --from=key-name --fee=0.4iris --amount=1iris --address-validator=iva1hguh57kwwvv56k5kw8x3ll5kna9r3js4wnz2qu

In this way just delegate 1 $Iris to the validator 8866-meleaTrust

Te 1 $Iris is under my control, I can undelegate or redelegate to other Validator at any moment. The token is under my control despite delegating it to a validator.

Sent and received $Iris tokens.

Tip: Always is the best sent one first and if works fine sent the rest, this the first time for learning curve is ok.

For received

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli keys list

Tell others to sent Iris tokens here.

But

If need sent tokens to another account. ask for the account and add to the cmd

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli bank send --amount 1iris --chain-id irishub --fee 0.4iris --from key-name --to account-here-for-send

ok, here is clear, create or recover one account, send & received tokens, delegate or undelegate to one Validator.

Time for

Creating one Validator

docker run -it -v $HOME/.iris:/root/.iris irisnet/irishub:v0.13.1 iris tendermint show-validator
#icp1zcjduepqyhfes43lm57c59hfjkv9tx5dwzdzqx6anps6exjqf78z77yw2qeq63zyvf

ask for help (-h)

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli stake create-validator -h

get the command example

then for creating the validator

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli stake create-validator --chain-id=irishub --from=<key name> --fee=0.4iris --pubkey=<tendermint-show-validator> --amount=10iris --moniker=<validator name> --commission-rate=0.1

now can see your validator in the actives slots after

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli stake validators

or see the voting power in status

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli status
# "voting_power": "101" = 101 $Iris tokens delegated to this Validator Node.

Validator list here

This others command can help for status and peers connected

curl http://localhost:26657/status
curl http://localhost:26657/net_info

Withdrawal Rewards for delegations

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli distribution withdraw-rewards --from KEY-NAME --fee 0.4iris --chain-id=irishub --trust-node

Withdrawal Rewards for Validators node

docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli distribution withdraw-rewards --from KEY-NAME --fee 0.4iris --chain-id=irishub --trust-node --is-validator

Remember play the official wallet for IrisNet

https://github.com/irisnet/irishub/blob/master/docs/get-started/Install-the-Software.md

NOTE: if the node not syncs, go to riot chat and ask for some persistent peers or any other question.

https://riot.im/app/#/room/#irisvalidators:matrix.org

Telegram

https://t.me/irisnetwork

Ahoy!

who I am?

https://meleatrust.com/iris-melea-trust-validator/

Actually

Running 3 Validators in the Iris Hub, for only 8% Commission, please delegate some $IRIS to my Validators if you consider I am a good validator for the Iris Network Blockchain.

Operator Address: iva18apxn7vzwvp5m3c4ed6lrsdvxu2fqgjvaw3l6s
Description: {StakeBank-meleaTrust}
Operator Address: iva1hguh57kwwvv56k5kw8x3ll5kna9r3js4wnz2qu
Description: {8866-meleaTrust}
Operator Address: iva1n2tmjd8lvwtfplxaz2y75w2ysh0qlmqjute5rl
Description: {BlockMachine-meleaTrust}
Only 8% Commission?

CMD for delegate to my Validators, just update the amount of Iris want to delegate and select the validator operator address

https://irisnet-overview.genesislab.net/iva18apxn7vzwvp5m3c4ed6lrsdvxu2fqgjvaw3l6s

#StakeBank-meleaTrust
docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli stake delegate --chain-id=irishub --from=key-name --fee=0.4iris --amount=1000iris --address-validator=iva18apxn7vzwvp5m3c4ed6lrsdvxu2fqgjvaw3l6s

https://irisnet-overview.genesislab.net/iva1hguh57kwwvv56k5kw8x3ll5kna9r3js4wnz2qu

#8866-meleaTrust
docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli stake delegate --chain-id=irishub --from=key-name --fee=0.4iris --amount=1000iris --address-validator=iva1hguh57kwwvv56k5kw8x3ll5kna9r3js4wnz2qu

https://irisnet-overview.genesislab.net/iva1n2tmjd8lvwtfplxaz2y75w2ysh0qlmqjute5rl

#BlockMachine-meleaTrust
docker run -it -v $HOME/.iriscli:/root/.iriscli irisnet/irishub:v0.13.1 iriscli stake delegate --chain-id=irishub --from=key-name --fee=0.4iris --amount=1000iris --address-validator=iva1n2tmjd8lvwtfplxaz2y75w2ysh0qlmqjute5rl

Please consider delegate to more validators you can and trust, for a decentralized Network.