build-dash-masternode-setup

How To Build DASH Masternode Setup: A Beginner’s Guide

The blockchain technology offers various ways to earn. That is the primary reason why so many investors are attracted to this space. While most digital currency investments need active market participation, there are other ways to earn passively. One would be running masternode. In this article, we will be learning how the DASH masternode setup is done. 

Masternodes are nodes that enact special tasks which “standard” nodes cannot do. As a DASH masternode reward for offering additional service to a blockchain network, the masternode operators get financial rewards that are created on a collateral based system. 

Masternodes are available in varied sizes and shapes but the DASH setup procedure is the same as the majority of “masternode coins”.

How DASH Masternode Setup Is Done?

In this DASH masternode setup guide, we will be taking you through the complete process of setting up a DASH masternode. DASH is considered as one of the most famous masternode coins that are available in the market. Let us see the steps with an example.

1. Set up your VPS

A Virtual Private Server (VPS) is an installation of an Operating System (OS) that runs within a virtual machine. This is required to operate numerous systems on one physical server which is much cheaper and more efficient than running it from a home desktop. 

There are various cloud hosting services like Google Cloud, Amazon EC2, but we will use Vultr as a VPS example. 

Vultr provides an array of options for storage capacity, memory, and location of the server. Along with that this VPS is reliable, affordable, and has the best user experience to date. 

  • So first create an account and then add credit. Then go to the server menu item that is on the left and click +. Then select the location of your server. 
  • The server will function on Linux, so choose Ubuntu 18.04 x64 as your server type. 
  • A minimum of 2GB storage is needed to choose the relevant server size. 
  • Next, input the hostname of your server. 
  • Wait for a few minutes while Vultr finishes the installation of your server. Then click on “Manage” and save the username. IP address, and password. 

2. Set up your operating system 

Now it is time to connect to your new server. On Windows download “PuTTY”. Ensure with the appropriate installer that matches your system. 

On Linux or Mac, you can directly install from the terminal by typing:

ssh [email protected]<server_ip>
  • After PuTTY has been installed, run the application from your start menu. In the “Host Name” enter the IP address of the server and click “Open”. 
  • Then log in to your server with the password and user root that has been given by your hosting provider. 
  • Ensure to change the root password as soon as possible for security purposes. Copy and paste the below mentioned command on the PuTTY window. 
passwd root
  • Enter a new password. Next, a new user name needs to be created with the following command, by replacing <username> with a username that you wish to put.
adduser <username>
  • You will be redirected to a password. Insert your new password and do not forget to save it.  
  • Now while still as root, the system will be updated from the Ubuntu package repository by inserting the commands:
apt update
apt upgrade
  • At this time, the system will portray a list of upgradable packages. Press Y and Enter for the package installation. Then insert:
apt install ufw python virtualenv git unzip pv
  • Press Y and Enter, then insert:
ufw allow ssh/tcp
ufw limit ssh/tcp
ufw allow 9999/tcp
ufw logging on
ufw enable
  • Press Y and Enter, then insert:
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
nano /etc/fstab
  • Add the following commands at the end of the line and then press Ctrl + X and close the editor. Then press Y and Enter and save the file.
/swapfile none swap sw 0 0
  • For security reasons, it is required to disable root login over ssh and then install fail2ban. 
  • For fail2ban, input:
apt install fail2ban 
  • Formulate a new configuration by inserting:
nano /etc/fail2ban/jail.local
  • Once you have inserted the above mentioned configuration, paste the below mentioned configuration
[sshd]
enabled = true
port = 22
filter = ssh
logpath = /var/log/auth.log
maxretry = 3
  • Then press Ctrl + X for closing the editor and then Y and Enter for saving the file. Restart the application and enable the fail2ban service by inserting:
systemctl restart fail2ban
systemctl enable fail2ban
  • Next, open the configuration of SSH to disable the root login over SSH:
nano /etc/ssh/sshd_config
  • Find out the line that reads “PermitRootLogin yes” and set it to “PermitRootLogin no”. Below this, directly add a line that reads “AllowUsers <username>”, by replacing <username> with the username that you have selected above. Then press Ctrl + X for closing the editor, then Y, and Enter for saving the file. 
  • Finally reboot the server by entering: Reboot now.

3. Send the collateral

A Dash masternode requirement includes 1000 DASH as collateral. There can be a masternode registration using the official Dash Core wallet. Another option can be a hardware wallet, which has enhanced the security.

But in this guide, we will see DASH masternode setup by using a software wallet as it is used more commonly. 

  • In the first step, you will have to download the Dash Core Wallet. Then open the wallet and wait for its complete synchronization. 
  • Then select Tools > Debug console to open the console. Insert this command into the console to develop a new Dash address that is required for the collateral:
Getnewaddress
yiFfzbwiN9oneftd7cEfr3kQLRwQ4kp7ue
  • Save the collateral address for future use. 
  • For security reasons, it is important to encrypt the wallet. For encryption, Settings > Encrypt wallet. Save your password, and ensure that is kept as a secret. 
  • Next backup the files of your wallet by selecting File> Backup Wallet. Then save those files in an external hard drive or in some other storage that is physically away from your computer, so that if anything happens to your computer, you will still have access to your funds. 
  • Now send 1000 DASH exactly in one transaction to the collateral address that was developed by you in the previous step. Once the transaction is successful, view that transaction in blockchain by looking for the address. 
  • You will require 15 verifications before you can register the masternode, but you can proceed to the next step at this point only by developing your masternode operator key.

4. Install Dash Core

Dash Core is the software that operates the graphic user interface wallet of the Dash Core and also the Dash masternodes. It is also attached to the Dash blockchain. 

  • Again open PuTTY and connect using your already existing username and password. 
  • To install Dash using Dashman, insert the following command:
cd ~
git clone https://github.com/moocowmoo/dashman
~/dashman/dashman install
(press Y and Enter to confirm)
  • The latest Dash Core will be installed by Dashman on your system along with the first snapshot of the blockchain to speed up the process of bootstrapping.
  • Next, download and then install Sentinel which is needed for masternode at version 0.12.1 or even higher. 
~/dashman/dashman install sentinel
  • Your system is presently operating as a standard Dash node and is busy fulfilling synchronization with blockchain.
  • Select nano as your editor and insert the following commands at the end of the file:
* * * * * pidof dashd || ~/.dashcore/dashd
  • Next press enter to ensure that there is a blank space at the end of the file and then press Ctrl + X to close the editor and Y and Enter for saving the file. 
  • Check the status of the sync and wait till all the 15 confirmations and all the blockchain synchronization are complete.
~/dashman/dashman status

5. Register Your Master Node

The final step is DASH masternode setup is registering your masternode. Now, this step has been done in various ways. Let us see those ways. 

a. Identify the funding transaction

  • First, there is a need to find the txid (transaction ID) of the transaction. Select Tools > Debug console and input the following command:
masternode outputs
  • This should return a string of characters similar to the following:
{
“16347a28f4e5edf39f4dceac60e2327931a25fdee1fb4b94b63eeacf0d5879e3” : “1”,
}
  • The first string that is long is your collateral Hash, while the last number is your collateral Index.

b. Generate a BLS key pair

  • A private/public BLS key pair is needed to run a masternode. But if you are availing of a hosting service, in that case, they may offer you with their public key, and you can ignore this step.
  • If you are hosting your own masternode, develop a BLS private/public key pairs in the Dash Core software by selecting Tools > Debug Console and input the following command:
BLS generate
{
  “secret”: “395555d67d884364f9e37e7e1b29536519b74af2e5ff7b62122e62c2fffab35e”,
  “public”: “99f20ed1538e28259ff80044982372519a2e6e4cdedb01c96f8f22e755b2b3124fbeebdf6de3587189cf44b3c6e7670e”
}

c. Add the private key to your masternode configuration

  • The public key will be utilized in the following steps. The private key must be imputed in the dash.conf file that is present on the masternode. Log in to your masternode using PuTTY or ssh and customize the configuration as follows:
nano ~/.dashcore/dash.con
  • The editor comes with the existing configuration of the masternode. Uncomment or add these within in the file, by replacing the key with your BLS private key that has been developed above:
masternode=1
masternodeblsprivkey=395555d67d884364f9e37e7e1b29536519b74af2e5ff7
  • Press enter to ensure there is a blank space at the end of the file, then click Ctrl + X for closing the editor and Y and Enter for saving the file. You will now need to restart the masternode for this alteration to take effect.
~/.dashcore/dash-cli stop
sleep 15
~/.dashcore/dashd

d. Create a ProRegTx transaction

  • A pair of BLS keys for the operator has already been developed above, and the private key was inputted on the masternode. The public key is utilized in this transaction as the operatorPubKey.
  • First, there is a requirement for a new, unused address from the wallet to serve which will be used as the owner key address (ownerKeyAddr). This is not similar to the collateral address that holds 1000 Dash. Develop a new address as follows:
Getnewaddress
yfgxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip
  • This address can also be utilized as the voting key address (votingKeyAddr). Along with that, you can mention an address offered to you by your chosen voting delegate, or simply develop a new voting key address as follows:
getnewaddress
yfRaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg
  • Then either choose or develop an existing address to get the owner’s DASH masternode payouts (payoutAddress). It is also okay to use an address that is external to the wallet:
getnewaddress
yjZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN
  • You can also occasionally develop and fund other different addresses as the source of the transaction fee (feeSourceAddress). If you select an external payout address, you must mention a fee source addresses. Either the fee source address or the payout address must have enough balance to pay for the transaction fee, or else the final register_submit transaction will fail.
  • The private keys to the owner and fee source addresses must exist in the wallet which is submitting the transaction to the network. If your wallet is secured by a password, it must now be unlocked to do the following commands. Unlock your wallet for five minutes:
walletpassphrase yourSecretPassword 300
  • It is now time to prepare an unsigned ProRegTx special transaction using the protx register_prepare command. This command has the following syntax:
protx register_prepare collateralHash collateralIndex ipAndPort ownerKeyAddr
 operatorPubKey votingKeyAddr operatorReward payoutAddress (feeSourceAddress)

Open a notepad to save this command. Replace each argument to the command as follows:

  • collateralHash: The txid of the 1000 Dash collateral funding transaction
  • collateralIndex: The output index of the 1000 Dash funding transaction
  • ipAndPort: Masternode IP address and port, in the format x.x.x.x:yyyy
  • ownerKeyAddr: The new Dash address generated above for the owner/voting address
  • operatorPubKey: The BLS public key generated above (or provided by your hosting service)
  • votingKeyAddr: The new Dash address generated above, or the address of a delegate, used for proposal voting
  • operatorReward: The percentage of the block reward allocated to the operator as payment
  • payoutAddress: A new or existing Dash address to receive the owner’s masternode rewards
  • feeSourceAddress: An (optional) address used to fund the ProTx fee. payoutAddress will be used if not specified.

Conclusion

Masternode is an alternative method for a passive income, but it is important to know the DASH masternode setup for a better operating scenario. Follow every step that has been mentioned above to get the desired result.

Check Also

cryptocurrency-banking

Cryptocurrency Banking: Know Its Meaning And Important Benefits In Details

The increase in the use of digital currency and its latest blockchain-based mechanism has attracted …

Leave a Reply

Your email address will not be published. Required fields are marked *