Syscoin 3.0 Masternode Configuration

UPDATED



This is a setup guide for creating a Syscoin 3.0 Masternode. You will need a Virtual Private Server (VPS) from hosting providers such as Amazon EC2, DigitalOcean Droplets, Google Compute Engine, Microsoft Azure, Choopa, OVH, or Vultr that meets the following specifications:

Network Configuration

You will need to allocate a static IP to your masternode. If your hosting provider implements a firewall you will need to allow access to your masternode on TCP port 8369. Since we will be using SSH to access to server you will need to allow TCP port 22 as well.


Upgrading from 2.x to 3.x?

If you are upgrading your wallet from Syscoin 2.x to Syscoin 3.x you MUST run dumpwallet "/full/path/to/dump.txt" and then importwallet "/full/path/to/dump.txt". You will likely want to delete “/full/path/to/dump.txt” after this process as it contains unprotected private keys.

If you are unable to open your wallet.dat with Syscoin 3.x with an error that your wallet is corrupted you will need to open the wallet using Syscoin 2.1.6 and call dumpwallet then open Syscoin 3.x to run importwallet.

Note that backing up and encrypting your wallet is out of scope for this guide but if they are new concepts to you please look into how to do them!


Prepare & Send 100k SYS Collateral

To stake your masternode you will need to provide exactly 100,000SYS in your masternode address. Use Syscoin-Qt for your system to process this transaction.

To get started open Syscoin-Qt and from the menu select “>Settings > Options”. Select the “Wallet” tab and click the checkbox to “Enable coin control features” and “Show Masternodes Tab”. Click the “Ok” button to save your settings then wait for Syscoin-Qt to fully sync with the network.


Syscoin-Qt Masternode Options


Masternode Private Key & Address

Once Syscoin-Qt has fully synced select “Tools > Debug” and enter masternode genkey to generate your masternode private key. Copy this value as you will need it later, it will look similar to the following:

7ra1rhngvNkhkiFE8STrmvH3LvYTCzLyRFHFsZvrJUBV6ZmWnc

Next type getnewaddress to generate an address to use for collateral. Copy down this address as well as you will need to send your collateral to it in the next step. Note that using an alias is out of scope here, but if you create an alias you may use its address as well.


Send Collateral to Address

Use Coin Control to ensure that you send your collateral from the correct address. Go to “Send” and then “Inputs” to select the input that you would like to send from. In the example below using tSYS, the “Main” input will be selected. Click “Ok” to return to the “Send” screen.


Syscoin-Qt 3.0 Coin Control


Next enter your masternode collateral address from the previous step into the “Pay To” field. Enter “100,000” exactly into the “Amount” field and do NOT subtract fees from the amount as it will reduce your collateral total.

Press “Send” to send your Syscoin to your masternode collateral address. You will need to wail 1 block – approximately 1 minute – for the transaction to confirm.


Syscoin-Qt 3.0 Masternode Collateral Send


Next you will need to get the transaction id for the collateral by selecting the “Transactions” tab to see the 100,000SYS sent to yourself. Right click this transaction to view the id, and copy it down as well for later use.


Syscoin-Qt 3.0 Masternode Transaction


Get Masternode Outputs

In Syscoin-Qt again open the “Tools > Debug” menu and enter masternode outputs. You will get a long string that is a hash of the transaction id from the previous step followed by a “0” or “1” to indicate the output index. The result should resemble the following:

{
“06e38868bb8f9958e34d5155437d009b72dff33fc87fd42e51c0f74fdb” : “0”,
}


Configure Masternode via Syscoin-Qt

From the Syscoin-Qt menu select “Tools > Open Masternode Configuration File”. You will need to enter your masternode information using a text editor in the following format:

# alias ip_address:port mn_private_key output_tx_id, output_tx_index
masternode_alias 123.123.123.123:8369 7ra1rhngvNkhkiFE8STrmvH3LvYTCzLyRFHFsZvrJUBV6ZmWnc 06e38868bb8f9958e34d5155437d009b72dff33fc87fd42e51c0f74fdb 0

Save this file and close Syscoin-Qt.


Configure Masternode

Connect to your VPS via SSH and enter the following command to start the automated install:

bash <(curl -sL doublesharp.com/sys-masternode)

Default values are found in brackets and pressing enter will selected the [default] value. For entries with a [Y/n] the capital letter is the default. Enter [Y] to choose “yes” or [N] to choose “no”. Likely the only value you will need to enter is your masternode private key.

Syscoin Core Github Branch [master]: 
Masternode Private Key []: 7ra1rhngvNkhkiFE8STrmvH3LvYTCzLyRFHFsZvrJUBV6ZmWnc
External IP Address [123.123.123.123]: 
Masternode Port [8369]: 

Press any key to continue or Ctrl+C to exit...

Once the build process and configuration have completed type source ~/.bashrc to access the syscoind and syscoin-cli executables via the new syscoin user.


Enable Masternode

Restart Syscoin-Qt and wait for it to sync up to the network. Choose the “Masternodes” tab, select your masternode, then click “Start”.


Syscoin-Qt 3.0 Masternode Start


Masternode Server Commands

Now that syscoind is running under the syscoin user you will need to access it differently. The cron job for sentinel ping is also installed unter this user. The following commands may be useful.

# view your syscoin.conf
sudo cat /home/syscoin/.syscoincore/syscoin.conf

# view your sentinel.conf
sudo cat /home/syscoin/sentinel/sentinel.conf

# view the syscoin user crontab
sudo crontab -u syscoin -l

# view the sentinel-ping cron log
sudo less /home/syscoin/sentinel/sentinel-cron.log

# start and stop the syscoind systemd service
sudo service syscoind stop
sudo service syscoind start
sudo service syscoind restart

# check that the syscoind process is running at the proper user
ps aux | grep [s]yscoind

# log out and back in or run the following to alias syscoind and syscoin-cli
source ~/.bashrc

# now the commands run as the syscoin user
syscoin-cli getinfo
syscoin-cli mnsync status
syscoin-cli masternode status

# it is aliased to this shorter function 
syscli getinfo
syscli mnsync status
syscli masternode status

# if you really want to log in as the syscoin user
sudo su - syscoin


Summary

This script installs the necessary dependencies to build the Syscoin Core from source. It creates a user named “syscoin” and uses a systemd service to start the syscoind process as the “syscoin” user, and it set to start on boot after the necessary networking services have started.

Updates can be run by entering the same command again bash <(curl -sL doublesharp.com/sys-masternode)