Xnode Setup Guide in 7 simple steps.

GravityCoin
7 min readSep 16, 2018

--

Nodes are computers that host a full copy of GravityCoin’s blockchain and help to verify the validity of transactions. Xnodes are a special type of node that earn part of GravityCoin’s block reward (currently at 0.7 GXX of the 2 GXX block reward) in return for hosting a reliable and powerful node that helps to support the network. Xnodes require a refundable collateral of 2000 GXX to ensure Xnode holders have a stake in the coin and are incentivized to keep it working honestly, updated often and have a high uptime.

DISCLAIMER: This guide assumes a basic knowledge of PuTTy (or Terminal) and Linux and level of comfort in dealing with command line commands. We are not responsible for any loss for using this guide without the pre-requisite knowledge. If you have any doubts then please do not use this guide and instead consult with one of the listed Xnode providers.

List of Xnode Providers

These providers have informed us that they are offering GravityCoin Xnode hosting services. These are recommended if you don’t have the technical expertise to follow these instructions. We do not endorse or recommend any particular Xnode provider and none of these are affiliated with GravityCoin in anyway.

You should only need to provide your address that you deposited your GXX in or the transaction ID. Some providers may ask for the key you generated with xnode genkey (either way is okay). You should NEVER need to deposit 2000 GXX to them or to an address outside your PC/mac wallet or to give any of your private keys (that is obtained via the command: dumpprivkey). We will delist providers that are reported as scams or have acted irresponsibly but hold no responsibility for having them listed in this list as it is impossible for us to police.

Here’s an alphabetical list:

Getting Started

Whether you are hosting with a Xnode provider or doing it on your own, ensure you have the latest GravityCoin wallet and you have already obtained your 2000 GXX (preferably just a bit more to cover fees when you’re transferring around). You also need a VPS (Linux, Ubuntu 16.04 recommended) with a static IP-address.

Step 1: Encrypt and Backup your wallet

If you haven’t done so already, make sure you encrypt your wallet!

Navigate to Settings > Encrypt Wallet

After you have encrypted it, it is also recommended to do a backup via File > Backup Wallet. It is recommended to store this wallet on a separate physical drive or pen drive. The wallet.dat is encrypted so even if the wallet.dat is exposed, if your password is long enough, it will be secure.

Note: Please don’t forget your passphrase/password! No one can help you if you lose your passphrase/password.

Step 2: Generate an Xnode key and deposit your 2000 GXX

Although it isn’t a good idea to leak out your Xnode key, even if this information is out, your 2000 GXX is safe. If a third party gets hold of this Xnode key, all they can do is start/stop your Xnode. This key is just a “digital handshake” between your PC/mac wallet and the VPS wallet.

Your deposit address is where you will be depositing your 2000 GXX.

Click on Help > Debug Window > Console and enter in the following commands.

xnode genkey

This generates the Xnode key. Copy it into Notepad or a txt file (This is your private key).

getaccountaddress XN1

This generates the Xnode deposit address for your 2000 GXX. Copy it into the same Notepad or txt file. If you have multiple Xnodes, you can also create additional addresses and unique Xnode keys for each of them.

Send EXACTLY 2000 GXX into the Xnode deposit address that you just created in one single transaction. That means, don’t send 1500 and then another 500! It has to be in one single transaction! Do not tick subtract fee from amount!

Note: It is not recommended to send it direct from an exchange as they might deduct certain withdrawal fees resulting in less than 2000 GXX in that transfer.

You will now need to wait for 6 confirmations for this transaction to be valid as your Xnode deposit. You can proceed with the other steps in the meantime!

Step 3: Create an xnode.conf file on your own PC/Mac

We now need to find out the transaction id and index of your Xnode deposit. Click on Help > Debug Window > Console and enter in the following command.

xnode outputs

The first portion is your Transaction ID and the second number (typically 0 or 1) is the Index.

Now open the xnode.conf file in your GravityCoin data directory Notepad or a similair program.

The data directory is located at:

(Windows) -> C:\Users\Username\AppData\Roaming\GravityCoin
(Mac) -> /Users/Username/Library/Application Support/GravityCoin
(Unix) -> /.GravityCoin

Enter in the following format in your xnode.conf file.

LABEL IP:29100 XNODEPRIVKEY TXID INDEX​
  • LABEL: Any name that you want to call your Xnode in one word. For e.g. XN1
  • IP: Your Xnode VPS IP and port 29100
  • XNODEPRIVKEY: This is the xnode key that you obtained from xnode genkey
  • TXID: This is the Transaction ID for the transaction in which you got your 2000 GXX deposited which you obtained just now through the xnode outputscommand.
  • INDEX: This is the Index of your transaction which you obtained just now through the xnode outputscommand.

To make things more clear, let’s show a made up example of how an xnode.conf would look like.

XN1 123.123.123.123:29100 83vTiq4PiEqjCDyRg2Hd5a3fpYKZpgvvQ96MoN4C1D1zxALCo12 d6fd38868bb8f9958e34d5155437d009b72dfd33fc28874c87fd42e51c0f74fdb 0

Once you have entered the necessary details, save your xnode.conf. Restart your GravityCoin wallet so it would take the new settings.

Step 4: Get a VPS

There are many providers online to choose out there. Select a VPS package that meets the minimum requirements:

  • Ubuntu 16.04 64-bit
  • 1 Core
  • 2GB of RAM
  • 20+ GB of disk space
  • Static IP

Note: Remember reliability is more important than price. If your Xnode goes offline, you will potentially miss out on payouts which would be more than your VPS cost.

Once it is done, the VPS provider should give you a username (usually root) and a password. Use a SSH client like PuTTy, Terminal or if the VPS provider provides it, open up a console window.

Step 5: Configuring your VPS

Login to your VPS with ssh and enter your password

ssh root@123.123.123.123

We are installing UFW (uncomplicated firewall) to further secure your server. This is optional but highly recommended.

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install ufw

The next steps opens port 29100 which is required for your Xnode to communicate.

sudo ufw allow ssh/tcp
sudo ufw allow 29100/tcp
sudo ufw default allow outgoing
sudo ufw enable

You now have a firewall setup!

Step 6: Installing GravityCoin in your VPS

You will have to type the following instructions exactly as follows. These instructions will install the wallet and chainfiles to the server and set up the Xnode configuration.

mkdir .GravityCoin
cd .GravityCoin
sudo apt-get install unzip
wget https://github.com/hexxcointakeover/hexxcoin/releases/download/chain/chainfiles.zipunzip chainfiles.zip
rm chainfiles.zip
cd
wget https://github.com/GravityCoinOfficial/GravityCoin/releases/download/4.0.5.0/linux-x64.tar.gztar -xvzf linux-x64.tar.gz
rm linux-x64.tar.gz

Note: Make sure you are downloading the most recent chainfiles and wallet. You can check on github to see what’s the latest version available and download it. Also make sure you’re putting the address correctly as it is long and chances of a typo are high. Make sure there is actual downloading happening and it takes time to load.

nano ~/.GravityCoin/GravityCoin.conf

This will create and open a new text file called GravityCoin.conf in a text editor called nano.

In that new file type the following and change the bolded parts to match your actual details. The rpc username and password can be anything you wish (try to make it a bit longer for security).

rpcuser=ANYUSERNAME
rpcpassword=ANYPASSWORD
rpcallowip=127.0.0.1
listen=1
server=1
xnode=1
daemon=1
maxconnections=16
externalip=YOURIP:29100
xnodeprivkey=XNODEPRIVKEY

Press Ctrl-X to save and press Y to confirm it, then press enter.

Type the following command to start your GravityCoind daemon and let it sync this will take a few minutes.

./GravityCoind -daemon

You can always check the status of syncing by typing:

./GravityCoin-cli getinfo

To check the status of your Xnode type:

./GravityCoin-cli xnode status

Check how far the block number has gone in relation to our Block Explorer. Once it has synced, it’s now time to start your Xnode!

Step 7: Start your Xnode

Now let’s go back to your local PC/Mac wallet (not the Xnode). Hopefully you will have already gotten 6 confirmations. If not, wait a bit more!

Note: Remember if you haven’t restarted your local wallet after creating xnode.conf, please restart your wallet.

Once it’s up again go to your Xnodes tab. If you have done it correctly, it should show your Xnode on the My Xnodes tab. Click Start-Missing which starts your Xnode that is listed in your xnode.conf.

Your Xnode should show PRE_ENABLED status now and after about 20 minutes or 10 blocks, should transition to ENABLED. If it transitions to NEW_START_REQUIRED or EXPIRED, there might be something wrong with your setup, double check again.

If you did all Steps exactly like we explained in this guide you should now have a fully working Xnode. Let the rewards start coming in!

Note: If you’d like to set more than one Xnode, repeat all steps and deploy a new server. The file xnode.conf should have two lines each for each node. Also call the second node XN2.

--

--

GravityCoin

GravityCoin is a multifunctional cryptocurrency with a developing ecosystem consisting of DEX, applications, and multiple-blockchain interactions.