Skip to content

Instantly share code, notes, and snippets.

@iammelea
Last active January 22, 2019 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iammelea/03fe386ed37d34dd0b1f9ac1fd24e49a to your computer and use it in GitHub Desktop.
Save iammelea/03fe386ed37d34dd0b1f9ac1fd24e49a to your computer and use it in GitHub Desktop.
#See if this version is ok for you.
docker run -v $HOME/.iriscli:/root/.iriscli meleatrust/get-irisnet:v0.10.0 iriscli version
0.10.0-rc0-9342e944-0
docker run -v $HOME/.iris:/root/.iris meleatrust/get-irisnet:v0.10.0 iris version
0.10.0-rc0-9342e944-0
#or need v0.10.2 just changed the repo in the CMD = meleatrust/irisnet:fuxi8000
v0.10.2 = meleatrust/irisnet:fuxi8000
#Example
docker run -d -p 26657:26657 -p 26656:26656 -v $HOME/.iriscli:/root/.iriscli -v $HOME/.iris:/root/.iris meleatrust/irisnet:fuxi8000 iris start
#or need v0.10.2-patch just changed the repo in the CMD = meleatrust/irisnet:irisnet:v0.10.2-patch
##Example
docker run -d -p 26657:26657 -p 26656:26656 -v $HOME/.iriscli:/root/.iriscli -v $HOME/.iris:/root/.iris meleatrust/irisnet:v0.10.2-patch iris start--replay-last-block
#Create Iris Dir
docker run -v $HOME/.iriscli:/root/.iriscli -v $HOME/.iris:/root/.iris meleatrust/get-irisnet:v0.10.0 iris init --chain-id=fuxi-8000 --moniker=meleaTrust-StakeBank
#Give permision Dir
sudo chown user:group .iris/config
sudo chown user:group .iris/data
#Recover key if you wish
docker run -it -v $HOME/.iriscli:/root/.iriscli -v $HOME/.iris:/root/.iris meleatrust/get-irisnet:v0.10.0 iriscli keys add keyname --recover
#Compare Keys
docker run -v $HOME/.iriscli:/root/.iriscli -v $HOME/.iris:/root/.iris meleatrust/get-irisnet:v0.10.0 iriscli keys list
#Remove and Download the genesis.json and config.toml
cd .iris/config
rm genesis.json
rm config.toml
wget -c 'https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-8000/config/genesis.json'
wget -c 'https://raw.githubusercontent.com/irisnet/testnets/6a6cd59ad82fbb1601da78372aa11d17f1a484e8/fuxi/fuxi-8000/config/config.toml'
#Add moniker and seeds
vi config.toml
#seed
8d16954409aeae990a6c3287ed48e24901dd97e7@13.57.172.145:26656
#Moniker name
#Start iris
docker run -p 26657:26657 -p 26656:26656 -v $HOME/.iriscli:/root/.iriscli -v $HOME/.iris:/root/.iris meleatrust/get-irisnet:v0.10.0 iris start
#For Stop Iris
CRTL+c
#start Iris detached mode if you see the blocks are coming in good way. ( can close the session and Iris is not killed.)
docker run -d -p 26657:26657 -p 26656:26656 -v $HOME/.iriscli:/root/.iriscli -v $HOME/.iris:/root/.iris meleatrust/get-irisnet:v0.10.0 iris start
#For see the Docker container running in -d mode
docker ps
#Output=
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
788d64330362 meleatrust/get-irisnet:v0.10.0 "iris start" 18 minutes ago Up 18 minutes 0.0.0.0:26656-26657->26656-26657/tcp festive_noether
#For stop or restart the Docker container
docker restart 788d64330362
docker stop CONTAINER ID
#If you want to see the status from your node, go to your favorite browser and add your ip, port and status example
http://yourip:26657/status
#Output Browser
{
"jsonrpc": "2.0",
"id": "",
"result": {
"node_info": {
"protocol_version": {
"p2p": "5",
"block": "8",
"app": "0"
},
"id": "523b3229b42f1b28a45f4fff9d6026a832a493ae",
"listen_addr": "tcp://127.0.0.1:26657",
"network": "fuxi-8000",
"version": "0.27.3",
"channels": "4020212223303800",
"moniker": "meleaTrust-StakeBank",
"other": {
"tx_index": "on",
"rpc_address": "tcp://0.0.0.0:26657"
}
},
"sync_info": {
"latest_block_hash": "45B31244B3FFC321433589D554D2BBFC4BC48AB707215B4ED068DCBBAA9AB014",
"latest_app_hash": "8A4BB5D5291D8EED767EEAF656FEE8BDCA512EAE98C176BAA037510EE9C2B53A",
"latest_block_height": "343",
"latest_block_time": "2019-01-17T04:36:32.05108998Z",
"catching_up": false
},
"validator_info": {
"address": "1180F9259B475792407B1C0FEE5FB171EABB0B37",
"pub_key": {
"type": "tendermint/PubKeyEd25519",
"value": "u90jItzCMFwnsfkcSH+kzWQfMaZM0JkLu6QAvhHaNfo="
},
"voting_power": "100"
}
}
}
#End enjoy. ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment