This is a guide for those who want to establish several Giant masternodes on a single server to manage them more efficiently. Please note that this guide is for Ubuntu LTS 16.04 users.
The Giant environment supports IPv6 - the latest version of the Internet Protocol. Since it only became an Internet Standard in 2017, it is still somewhat of a frontier technology, which is the primary reason why older cryptocurrencies like DASH do not support it. While most Internet service providers (ISP) support both IPv4 and IPv6, some may not. The management method described in the following guide will only work if your ISP supports IPv6.
It is vital that you check to make sure your ISP allows IPv6 connections before you begin the installation processes described below. To do this, open up your computer’s command line interface (CLI) and input the command below that corresponds with your operating system.
Windows: ping -6 google.comMac: ping6 -I en0 IPADDRESS Linux: ping6 google.com
As long as you see one of the following results, or something similar, your ISP supports the IPv6 standard:
$ ping6 google.comPING google.com(fra16s18-in-x0e.1e100.net) 56 data bytes 64 bytes from fra16s18-in-x0e.1e100.net: icmpseq=1 ttl=57 time=4.85 ms
Pinging google.com [220.127.116.11] with 32 bytes of data:Reply from 18.104.22.168: bytes=32 time=11ms TTL=54 Reply from 22.214.171.124: bytes=32 time=11ms TTL=54 Reply from 126.96.36.199: bytes=32 time=9ms TTL=54 Reply from 188.8.131.52: bytes=32 time=13ms TTL=54
If you see a result with the term “Network is unreachable” or “Could not find host”, as shown below, this means that your ISP does not support IPv6.
$ ping6 google.comconnect: Network is unreachable
Ping request could not find host google.com
It has come to our attention that on Mac devices, this command sometimes does not work as intended. In that case, please, use the utility program ifconfig.
You may be able to contact your ISP via one of their support channels and ask about activating IPv6. If this is not possible, you can use a remote Virtual Private Server (VPS) that supports IPv6. As a last resort, you can also choose to switch to another ISP that does support the IPv6 Internet Standard.
If you will be using a VPS to host your masternode, you must also check for IPv6 support there. You can do so by following the same method described above. Only this time you will be entering the command into your VPS CLI. Do not move on to the next step until you have checked both your ISP and VPS for IPv6 support.
Input the following script, which can also be found on our GitHub page, into your VPS command line interface:
git clone https://github.com/GiantPay/MasternodeVPS && cd MasternodeVPS
It allows you to install multiple masternodes at one time. If you plan on running more masternodes in the future, it can be helpful to create the additional masternodes during this initial setup process, and only configure the ones you plan on activating now. You can then configure each of the masternodes you add in the future when you are ready to activate them. This will save you time when you adding new masternodes at a later date.
As mentioned in the documents, “a single interface may also have multiple IPv6 addresses of any type (unicast, anycast, and multicast) or scope". In practice this means that you can create 100+ masternodes on a single IPv6 interface, as long as your server’s CPU can support the load. For example, let’s see how to install 5 masternodes:
./install.sh -p gic -c 5 -n 6
-n 6 forces the installation to use IPv6 protocol. Also when using –n 6 there is no need to edit the IP address inside the config file as it will be filled automatically by the VPS IP.
This script is going to use the most recent stable version from our repository, assemble it on your server, and create several masternodes - in this case 5. After the installation procedure is complete, there will be multiple new additions on your server.
5 structures named gic_n1, gic_n2, …, gic_n5. Regular Ubuntu tools can be used to manage them, for example:· systemctl status gicn1 - see the status of the 1st masternode · systemctl start gicn2 - launch the 2nd masternode · systemctl stop gicn5 - stop the 5th masternode
Masternode configuration files in /etc/masternodes folder are named in reference to the server names:· /etc/masternodes/gic_n1.conf · /etc/masternodes/gic_n2.conf · /etc/masternodes/gic_n5.conf
Masternode folders (the blockchain data of each masternode is stored separately):· /var/lib/masternodes/gic_n1 · /var/lib/masternodes/gic_n2 · /var/lib/masternodes/gic_n5
GiantD and Giant-CLI executable files in /usr/local/bin
At this point, we have installed the masternodes on our server. Now we must also configure them. To do so, we must first generate a private key. To generate a private key, open up your local wallet and go to Tools, then click on Debug console. Enter the following command into the debug console CLI:
After generating a unique key, you must copy it and insert it into the configuration file of your node of choice.
Example. Bob wants to generate a private key for the 5th masternode. After using the masternode genkey command, he should then copy the key and insert it in the /etc/masternodes/gic_n5.conf folder in the following field:
To edit the conf file, type “sudo nano /etc/masternodes/gic_n1.conf” (without quotes) for masternode 1. To edit the others, just change the number gic_n1.conf with the desired masternode like gic_n2.conf or gic_n3.conf etc.
OK, that was fast! Now the only thing remaining is to launch the masternode service and connect it to your local wallet. Begin by typing the following command in your server’s CLI.
systemctl start gicn1
The last number correlates to the node you want to launch. For example:
systemctl start gicn4 (will start node number 4) systemctl start gicn5 (will start node number 5)
Do this for every node you want to launch.
To connect it to your Giant wallet, launch the Giant wallet program on your computer. Open the Masternodes section and activate it in the same method as used during the usual single masternode VPS installation process. You can go to Section 4 (‘Activate Masternode’) in this document for more details on how to do this.
Congratulations, you have installed a masternode on a VPS server yet you have room for a 49 more!
In case you already have installed some masternode to a separate VPS, you must start a new VPS and you can keep your existing private keys, but it is necessary to rebuild index inside your wallet in debug mode. Before starting your masternodes in the wallet, don’t forget the command masternode start-alias "your mnname" (e.g masternode start-alias mn1) in the debug console.
Call Giant-CLI for a masternode
You can call Giant-CLI for a certain masternode by using this simple command (in this case, for the first node, insert the required number if you need a different one):
$ giant-cli -conf=/etc/masternodes/gic_n1.conf getinfo
You can perform operations on several masternodes at the same time in bash. For example, here is a script that stops all masternodes:
>#!/bin/bash counter=1 while [ $counter -le 50 ] do echo $counter systemctl stop gicn$counter ((counter++)) done