MasterNode SetUp

X11 – Masternode Guide on Qnode Blockchain

X11-MN REQUIREMENTS

The following are the basic requirements to own or set up a private X11 - masternode on the Qnode Blockchain.
#1. You need exactly 20,000 QNC as the collateral for 1 Masternode
#2. You need a PC (Personal Computer e.g laptop or a Desktop)
This computer holds the wallet, where you want to store your coins and control the masternode remotely. This PC do not need to be online all the time. Let us call this PC-Wallet.
#3. You need a VPS (Virtual Private Server) with Ubuntu Server 18.04 Installed
The VPS is the second computer that will act as masternode server. The VPS runs on the internet 24/7. Let us call this as VPS Wallet. We recommend you register for a VPS account on VULTR with button below and download Putty SSH..
If all 3 requirements above is set, proceed and download putty SSH. And Deploy your node with steps below.

STEP 1 : PREPARE YOUR VPS (UBUNTU 18.04)​

How to Install Ubuntu Server 18.04 on your VPS with Putty SSH

--Its required that you download Putty SSH Client for your OS.
Using Putty SSH, use the provided IP and password from your server host (vultr or Digital Ocean) and login to your virtual machine...

--Step #1a-- Update your Ubuntu machine.
sudo apt-get update

sudo apt-get upgrade

--Step #1b-- Install the required dependencies.

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libboost-all-dev libboost-program-options-dev

sudo apt-get install libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler unzip software-properties-common

--Step #1c-- Install Berkeley DB.
sudo add-apt-repository ppa:bitcoin/bitcoin

sudo apt-get update

sudo apt-get install libdb4.8-dev libdb4.8++-dev

STEP 2: DOWNLOAD AND INSTALL QNODECOIN WALLET TO VPS-WALLET

Step #2a-- Download the Wallet Daemon
wget "https://www.qngnode.cc/wp-content/uploads/2020/06/qnodecoin-daemon-v2.0-linux.tar.gz" -O qnodecoin-daemon-v2.0-linux.tar.gz

wget "https://www.qngnode.cc/wp-content/uploads/2020/06/qnodecoin-qt-v2.0-linux.tar.gz" -O qnodecoin-qt-v2.0-linux.tar.gz

Step #2b-- Extract the tar files
tar -xzvf qnodecoin-daemon-v2.0-linux.tar.gz

tar -xzvf qnodecoin-qt-v2.0-linux.tar.gz

Step #2c-- Install the daemon and tools.
sudo mv qnodecoind qnodecoin-cli qnodecoin-tx /usr/bin/

Step #2d-- Create the a directory and config file.
mkdir $HOME/.qnodecoin

nano $HOME/.qnodecoin/qnodecoin.conf

Step #2e-- Modify & Paste the following lines in qnodecoin.conf
#----
rpcuser=rpc_qnodecoin
rpcpassword=REPLACE_WITH_A_CUSTOM PASSWORD
rpcallowip=127.0.0.1
#----
listen=1
server=1
daemon=1
maxconnections=64
#----
#masternode=1
#masternodeblsprivkey=
externalip=REPLACE_WITH_EXTERNAL_IP_OF_YOUR_VPS
#----

Note: Leave the fields “masternode” and “masternodeprivkey” as it is commented out. But Replace the text “REPLACE_WITH_EXTERNAL_IP_OF_YOUR_VPS” with the external IP address of your VPS.
E.G. externalip=140.82.9.137
Note: to finish and exit from this section:
Press Crtl + O, then Press ENTER and Press Crtl + X

Step #2f-- Start your node with the following command.
qnodecoind
Wait until the command “mnsync status” returns the status “MASTERNODE_SYNC_FINISHED”.

qnodecoin-cli mnsync status

Example output

{
"AssetID": 999,
"AssetName": "MASTERNODE_SYNC_FINISHED",
"AssetStartTime": 1558596597,
"Attempt": 0,
"IsBlockchainSynced": true,
"IsSynced": true,
"IsFailed": false
}

STEP 3: GENERATE ADDRESSES & SEND THE FEE & COLL

Open your PC-Wallet and wait until your wallet has downloaded the blockchain.
Go to “Tools”.
Click “Debug console”.

This is the console where you will execute all commands.

Step #3a-- Create a new address for the fee
getnewaddress

Example output will look like this:

"9HBSKbJgn7g2x3PAbNuW6whkecqrq9aUn6"
Send 1 coin to the address that you just created
(Note: Please open a separate notepad, copy and save these details as you proceed)

Step #3b-- Create a new address for the masternode collateral.
getnewaddress

Example output will look like this:
"9RPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5"

Transfer the required amount of coins (20,000 QNC) to the “collateral address” that you created in this step #3b.
(Wait until the transaction has the required masternode confirmations.)

Step #3c-- Identify the funding transaction.
Enter the following command.
masternode outputs

Example output will look like this:
{
"fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a": "0"
}

Step #3d-- Generate a BLS Key Pairs
bls generate

Example output look like this:

{
"secret": "0acbf6f183d0c9b794b9bc0dba25f8a1a1eca21aa4f2e4a86ecd3120a59efb35",
"public": "064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9"
}

Step #3e-- Register your Masternode
Return to your VPS and nano .config file

How to do so, in the VPS-WALLET:
nano $HOME/.qnodecoin/qnodecoin.conf

Place the secret key (from step #3d above) in the config file of your masternode and uncomment the values “masternode” and “masternodeblsprivkey”

Example config looks like this:
#----
rpcuser=rpc_qnodecoin
rpcpassword= REPLACE_WITH_A_CUSTOM PASSWORD
rpcallowip=127.0.0.1
#----
listen=1
server=1
daemon=1
maxconnections=64
#----
masternode=1
masternodeblsprivkey=0acbf6f183d0c9b794b9bc0dba25f8a1a1eca21aa4f2e4a86ecd3120a59efb35
externalip=REPLACE_WITH_A_CUSTOM _IP
#----

Press CTRL + O and Press ENTER (to save modifications)
Press CTRL + X (to exit)

Step #3f-- Restart your masternode using the following commands.

qnodecoin-cli stop
qnodecoind

STEP 4: PREPARE & SIGN ProRegTx TRANSACTIONs

Return to PC-Wallet and open console to executes commands.
Go to “Tools”.
Click “Debug console”.


Step #4a-- Create a new address for the owner
getnewaddress

Example output looks like this:

"9WXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN"

Step #4b-- Create a new address for voting

getnewaddress
Example output looks like this:
"9SsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL"

Step #4c-- Create a new address for payout
getnewaddress.

Example output looks like this:
"9EXj9AgdCh1giGmr1BXpYsngmkMkthNngD"

Modify the following line.

protx register_prepare fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a 0 140.82.9.137:20612 9WXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN 064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9 9SsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL 0 9EXj9AgdCh1giGmr1BXpYsngmkMkthNngD 9HBSKbJgn7g2x3PAbNuW6whkecqrq9aUn6

fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a - Transaction id from the command “masternode outputs”.

- Single digit from the command “masternode outputs”.

140.82.9.137:20612 - Your External IP address and P2P port for QnodeCoin.

9WXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN - The new address generated above for the owner.

064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9 - The BLS public key generated above.

9SsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL - The new address generated above for the voting.

- Leave this value at 0.

9EXj9AgdCh1giGmr1BXpYsngmkMkthNngD - The new address generated above for the payment.

9HBSKbJgn7g2x3PAbNuW6whkecqrq9aUn6 - The new address generated above for the fee.

Paste the modified line into the console of your wallet.

Example output

{
"tx": "0300010001a55ee8d6ad1d5c1409a5328f4e53e80e3e7c83cf85253594141505fa64c5eeec0000000000feffffff0121dff505000000001976a9144f18fd993c0f9458fafb4985536dd358e9899a9f88ac00000000d10100000000006a1cea94ddfed785b02cd2d4895177697d9f3bd45a9091d2f5caf91fff9dabfd0000000000000000000000000000ffff88909c3714c4e172bd9c230db9cac3e446945cff2ea6720c2eca064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9b9772f1f7b0af05a67883806a4f60ddde4ecbf9e00001976a9143206f92dd6acc1a481cbb88fcadc19d0507bcb7d88ac0c5537044361500975adba10f9299f684f62a7f544e8e671638fee2c3914349f00",
"collateralAddress": "TRPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5",
signmessage "9RPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5" "9EXj9AgdCh1giGmr1BXpYsngmkMkthNngD|0|9WXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN|9SsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL|ac19e80b02d4e8a27feb42073114070a281a2b788ba064803e8064d259b22ebc"
}

Step #4d-- Sign the ProRegTx Transaction
Copy & Modify the following line in a notepad.

signmessage "9RPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5" "9EXj9AgdCh1giGmr1BXpYsngmkMkthNngD|0|9WXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN|9SsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL|ac19e80b02d4e8a27feb42073114070a281a2b788ba064803e8064d259b22ebc"

Note:
9RPLV4dXmEFMSgXg2Xu6skN9pmw8TAo4N5 - The “collateralAddress” value of the above output.

9EXj9AgdCh1giGmr1BXpYsngmkMkthNngD|0|9WXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN|9SsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL|ac19e80b02d4e8a27feb42073114070a281a2b788ba064803e8064d259b22ebc - The “signMessage” value of the above output.

Paste the modified line into the console of your wallet.

Example output looks like this:

H/d9tkCSzqdYh8qLL1c+KDIlrb4vtFSfdxd88XDc3U/hRZ6lMuAR8TULy7vh1YXGk6AYFFV1xyPNuEdZVMN9SdI=

Step #4e-- Submit the signed message
Copy & Modify the following line in a notepad.

protx register_submit 0300010001a55ee8d6ad1d5c1409a5328f4e53e80e3e7c83cf85253594141505fa64c5eeec0000000000feffffff0121dff505000000001976a9144f18fd993c0f9458fafb4985536dd358e9899a9f88ac00000000d10100000000006a1cea94ddfed785b02cd2d4895177697d9f3bd45a9091d2f5caf91fff9dabfd0000000000000000000000000000ffff88909c3714c4e172bd9c230db9cac3e446945cff2ea6720c2eca064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9b9772f1f7b0af05a67883806a4f60ddde4ecbf9e00001976a9143206f92dd6acc1a481cbb88fcadc19d0507bcb7d88ac0c5537044361500975adba10f9299f684f62a7f544e8e671638fee2c3914349f00 H/d9tkCSzqdYh8qLL1c+KDIlrb4vtFSfdxd88XDc3U/hRZ6lMuAR8TULy7vh1YXGk6AYFFV1xyPNuEdZVMN9SdI=

Note:
0300010001a55ee8d6ad1d5c1409a5328f4e53e80e3e7c83cf85253594141505fa64c5eeec0000000000feffffff0121dff505000000001976a9144f18fd993c0f9458fafb4985536dd358e9899a9f88ac00000000d10100000000006a1cea94ddfed785b02cd2d4895177697d9f3bd45a9091d2f5caf91fff9dabfd0000000000000000000000000000ffff88909c3714c4e172bd9c230db9cac3e446945cff2ea6720c2eca064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9b9772f1f7b0af05a67883806a4f60ddde4ecbf9e00001976a9143206f92dd6acc1a481cbb88fcadc19d0507bcb7d88ac0c5537044361500975adba10f9299f684f62a7f544e8e671638fee2c3914349f00 - The “tx” value of the “protx register_prepare” command.

H/d9tkCSzqdYh8qLL1c+KDIlrb4vtFSfdxd88XDc3U/hRZ6lMuAR8TULy7vh1YXGk6AYFFV1xyPNuEdZVMN9SdI= - The output of the above command.

Paste the modified line into the console of your wallet.

Example output looks like this:

7da2e1187202a1a497beca05e0e53a6e4df0dc06046f72fbf8b61c942db2982a

Your masternode is now registered and will appear in the masternode list.

You can check the status of your masternode using the command "masternode status" below.

qnodecoin-cli masternode status.

Example output looks like this:

{
"outpoint": "fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a-0",
"service": "140.82.9.137:20612",
"proTxHash": "7da2e1187202a1a497beca05e0e53a6e4df0dc06046f72fbf8b61c942db2982a",
"collateralHash": "fdab9dff1ff9caf5d291905ad43b9f7d69775189d4d22cb085d7fedd94ea1c6a",
"collateralIndex": 0,
"dmnState": {
"service": "140.82.9.137:20612",
"registeredHeight": 145,
"lastPaidHeight": 0,
"PoSePenalty": 0,
"PoSeRevivedHeight": -1,
"PoSeBanHeight": -1,
"revocationReason": 0,
"ownerAddress": "9WXGVYPHGA4gWcZ9Zp2qnubFVNagvorwEN",
"votingAddress": "9SsrnbtJGYD1WmVsrsvauuwxibJyqkkqqL",
"payoutAddress": "9EXj9AgdCh1giGmr1BXpYsngmkMkthNngD",
"pubKeyOperator": "064bb1741f4707cfe3629176857c41e0d23cbe751061fe5d0d67b506db10c8f3f6f2b684c3cec8e4a128193a001d12e9"
},
"state": "READY",
"status": "Ready"
}

CONGRATULATIONS, YOUR QNC MASTERNODE IS RUNNING ALREADY AND IT MAY TAKE SOME TIME TO SYNC.