Developers Forum for XinFin XDC Network

Amelia Jones
Amelia Jones

Posted on

How to Setup Masternode on XDC Network? | Steps to setup XDC Network Masternode.

Masternodes are full-nodes that create, verify and validate new blocks in XDC's platform. 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.

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.

To deploy an XDC public masternode, the following things are required:

  • At least 10,000,000 XDC, to perform random DPoS consensus seamlessly.
  • A wallet in which to store XDC tokens.
  • A dedicated and stable hardware environment.
  • A dedicated Static Public IP address.
  • 100% network uptime by IDC network.
  • Minimum tier 3+ IDC environment.
  • A Virtual Private Server (VPS is in fact optional, but highly recommended).
  • 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

Important: The maximum number of masternodes allowed in the network is 5,000.

Guide to Setup Masternode on XDC Network

Method 1:- Setup XinFin’s XDC Masternode One-click Installer
To qualify for Masternode on XinFin Network, you need at least 10,000,000 XDC, for the long term.

Operating System:

Apple Mac
Windows
Linux - Ubuntu
Step 1: Download XinFin One-Click Installer (to setup Masternode) for Windows, Linux, and Mac OS and Install on your local machine.

Step 2: Now Run the One Click Installer, Make sure you read the Terms properly then click on I Agree button.

  • "C:\Program Files\XinFin-Network" this will be your destination folder and this "C:\Users...\AppData\Roaming\XDCChain" will contain your Keystore folder.
  • Make sure, you create a backup of your Keystore folder.
  • Now click on "XinFin Network" One click installer.
  • You can see the address of One Click Instaaler in left side, Also you can change the Network.
  • For changing the Network, click on "Develop" then select "Network" (XinFin - Main Network/ XinFin Apothem Network)
  • You can check the Node status under the stats.xinfin.network.

https://user-images.githubusercontent.com/92325549/137081568-f1c99c1f-b035-4ef1-8576-04e327056064.mp4

Step 3: Create a wallet for Masternode

  • Create your wallet address with Mnemonic Phrase or with Keystore. We always recommend to use Keystore for running a Masternode.
  • Enter a strong password while creating the wallet.
  • Don't lose your Keystore file
  • Don't share it with anyone
  • Always take a backup of your Keystore file.
  • If you lose it, all your funds will get locked.
  • After creating backup, Download your Keystore file.
  • Now Access your wallet with Keystore and enter a valid password properly to access your wallet.
  • If you are hosting a Masternode on Testnet then copy the Wallet address and paste it on XDC Faucet for the Testnet XDC.

Step 4: Host your Masternode

  • For hosting the Masternode, you need to copy the private key and login the Masternode.
  • For uploading the KYC, click on the "Become a Masternode"
  • Check the KYC criteria, the KYC file should be in pdf format only.
  • Once you upload your KYC, you need to enter the "Coinbase Address" which is in One Click Installer after that click on Apply button.
  • Now you will be notify with sucessful toaster i.e "You have successfully applied for Masternode"
  • You can check all the status regarding your Masternode here: master.apothem.network.

Method 1 Ends here

Method 2 :- Setup XinFin Masternode Bootstrap Script

For Mainnet

Bootstrap Command XinFin Node Setup:-

sudo su -c "bash <(wget -qO- https://raw.githubusercontent.com/XinFinOrg/XinFin-Node/master/setup/bootstrap.sh)" root
Enter fullscreen mode Exit fullscreen mode

Examples:-

$ sudo su -c "bash <(wget -qO- https://raw.githubusercontent.com/XinFinOrg/XinFin-Node/master/setup/bootstrap.sh)" root
[sudo] password for user: 
Please enter your XinFin Network (mainnet/testnet/devnet) :- mainnet
Your running network is mainnet
Please enter your XinFin MasterNode Name :- Demo_Server 
Your Masternode Name is Demo_Server

Enter fullscreen mode Exit fullscreen mode

For Testnet

sudo su -c "bash <(wget -qO- https://raw.githubusercontent.com/XinFinOrg/XinFin-Node/master/setup/bootstrap.sh)" root
Please enter your XinFin Network (mainnet/testnet/devnet) :- testnet
Your running network is testnet
Please enter your XinFin MasterNode Name :- test01
Your Masternode Name is test01
Enter fullscreen mode Exit fullscreen mode

For Devnet

sudo su -c "bash <(wget -qO- https://raw.githubusercontent.com/XinFinOrg/XinFin-Node/master/setup/bootstrap.sh)" root
Please enter your XinFin Network (mainnet/testnet/devnet) :- devnet
Your running network is devnet
Please enter your XinFin MasterNode Name :- test01
Your Masternode Name is test01
Enter fullscreen mode Exit fullscreen mode

Method 2 Ends here

Method 3:- Setup XinFin Masternode Docker

Operating System: Ubuntu 20.04 64-bit or higher

Should be facing internet directly with public IP & without NAT

Tools: Docker, Docker Compose(1.27.4+)

Setup (For Ubuntu 20.04 64-bit or higher Operating System)

Clone repository

git clone https://github.com/XinFinOrg/XinFin-Node.git
Enter fullscreen mode Exit fullscreen mode

Enter XinFin-Node directory

cd XinFin-Node
Enter fullscreen mode Exit fullscreen mode

Step 1: Install docker & docker-compose sudo ./setup/install_docker.sh

Step 2: Update .env file with details Create .env file by using the sample - .env.example

Enter either your company or product name in the INSTANCE_NAME field.

Enter your email address in CONTACT_DETAILS field.

cd mainnet # testnet
cp env.example .env
nano .env
Enter fullscreen mode Exit fullscreen mode

Step 3: Start your Node

For Mainnet

Run:

cd testnet
sudo docker-compose -f apothem-network.yml up -d
Enter fullscreen mode Exit fullscreen mode

You should be able to see your node listed on the [Apothem Network] page. Select "Switch to LiveNet" to check LiveNetwork Stats and Select "Switch to TestNet" for TestNetwork.

Your coinbase address can be found in xdcchain/coinbase.txt file.

To stop the node or if you encounter any issues use:

cd testnet
sudo docker-compose -f apothem-network.yml down
Enter fullscreen mode Exit fullscreen mode

Method 3 Ends here

Discussion (0)