Masternodes

What is a Masternode?

A node can simply be understood as a computer that plays a part in ensuring the integrity of a coin's network. The crypto space is not only decentralized but also distributed; therefore, it functions by several people running nodes from different parts of the world. That said, you require a full node to host a copy of the blockchain (coin’s ledger) and thus support the network.

A masternode is a crypto full node (computer wallet) that supports the network by hosting an entire copy of the coin’s ledger in real time. In return, the masternode will receive crypto coins as a reward. It is a great alternative to mining.

Merge's wallet supports masternodes of MERGE starting on block 57,602.

Source: https://cryptodigestnews.com/blockchain-basics-what-is-masternode-dbed481a846e

Setup a Merge Masternode

This guide is for a single masternode on a Ubuntu 16.04 64-bit server (VPS) running headless and will be controlled from the wallet on your local computer (Local Wallet). The wallet on the the VPS will be referred to as the Remote Wallet.

You will need your server details for progressing through this guide.

First the basic requirements:

  1. 10,000 MERGE.

  2. A local computer (your everyday computer) – This will run the Local Wallet, hold your collateral 10,000 MERGE and it can be turned on and off without affecting the masternode.

  3. Masternode Server (VPS – the computer that will be on 24/7).

  4. A unique IP address for your VPS / Remote Wallet.

(For security reasons, you are are going to need a different IP for each masternode you plan to host)

The basic reasoning for these requirements is that, you get to keep your MERGE in your local wallet and host your masternode remotely and securely.

Local Wallet

1) Using the Local Wallet, enter the debug console (Tools > Debug console) and type the following command: masternode genkey (This will be the masternode’s private key. We will use this later…)

2) Using again the debug console, enter the following command: getaccountaddress chooseAnyNameForYourMasternode

3) Still in the Local Wallet, send 10,000 MERGE to the address you generated in step 2. Be 100% sure that you entered the address correctly. You can verify this when you paste the address into the “Pay To:” field, the label will auto populate with the name you chose for the address. Also, make sure this is exactly 10,000 MERGE; no less, no more. Be absolutely 100% sure that this is copied correctly. And then check it again. We cannot help you if you send 10,000 MERGE to an incorrect address.

4) Back to the debug console, enter the command: masternode outputs (this gets the proof of transaction of sending 10,000)

5) Still on the local computer, go into the MERGE's data directory:

  • Windows: %Appdata%/merge/

  • Linux: ~/.merge/

  • Mac: ~/Library/Application Support/merge/

Find and open file masternode.conf

and add the following line to it:

<Name of Masternode (Use the name you entered earlier for the address for simplicity)> <Unique IP address>:52000 <The result of Step 1> <Result of Step 4> <The number after the long line in Step 4>

Example:

MN1 31.14.135.27:52000 892WPpkqbr7sr6Si4fdsfssjjapuFzAXwETCrpPJubnrmU6aKzh c8f4965ea57a68d0e6dd384324dfd28cfbe0c801015b973e7331db8ce018716999 1

Substitute it with your own values and without the “<>”s.

Save file masternode.conf and restart the Local Wallet.

Remote Wallet

6) Install dependencies (add sudo in the beginning of each call if you are not user root):

apt-get update
apt-get install -y build-essential autoconf automake libboost-all-dev libdb4.8-dev libdb4.8++-dev libevent-pthreads-2.0-5 miniupnpc pkg-config libtool libevent-dev git screen autotools-dev bsdmainutils lsof dos2unix zlib1g-dev curl ufw libgmp-dev libssl-dev libcurl4-openssl-dev wget software-properties-common
add-apt-repository -y ppa:bitcoin/bitcoin 

7) Install the latest version of Merge's wallet:

  • Go to your home directory:cd ~

  • From your home directory, download the latest wallet:

    wget <link to the latest wallet binary (file ending with x86_64-linux-gnu.tar.gz)>

    Example:

    wget https://gitlab.projectmerge.org/ProjectMerge/merge/uploads/ef8c019f081cf4c982fb0dc43f4176e1/merge-1.0.3-x86_64-linux-gnu.tar.gz
  • Unzip and extract the binary: tar -zxvf <tar gz file you just downloaded>

  • Go to the Merge wallet directory:cd ~/merge-<version-os>/bin/

  • Note: If this is the first time running the wallet in the VPS, you will need to attempt to start the wallet ./merged . This will place the config files in the ~/.merge data directory.

8) Go to the Merge data directory: cd ~/.merge

9) Open file merge.conf by typing vi merge.conf and then press i to go into insert mode and make the config look like this:

rpcuser=long random username
rpcpassword=longer random password
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
port=52000
externalip=your_unique_public_ip_address:52000
masternodeprivkey=Result of Step 1

Make sure to replace rpcuser and rpcpassword with your own.

10) To exit the editor, press esc , type:wq! and press enter.

Start your Masternode

11) Now, you need to start the following in this order:

11.1) Remote Wallet: – First, go back to the Merge wallet directory, cd ~/merge-<version-os>/bin/ – Start the wallet using./merged – Verify the daemon is running and being synchronized by typing ./merge-cli getinfo – Verify the Remote Wallet is fully synchronized by ensuring the block height is the same as indicated on our official Explorer. See the current block height on the Remote Wallet by typing ./merge-cli getblockcount

11.2) Local Wallet: – Wait until the 10,000 MERGE transaction has achieved at least 16 confirmations (you can check it directly on the Transactions tab). – Unlock the wallet (if it is encrypted) and type on the debug consolestartmasternode alias false <mymnalias> where <mymnalias> is the name of your masternode alias (without the “<>”s).

The following should appear:

"overall” : “Successfully started 1 masternodes, failed to start 0, total 1”, “detail” : [ { “alias” : “<mymnalias>”, “result” : “successful”, “error” : “” }

12) On the Remote Wallet, use the following command to check the status of the masternode:

./merge-cli masternode status

You should see something like:

{ “txhash” : “334545645643534534324238908f36ff4456454dfffff51311”, “outputidx” : 0, “netaddr” : “45.11.111.111:52000”, “addr” : “M6fujc45645645445645R7TiCwexx1LA1”, “status” : 4, “message” : “Masternode successfully started” }

Congratulations! You have successfully created your masternode!

Stop a Merge Masternode

How do I stop running MN1 on my VPS and delete MN1 from my Merge wallet?

  • On your Remote Wallet (VPS), go to the Merge wallet directory, cd ~/merge-<version-os>and stop the wallet using./merge-cli stop.

  • Then, from your Local Wallet, edit your masternode.conf by deleting the MN1 masternode line entry.

  • Restart the Local Wallet.

  • The entry to MN1 under the Masternodes tab is now gone and your 10,000 MERGE are now unlocked.

How do I get the 10,000 MERGE back that I sent to my MN1 address in the beginning of the MN1 setup?

You do not need to “get that back” as it is already in your Merge wallet. Being in a different address is not an issue as that is also your address.

Can I then use my 10,000 MERGE on my Merge wallet again and sell it or stake it like before?

Yes.

Last updated