Masternode

From DeFiChain-Wiki

Defichain Masternode

In January 2021, the Masternode- and Stakeholders decide in DFI Proposal #4 to reduce the Collateral for one Masternode to 20000 DFI.

At March 1, 2021, the Hardfork named DAKOTA was implemented in Block 678000 and reduce the Collateral.


Now it is time for the Holders of DFI, to make the network more stable, let decentralization grow and participate in the network with operate a own Masternode.

HowTo to run a Masternode

There are several ways to operate a Masternode in the Defichain Network.

Option 1 - Ownernode at "Home"

The first possibility is to run the Masternode on a Personal Computer, Laptop or Apple MacBook or something similar in your Home-Network. You can place the hardware, in your office, living room or in your childs room. You can decide what is your favorite.

The only things you need:

  • internet connection (no static IP needed)
  • any hardware with installed APP-Wallet
  • 20000 DFI in this Wallet for the Node, 11 DFI for creation and Fees.


Pros:

  • This is the simplest setup and you only need a few clicks to run it.
  • You don't need extra Hardware, you can use your existing machine with the wallet on it.

Cons:

  • When your machine is offline or your internet connection is down, you can't participate in the network and staking - no rewards in this time.
  • If you want to make the Internet more stable with your masternode and want to offer services for other nodes, you have to open port 8555 externally for everyone.1
  • When you open the Port, you present your wallet.dat to the public internet, maybe A possible target for attackers.

[1] You do NOT have to open the Port to participate in staking, but without this open port, you don't help to stabilize the Network and no one can use your node for synchronization or other implemented features


Option 2 - Ownernode and Operatornode at "Home"

In this scenario you have two Nodes or APP-Wallets in your HOME-Network. One machine act as the Ownernode and held the Collateral of 20.000 DFI. This can be your Macbook, Laptop or Personal Computer. You start this machine, when you need it, only to transfer some Token or use the DEX, LM or send Rewards to another address.

The other machine is your Operatornode. This can be another Laptop or PC or Raspberry or a Home-Server. You only need the actual Nodeversion on it. No Collateral, no Wallet-APP. You can open Port 8555 in your Router to this machine to present Networkservices and make this Node public for other Nodes. Because this Node has no Coins or Tokens, the security risk is much less than in scenario 1.

Pros:

  • Open Port only to the Node without Coins or Token in it.
  • You run the Node at home, nevertheless stabilize the network over opened Port 8555 (only possible with static IP.)


Cons:

  • When your Operatornode is offline or your internet connection is down, you can't participate in the network and staking - no rewards in this time.
  • Hardware for Home mostly not suitable for 24/7 continuous operation (Power Supply, SSD or another disc etc.) Risky for hardware damage.
  • Need another hardware for the Operatornode
  • You need a static IP-Address to present your Node in the Network.
  • Open port 8555 externally for everyone to your Home-Network.
  • An unstable or slow internet connection (upload) is bad for the stability of the network


Option 3 - Ownernode and Operatornode in a datacenter

The preferred scenario is a Hot/Coldwallet solution with the Operatornode "in the Cloud". Your APP-Wallet run at your own machine at home like in option 2. In best case with Ledgersupport as a "Cold-Wallet". This Wallet contains the Collateral of 20.000 DFI and must only active when you want to act with your Wallet or Node.

The Operatornode is hosted in a professional TIER 2 or 3 Datacenter. A simple Virtual private Server is enough, no big Rootserver or something else needed.


Pros:

  • No Port Forwarding needed at Home.
  • High Availability, 24/7 Infrastructure and redundant Internet Connection for your Masternode (Operatornode)
  • Full Service for the Defichain Network: High Availibilty Node with redundant hardware and Internet Connection stabilize the Network and is a boost for the decentralization.


Cons:

  • VPS needed in a datacenter and some knowledge to handle and update it.

Masternode Issues

I have found a block, but the rewards are not apparent

Problem:

I set up a masternode in the testnet and after a few hours I already found 2 blocks. But the rewards are not displayed in the wallet.

Bildschirmfoto 2021-03-11 um 12.59.10.png


Mining Rewards are displayed correctly in the Explorer.

Bildschirmfoto 2021-03-11 um 13.02.19.png
Bildschirmfoto 2021-03-11 um 13.04.39.png


The balance in the Wallet is smaller than the distributed rewards.

Bildschirmfoto 2021-03-11 um 13.09.13.png


Solution:

DFI Rewards are only released after a certain block time has elapsed. To see the coins that have not been released yet, you need to enter the following code in the console: getbalances

Photo 2021-03-11 14-55-26.jpg


After the expiration of the blocking period, the coins will be displayed correctly in the wallet.