Skip to content

Master Node Installation

George Goognin edited this page Nov 29, 2018 · 12 revisions

OS Supported

  • Linux Centos 7.x

Minimum System Requirements

  • 2 GB RAM
  • 1 CPU core
  • 60GB HDD

Recommended System Requirements

  • 8 GB RAM
  • 8 CPU cores
  • 512GB SDD

Download rpm file

$ wget https://github.com/mile-core/mile-files/blob/master/mile-0.4x-46.x86_64.rpm

Download testnet genesis block

$ wget https://github.com/mile-core/mile-files/blob/master/genesis_block_testnet.txt

Note: Mainnet Genesis block is already included in rpm package above

Installation from RPM

$ rpm -ivh mile-0.4x-46.x86_64.rpm # install binaries 
$ rpm -qi mile # check installations

Uninstall mile package

$ rpm -e mile

Update from RPM

$ rpm -Uvh mile-0.4x-46.x86_64.rpm

Install from public YUM repo on Centos7

Add yum repo

$ touch /etc/yum.repos.d/fury.repo
$ vi /etc/yum.repos.d/fury.repo 

Copy and paste to fury.repo file

[fury]
name=Gemfury Private Repo
baseurl=https://1msGLroi1G7veHqDMMUk@yum.fury.io/mileunity/ 
enabled=1 
gpgcheck=0

Run yum install

$ yum install mile

Download and compile cli wallet to manage your wallet and node wallet state

$ ./mile_cli_wallet --help
Allowed options:
  --help                                produce help message
  --debug                               print debug messages
  -w [ --wallet ] arg                   create wallet from random (-w "random")
                                        or secret phrase
  -u [ --url ] arg (=http://lotus000.testnet.mile.global/v1/api)
                                        RPC url
  -m [ --method ] arg                   blockchain command
  -p [ --params ] arg (={})             blockchain params
  -r [ --reconnections ] arg (=3)       try to connect again reconnection times
                                        if any connection error occurred

Methods: 
	get-blockchain-info 
	get-blockchain-state 
	get-network-state 
	get-nodes 
	get-current-block-id 
	get-block --params '{"id":1}'
	get-wallet-state --params '{"public-key": "...bHqSm8WTuY3gB9UXD..."}' 
	get-wallet-transactions --params '{"public-key": "...bHqSm8WTuY3gB9UXD..."}' 
	send-transfer --params '{"private-key": "...bHqSm8WTuY3gB9UXD...", "to":"...pXg1MF4qxZTEsL..", "amount": "100", "asset-code":0, "description":"send my money back!"}' 
	send-emission --params '{"private-key": "...bHqSm8WTuY3gB9UXD...", "asset-code":0}'
	register-node --params '{"private-key": "...bHqSm8WTuY3gB9UXD....", "amount": 10000.00, "address": "xxx.yyy.zzz.www"}'
	unregister-node --params '{"private-key": "...bHqSm8WTuY3gB9UXD...."}'
	vote-for-rate -p '{"private-key": "...bHqSm8WTuY3gB9UXD....", "amount": 1.21}'

Register Master Node

To start XDR minting on your wallet you must create .wallet file with private and public key.

Create wallet file contains private and public keys

$ mile_cli_wallet -o -w random > ./<name-of-your-wallet>.wallet

Then copy this file on node host

$ scp ./node.wallet root@<your.node.address>:/etc/mile/wallets/

The minimum deposit amount on the wallet should be at least 10.000 XDR.

Make an emission center

To issue the XDRs you have to have some MILE coins. You can buy MILE at the open market. Also you can manage transfers with MILE Wallet. Then you should make emission of XDR (lock MILE) with amount what you intend to lock on your node. $ mile_cli_wallet -u https://lotus000.i.mile.global/v1/api -m send-emission -p '{"private-key": "the private key of your node wallet", "asset-code":10000}'

Check the wallet state

$ mile_cli_wallet -u https://lotus000.i.mile.global/v1/api -m get-wallet-state -p '{"public-key": "the public key of your node wallet"}' 

Also you can check the wallet state on MILE Wallet or Mile Explorer. Transaction can be rejected by blockchain. The current version of the cli wallet does not support transaction completions, so if state of your node wallet is not changed during next 3 blocks you should repeat this operation.

Register Master Node Completion

$ ./mile_cli_wallet -u https://lotus000.i.mile.global/v1/api -m register-node -p '{"private-key": "the private key of your node wallet", "amount": 10000, "address":"your.node.ip.address"}'

Then you should check your node wallet state to make sure your node is still a Master Node of MILE blockchain.

Checking Node state

$ mile_cli_wallet -u https://lotus000.i.mile.global/v1/api -m get-wallet-state -p '{"public-key": "the public key of your node wallet"}' 

Response looks like this:

{"address":"your.node.ip.address","balance":[{"amount":"....","code":"0"},{"amount":".....","code":"1"}],"exist":"1","preferred-transaction-id":"981444529","tags":["Node"]}, where tags must contain "Node" world.

Safe trip!

Clone this wiki locally