Deploy an XDC Public Masternode

How to Deploy an XDC Public Masternode

To deploy an XDC public masternode, the following things are required:
  1. 1.
    At least 10,000,000 XDC, to perform random DPoS consensus seamlessly.
  2. 2.
    A wallet in which to store XDC tokens.
  3. 3.
    A dedicated and stable hardware environment.
  4. 4.
    A dedicated Static Public IP address.
  5. 5.
    100% network uptime by IDC network.
  6. 6.
    Minimum tier 3+ IDC environment.
  7. 7.
    A Virtual Private Server (VPS is in fact optional, but highly recommended).
  8. 8.
    For cloud-based services, Amazon EC2’s m3.large VM size is appropriate. A similar configuration will work with the Microsoft Azure Cloud network.
The following system configuration is required:
Operating System: CentOS, RedHat Enterprise Linux (Latest release) or Ubuntu (20.04+) supported
Development: Mac OS X, Windows (64-bit) or most Linux distributions
CPU: 64 bit x86_64, 2+ cores
Disk: Minimum 300+ GB SSD recommended (500+IOPS, more is better) for database partition
RAM: 32+ GB

About XDC Masternodes

The XDC token replaces the proof-of-work (PoW) consensus algorithm with the random delegated proof-of-stake (DPoS) consensus algorithm. “Validators” thus take the place of "miners."
Within the framework of the DPoS consensus algorithm, validators are special nodes responsible for validating transactions on the network. Once validated, transactions are added to the blockchain. A transaction can either be accepted or rejected by the validator. (NOTE: there can be multiple validator nodes in a single network.)
The decisions made by validator nodes are broadcast throughout the network as messages signed (attested to) using a validated cryptographic public key. Every validator node running XDC protocol in the RCL network is responsible for deciding its Unique Node List (UNL). The UNL contains information about which regular nodes the validator cares about.
To set up a masternode, ensure that your XDC protocol-running node is publicly identified and has undergone the necessary compliance process. Every node holder must upload a KYC certificate--a notarized proof of identity, individual or corporate, and address--which will be visible to the public network.

Why Set Up a Masternode?

Masternodes make the XDC network a decentralized blockchain. Deploying a masternode is conducive to the constructed, trusted, scalable, decentralized network infrastructure. Such an environment facilitates greater stability and reliability within the network.

Functions of a Masternode

In a random, delegated proof-of-stake blockchain environment, the masternode concept is cardinal to its functioning. A masternode validates each (or every second segment of the transaction depending upon UNL) transaction and is also responsible for writing the transaction onto the truth ledger—the blockchain. As a consequence, it makes possible a decentralized governance of the network.

Masternode

  • Masternodes are full-nodes that create, verify and validate new blocks in XDC's platform.
  • mXDC: Let’s assume mXDC (mainnet-XDC) will be the native crypto on the XDC DPOS network. mXDC will be rewarded to MN owners.
  • Epoch: We can use epoch instead of hard date to distribute incentives or rewards to masternode owners (1 epoch could be the number of blocks, for example {1 Epoch = 888 Blocks}.
  • Masternode Candidate: Any account can deposit X mXDC using the official on-chain governance d-app to complete a KYC complaint to become a masternode candidate. X'nos mXDC deposit can earn staking rewards. A candidate can resign, but the mXDC tokens will remain locked for the next 30 days (Let's assume we have a new block in each 2 sec 1,296,000 blocks) after the resignation.
  • Becoming a Masternode: A candidate becomes a masternode when they belong to the top fifty most voted candidates in each epoch. A masternode can resign, but the tokens will be locked for the next 30 days after the resignation.
  • Reward: The reward a masternode receives in each epoch is proportional to the number of signatures they sign.

Restrictions on nodes that aspire to become masternodes

Nodes that possess any of the below-mentioned characteristics may not qualify to become masternodes:
  • An anonymous entity on the network.
  • Intentions to fork XDC software.
  • Entity or individual with a criminal record in the past.
  • Entity or individual which does not comply with the local law.

Incentives to set up your masternode

Setting up a masternode is useful because of the following:
  • Reputation-building within the network community
  • The trust factor enhances your node, particularly given that the network relies on your node
  • More incentive is gained as your node pushes more transactions on the network
  • A private blockchain is capable of running its own use case
Important: The maximum number of masternodes allowed in the network is 5,000.
Incentives for all validator nodes: The information required depends on the number of blocks created by the validator node (incentive in terms of XDC)
Reward Cycle: Every fifteen days.

Hands-on guide on how to setup a masternode

Two methods are used to set up the masternode:
  1. 1.
    DIY masternode environment set up
  2. 2.
    Delegate masternode set up to third party service provider

Method 1: DIY Masternode Environment Set Up

XDC Testnet

Prerequisites

Operating System: Ubuntu 16.04 64-bit or higher
Should face the Internet directly with a public IP and without NAT.
Tools: Docker, Docker Compose

Network Ports

The following network ports need to be open for the nodes to communicate:
Port
Type
Definition
8545
TCP
RPC
30303
TCP/UDP
XDC

Setup

Clone repository

1
git clone https://github.com/XDCOrg/XDC-Node.git
Copied!
Enter XDC-Node directory.
1
cd XinFin-Node
Copied!

Step 1: Install docker & docker-compose

1
sudo ./install_docker.sh
Copied!

Step 2: Update .env file

Create .env file by using the sample -.env.example
Enter your node name in the INSTANCE_NAME field.
Enter your email address in the CONTACT_DETAILS field.

Step 3: Start your Node

Run:
1
sudo docker-compose -f docker-services.yml up -d
Copied!
You can see your node listed on this page: http://xinfin.network
Your coinbase address can be found in the xdcchain/coinbase.txt file.
1
Some common errors:<br>
2
3
1. If the version is outdated, install docker-compose version 1.21+
4
2. If the ports are in use, kill the docker-container that is live on 30303 port and try again.
Copied!

Troubleshooting

If you have problems with the setup, the first step is to collect information to characterize the problem accurately. It will help you figure out a root cause and a fix.
Note: Public discussions on the technical issues, posted articles, and requests for enhancements and technical contributions are handled on: Slack Public Chat and GitHub.

Method 2: Delegate a masternode set up to third party service provider

Set up your masternode using one of the third-party masternode service providers.
DISCLAIMER: This list is provided for informational purposes only. The services listed here have not been evaluated or endorsed by XDC and no guarantees are made as to the accuracy of the information. Exercise discretion when using third-party services.
List of service providers to set up masternode:

IndSoft.net

  • IPv6 and tor Supported
  • Global geographical locations
  • Fully Managed Network
  • Network attack prevention (DDoS)
  • One time Setup Cost: Free
  • Monthly: 250 USD (pay in XDC, PayPal, debit, or credit card)
Are you a Provider?
If yes, then Contact us to list your service.

Where to operate?

In XDC, there are two networks where you can run the XDC protocol: the mainnet and the testnet.
The mainnet is used to transact real XDC. The XDC’s value is tied to real fiat currency through cryptocurrency exchanges.
As developers, you do not want to run application tests with real money. Hence, testnets are used for such purposes.

Troubleshooting

If you have problems with the setup, the first step is to collect more information to accurately characterize the problem. From there, it can be easier to figure out a root cause and a fix.
Note: For public discussions on technical issues, posted articles, and requests for enhancements and technical contributions, please visit: Slack Public Chat, Telegram Chat, and GitHub.

FAQ

1. What is a masternode?
A masternode is simply a cryptocurrency full node or computer wallet that keeps the full copy of the blockchain record in real-time.
2. What is a Validator node?
On the XDC Network, Validator nodes are full nodes that incentivize node operators to perform the core consensus functions of running a DpoS-based blockchain. Only the Validator node gets an incentive to validate the transaction.
3. How to become a Validator Node?
Under XDPoS, the XDC stakeholder node acts as the Validator node, and the rest of the nodes act as the backup node or the private node.
4. If there are no transaction fees on the network, then how does the validator receive the incentive?
The network generates additional coins to provide incentives to the validator node. The nodes depend on the network load and the number of transactions processed within the network.
5. How do I obtain XDC?
XDC is listed with more than 20 liquidity exchanges. The complete list of exchanges is available at xinfin.io, and you can purchase XDC from the open market and stake it with a masternode.
6. How do I obtain a Test XDC?
A test environment or test infrastructure is available at: http://xinfin.network (select the “Switch to Apothem.Network” menu to switch to the Apothem network). Click on "Get Test XDC" from the top menu or by clicking here. You can obtain test tokens that will help for the set up of the masternode and test web wallet, mobile wallet, or the XDC explorer within the test environment.