Skip to content

Commit

Permalink
Merge pull request #628 from kidinamoto01/feature/docs
Browse files Browse the repository at this point in the history
IRISHUB-679:Add resources & get started
  • Loading branch information
HaoyangLiu authored Nov 17, 2018
2 parents d38f6b4 + 1011bb9 commit 97cd807
Show file tree
Hide file tree
Showing 20 changed files with 1,166 additions and 75 deletions.
9 changes: 6 additions & 3 deletions docs/get-started/Download-Rainbow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# IRISnet Testnet Codename Fuxi
# IRISnet Mobile Client: Rainbow

## What is IRISnet
## What is Raibow

IRIS network (a.k.a. IRISnet) is named after Greek goddess **Iris**, said to be the personification of the rainbow and the faithful messenger between heaven and humanity. IRIS network aims to build the foundation which facilitates construction of distributed business applications. IRIS hub will provide iServices, which allow resources such as data service and computing services being invoked across blockchains. To know more about IRISnet, please read this blog.
First IRISnet mobile client that supports cross-chain
multi-asset transfers and iServices consumption

https://www.rainbow.one
85 changes: 85 additions & 0 deletions docs/get-started/Full-Node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Setup A Full-node

Before setting up your validator node, make sure you already had **Iris** installed by following this [guide](Install-Iris.md)

## Init Your Node

These instructions are for setting up a brand new full node from scratch.

First, initialize the node and create the necessary config files:

```
iris init --name=<your_custom_name> --home=$IRISHOME
```
> Note: Only ASCII characters are supported for the `--name`. Using Unicode characters will render your node unreachable.
The default \$IRISHOME is `~/.iris` , You can edit this `name` later, in the `~/.iris/config/config.toml` file:
Your full node has been initialized!
## Get Configuration Files
After intializing your node, please download the genesis file and the config file to join in the testnet.
```
cd $IRISHOME/config/
rm genesis.json
rm config.toml
wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-4000/config/config.toml
wget https://raw.githubusercontent.com/irisnet/testnets/master/fuxi/fuxi-4000/config/genesis.json
```
## Edit Your Config File
You could customized the `moniker` and `external_address` fields.
```
# A custom human readable name for this node
moniker = "<your_custom_name>"
external_address = "your-public-IP:26656"
```
Optional:
Set `addr_book_strict` to `false` to make peering more easily.
```
addr_book_strict = false
```
### Add Seed Nodes
Your node needs to know how to find more peers. You'll need to add healthy seed nodes to `$IRISHOME/config/config.toml`. Here are some seed nodes you can use:
```
[email protected]:26656
[email protected]:26656
```
Meanwhile, you could add some known full node as `Persistent Peer`. Your node could connect to `sentry node` as `persistent peers`.
### Enable Port
You will need to set `26656` port to get connected with other peers and `26657` to query information of Tendermint.
## Run a Full Node
Start the full node with this command:
```
iris start --home=$IRISHOME > iris.log
```
Check that everything is running smoothly:
```
iriscli status
```
You could see the following
```
{"node_info":{"id":"1c40d19d695721fc3e3ce44cbc3f446f038b36e4","listen_addr":"172.31.0.190:46656","network":"iris-stage-4","version":"0.22.6","channels":"4020212223303800","moniker":"name","other":["amino_version=0.10.1","p2p_version=0.5.0","consensus_version=v1/0.2.2","rpc_version=0.7.0/3","tx_index=on","rpc_addr=tcp://0.0.0.0:46657"]},"sync_info":{"latest_block_hash":"41117D8CB54FA54EFD8DEAD81D6D83BDCE0E63AC","latest_app_hash":"95D82B8AC8B64C4CD6F85C1D91F999C2D1DA4F0A","latest_block_height":"1517","latest_block_time":"2018-09-07T05:44:27.810641328Z","catching_up":false},"validator_info":{"address":"3FCCECF1A27A9CEBD394F3A0C5253ADAA8392EB7","pub_key":{"type":"tendermint/PubKeyEd25519","value":"wZp1blOEwJu4UuqbEmivzjUMO1UwUK4C0jRH96HhV90="},"voting_power":"100"}}
```
If you see the `catching_up` is `false`, it means your node is fully synced with the network, otherwise your node is still downloading blocks. Once fully synced, you could upgrade your node to a validator node. The instructions is in [here](Validator-Node.md).
89 changes: 89 additions & 0 deletions docs/get-started/Genesis-Generation-Process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# How To Participate in Genesis Process

## Requirements

You must have follow this [guide](Install-Iris.md) to install the correct version of **Iris**.

## Gentx

Please run the `keys add` subcommand and run the `gen-tx` subcommand to generate files.
```
iriscli keys add your_name
iris gentx --name=your_name --home=<path_to_home> --ip=Your_public_IP
```
For example,
```
iriscli keys add alice
iris gentx --name=alice --home=iris --chain-id=irishub-stage --ip=1.1.1.1
```
There will be a gentx-node-ID.json a file at `$IRISHOME/config/gentx/`.
The content of the file will be:
```
{
"type": "auth/StdTx",
"value": {
"msg": [
{
"type": "cosmos-sdk/MsgCreateValidator",
"value": {
"Description": {
"moniker": "chenggedexiaokeai.local",
"identity": "",
"website": "",
"details": ""
},
"Commission": {
"rate": "0.1000000000",
"max_rate": "0.2000000000",
"max_change_rate": "0.0100000000"
},
"delegator_address": "faa1cf25tf4pfjdhkzx8lqnkajlse6jcpm2fyw4yme",
"validator_address": "fva1cf25tf4pfjdhkzx8lqnkajlse6jcpm2f3lltx7",
"pubkey": {
"type": "tendermint/PubKeyEd25519",
"value": "/JvLFsvyMgm2ND4QgN4JKyLxhL42dVgat67383Q+mPY="
},
"delegation": {
"denom": "iris-atto",
"amount": "100000000000000000000"
}
}
}
],
"fee": {
"amount": null,
"gas": "200000"
},
"signatures": [
{
"pub_key": {
"type": "tendermint/PubKeySecp256k1",
"value": "AtfNRj0zYvffAQG+iad6SScfdl29ag9G3EI0JDSwKJmy"
},
"signature": "BwTejBceK4M+3LzmNl62jVFUr9wVv//UO7iI/yWi5KFoez9eY43HSlaZJf+3rnKLjosn2tD79EIw55BJ6SbYzQ==",
"account_number": "0",
"sequence": "0"
}
],
"memo": "[email protected]:26656"
}
}
```
This is the `CreateValidator` message.
validator is generated by \$IRISHOME/config/priv_validator.json
## Submit Gentx
Submit your `gentx-<node-id>.json` to `https://github.com/irisnet/testnets/tree/master/fuxi/fuxi-4000/config/gen-tx/` by createing a pull request.

After the team has collected all the gen-tx transactions, we will publish the genesis file in the following folder: `https://github.com/irisnet/testnets/tree/master/testnets/fuxi-3001/config/`

You could then download the final genesis file and start a node.

124 changes: 123 additions & 1 deletion docs/get-started/Install-the-Software.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,124 @@
# IRISnet Testnet Codename Fuxi
# Install Iris

### Step 1: Configure Your Server

All the blockchains in IRISnet is based on Cosmos-SDK, which is a framework for building blockchain applications in Golang. It is being used to build [Cosmos Hub](https://cosmos.network/). It's recommended to run a validator node on Linux server.

**Recommanded Configurations:**

1. 2 CPU
2. Memory: 4GB
3. Disk: 60GB SSD
4. OS: Ubuntu 16.04 LTS
5. Allow all incoming connections on TCP port 26656 and 26657

### Step 2: Install Iris

There are two ways to get Iris running on your server. You can download the binary files from our release pages, or you can download the source code and compile it locally.

#### Download Binary Directly

Go to the download page:

https://github.com/irisnet/irishub/releases/

then get the release v0.6.0 on your computer.
`unzip -C /usr/local/bin iris$VERSION.$OS-$ARCH.zip` to `/usr/local/bin/ `

You can verify you have the right version installed by running the following commands:

```
$ iris version
v0.6.0
$ iriscli version
v0.6.0
```
#### Compile Source Code
- Install Go 1.10+
```
$ sudo add-apt-repository ppa:gophers/archive
$ sudo apt-get update
$ sudo apt-get install golang-1.10-go
```
> Note that golang-1.10-go puts binaries in /usr/lib/go-1.10/bin. If you want them on your PATH, you need to make that change yourself.
Using snaps also works quite well:
```
This will give you the latest version of go
$ sudo snap install --classic go
```
> A restart is required for the command to be recognized.
Then you need to verify the versions of Go:
```
$ go version
go version go1.10.3 darwin/amd64
```
Then, you need to add `GOPATH` to system `PATH` , then your system could correctly compile the code.
Open your `.profile` in your home directory. Add the following lines at the end of file:
```
GOPATH=$HOME/go
PATH=$GOPATH/bin:$PATH
```
Save the file and exit the editor. Then run the following to make your bash reload your profile configurations.
```
$ source $HOME/.profile
```
Now you should see something like this if you echo your\$GOPATH and \$PATH variables
```
$ echo $GOPATH
/home/iris/go
$ echo $PATH
/home/isir/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```
- Get the code and compile Iris
After setup Go correctly, you should be able to compile and run **Iris**.
Make sure that you can access to google.com for that our project used some libraries provided by google.
```
mkdir -p $GOPATH/src/github.com/irisnet
cd $GOPATH/src/github.com/irisnet
git clone https://github.com/irisnet/irishub
cd irishub && git checkout v0.6.0
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
make get_tools && get_vendor_deps && make install
```
If your environment variables have set up correctly, you should not get any errors by running the above commands.
Now check your **Iris** version.
```
$ iris version
v0.6.0
$ iriscli version
v0.6.0
```
### How to Update
Get latest code (you can also `git fetch` only the version desired), ensure the dependencies are up to date, then recompile.
```
cd $GOPATH/src/github.com/irisnet/irishub
git fetch -a origin
rm Gopkg.lock
git checkout v0.6.0
make get_vendor_deps
make install
```
50 changes: 47 additions & 3 deletions docs/get-started/Join-the-Testnet.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# IRISnet Testnet Codename Fuxi
IRISnet Testnet Codename Fuxi

## What is IRISnet
What is IRISnet

IRIS network (a.k.a. IRISnet) is named after Greek goddess **Iris**, said to be the personification of the rainbow and the faithful messenger between heaven and humanity. IRIS network aims to build the foundation which facilitates construction of distributed business applications. IRIS hub will provide iServices, which allow resources such as data service and computing services being invoked across blockchains. To know more about IRISnet, please read this blog.
IRIS network (a.k.a. IRISnet) is named after Greek goddess Iris, said to be the personification of the rainbow and the faithful messenger between heaven and humanity. IRIS network aims to build the foundation which facilitates construction of distributed business applications. IRIS hub will provide iServices, which allow resources such as data service and computing services being invoked across blockchains. To know more about IRISnet, please read this blog.

How to Join Fuxi Testnet

Step 1: Install Iris on Your Server

Please follow this instruction to get Iris installed locally.

Step 2: Run a Full Node

Please follow this instruction to get your full node running.

Step 3: Upgrade to Validator Node

Please follow this instruction to upgrade your full node to validator node.

Deploy IRISHub Monitor

Please follow this guide to get IRIHub monitor running on your side.

Upgrade to Validator Node

You now have an active full node. What's the next step?

If you have participated in the genesis file generation process, you should be a validator once you are fully synced.

If you miss the genesis file generation process, you can still upgrade your full node to become a IRISnet Validator. The top 100 validators have the ability to propose new blocks to the IRIS Hub. Continue onto the Validator Setup.

Setup a sentry node

A validator is under the risk of being attacked. You could follow this guide to setup a sentry node to protect yourself.

Fuxi Incentivized Testnet

IRIS foundation plans to reward all the testnet participants who took part in the testnet. In Fuxi-3001 testnet,the community members have finished the tasks and they will receive their rewards in genesis allocation.

- Task List for Fuxi-3001https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-3001/README.md
- Resultshttps://github.com/irisnet/testnets/issues/125
To get more people involved, IRIS foundation decides to send out more tasks in the latest iteration of testnet:Fuxi-4001.
- Task List for Fuxi-4000: https://github.com/irisnet/testnets/blob/master/fuxi/fuxi-4000/README.md

Useful Links

- Riot chat: #irisvalidators:matrix.org
- Explorer: https://testnet.irisplorer.io/#/home
Loading

0 comments on commit 97cd807

Please sign in to comment.