Stakenet (XSN)
Published in

Stakenet (XSN)

Stakenet Cloud: Setting up a Masternode

Complete Guide

In this guide, we will cover the process of setting up an XSN Masternode using the Stakenet cloud to host the Masternode. If you want to learn more about the different services of a Masternode, read this article.

The first section will cover how to install the Stakenet wallet on a Windows system, how to encrypt it, how to back it up, and restore your wallet using your wallet.dat. If you are using XSN Core on MacOS, read this article.

The second section, covers how to create an account on the Stakenet Cloud and setup your Masternode.

Table of Contents

1. Wallet setup

  • Applying the bootstrap

2. Encryption and backup

  • Encryption step
  • Backup step

3. Masternode setup

  • Prerequisite
  • Step 1 — Select the assets
  • Step 2 — Create address and send the required XSN
  • Step 3 — Output the transaction ID
  • Step 4 — Generate Masternode key
  • Step 5 — Edit the masternode.conf
  • Step 6 — Run the XSN Masternode

4. About your rewards

5. Verify your Masternode status

  • Initialization on the cloud
  • How to start staking
  • Initialization troubleshooting
  • Notification when your masternode status changes

6. How to restore a wallet

1. Wallet setup

  • Download the latest version of the wallet (xsn-version-setup.exe) from the official X9 GitHub repository (https://github.com/X9Developers/XSN/releases)
  • Additionally, download the file “bootstrap.zip”
  • Launch the .exe you downloaded for the wallet
  • Click “Next” and choose where you want to install the wallet (or leave it to default location, if you wish so)
  • Run the wallet
  • A pop up appears the first time you install it, select “Save the wallet” in the default directory or choose your custom directory.
  • Click “OK”
  • When the wallet launches, close it. Follow the next step below.

Applying the bootstrap

Why should you apply the bootstrap? The bootstrap helps the wallet sync faster.

  1. Open the file explorer and go where you saved the data directory for wallet, default path is : %appdata%/xsncore
  2. Delete the following files/folders:
  • blocks
  • chainstate
  • indexes
  • peers.dat

3. Open the bootstrap.zip you downloaded, copy the file bootstrap.dat and paste it in the file explorer you opened before (%appdata%/xsncore)

4. Open your wallet and let it sync

5. Once it has completed syncing move to the next step

2. Encryption and backup

In this step you are going to encrypt your wallet with a passphrase, and make a backup.

Encryption step

1. On the top-left header, click to settings

2. Set your passphrase

3. Read the popup carefully. The popup confirms that should you forget your passphrase then you will lose access to your funds held within your wallet.

4. Another warning popup will appear, explaining that you should delete all your latest backups and do a new one. This is because the previous backups will be unencrypted and pose a security risk if someone was to get hold of them.

5. Your wallet will close.

6. Open your wallet again and let it sync.

7. When you want to send your funds from your wallet, you will need to click on the Settings tab -> Unlock wallet

8. Enter your passphrase and you’re good to go!

1. If you choose ‘Unlock for staking only’, this means that you can’t send any funds / edit settings of your wallet.

2. In the bottom right hand corner of your wallet, you will see a padlock symbol. When you hover over it, you will see that your wallet is encrypted and currently unlocked.

Important: After encrypting your wallet or changing your passphrase you have to make a new backup as the previous version won’t be encrypted with your new passphrase.

Backup procedure

This is a really simple procedure to do when:

  • Creating a new address
  • Modifying your passphrase
  • After encrypting your wallet

How does the backup work ?

If you look carefully in your wallet folder (%appdata%/xsncore/wallets) or the custom path you installed your wallet, you will see a wallet.dat

The wallet.dat file contains your private keys, public keys, scripts (which correspond to addresses), key metadata (e.g. labels), and the transactions related to your wallet. If you have an HD wallet, it also includes the HD seed and the derivation paths for each private key.

This file will be responsible for retrieving your wallet when something goes south, when making a new backup, the output will be a wallet.dat (convention naming) file.

When making a backup, it is advised to save that wallet.dat file in multiple USB sticks, so if anything happens to your computer, where you can’t manage to retrieve your windows backup, you can still retrieve your funds with the backup saved on your USB stick.

How to create a backup

1. Go to the header tab of your wallet, Settings -> Backup wallet

2. A pop up will appear to select in which folder of your computer to save it. The name of your file should be wallet (this is the naming convention).

3. All done. Checkout Restore Core wallet using the backup to see how to restore your wallet.

3. Masternode setup

As mentioned earlier, this section will provide you with the complete steps required to setup a Masternode hosted through the Stakenet Cloud.

If you are looking to host your own Masternode through your VPS then please refer to this guide instead: Masternode setup with a VPS

Prerequisite:

  • 15 000 XSN which is the Masternode collateral
  • 150 XSN to pay for the hosting fees (only for the initial setup)
  • An account on Stakenet cloud

You have to fill up your account on Stakenet Cloud with 150 XSN, which is required in order for you to pay the hosting fees on the Stakenet Cloud.

  1. Go to https://cloud.stakenet.io/register to create an account
  2. Login
  3. Click on Deposit
  4. Send 150 XSN to your deposit address

Step 1 — Select the assets

1. Go into your account and navigate to the Masternodes tab

2. Click on the create button, a popup will appear.

3. Select Stakenet from the dropdown list.

Step 2 — Create an address and send the required XSN to it

1. As mentioned in the popup, open your local wallet and go the Tools -> Debug console

This window will pop up

2. You need to generate a new legacy address (they start with an X) with this command below:

getnewaddress "alias" legacy

Where alias is the name you want to label that address such as:

getnewaddress MN4 legacy

3. Copy the output, which will be your address

#example output

XfSeC68xvpaqwDcjdUEV9vodKlsmn9K

  1. You can still see all your addresses (including the new generated one), with their alias in File -> Receiving addresses tab of your wallet
  2. Now in your wallet, click on the tabs SEND XSN, enter the exact amount of collateral — (you need 15 000 XSN).
    Be aware: You should not click the button Use available balance or toggle the Subtract fee from amount.
  3. You need exactly 15 000 XSN on this address.

4. Press the button SEND XSN

5. You can now see the transaction in the TRANSACTIONS tab
At first it will be a blue clock, waiting for the transaction to confirm. Once the transaction has been confirmed, it will have a blue checkmark.

Step 3 — Output the transaction ID

Once you got that blue check mark, right click on the transaction of type Payment to yours… (the withdrawal one) and you will see options, click on Copy transaction ID.

  1. Go back to the Stakenet Cloud, click on the next step and you will be on step 3, Transaction details

Paste the transaction id in the input and click Next step

Step 4 — Generate masternode key

  1. Go back to your local wallet, open the debug console and write the command given in the modal of Stakenet cloud

masternode genkey

As an example, the output may look like:

7rU9u6RaqRrNp26uE19Nth17ibxxu6RaqRrN23N

2. Head back to the Stakenet Cloud and paste the output you were given in the debug console

3. Click on next step

Step 5 — Edit masternode.conf

  1. Copy the given line starting with ALIAS xxx.xx.xxx:xx:xxxxx 7rU9u6RaqRrNp26uE19Nth17ibxxu6RaqRrN23N
  1. It is recommended to open a text editor such as notepad and paste this line into it, you will have to do some modification later on.
  2. Close your local wallet
  3. Open the text editor you’ve pasted the line starting with ALIAS
  4. Replace ALIAS with your address alias you generated above (in this case, MN4)

#example

MN4 xxx.xx.xxx:xx:xxxxx 7rU9u6RaqRrNp26uE19Nth17ibxxu6RaqRrN23N

5. Be sure there is space between your alias and the and the IP address

6. Open a file browser on your desktop and navigate to the data directory folder %appdata%/xsncore

7. Right click on your masternode.conf and choose Open with -> Notepad

Copy the line you edited in your previous text editor containing the alias, the ip and the address then paste it in the masternode.conf

You will see there is an example in the masternode.conf showing how it should be formatted, verify that you did it correct

The file should look like this afterwards:

  1. Save the file, and close it
  2. Head back to the cloud and click on Next step

Step 6 — Run the masternode

  1. Open your local wallet
  2. You should see a new tab appearing after the TPoS, called MY MASTERNODES

If you can’t see it please try the following procedure:

  • On your wallet, click on the header Settings -> Options
  • On the pop up navigate to the wallet tab
  • Toggle the Show Masternodes Tab
  • Restart your wallet

Please open your wallet on full screen, sometimes it’s hidden when the window isn’t in full screen.

On that tab, you can see all your masternodes and their statuses. If you can see the status of the masternode is PRE_ENABLED, select it. Click on the button Start alias to start your masternode.

It takes between 15 to 30 minutes to your masternode to change status from PRE_ENABLED to ENABLED

Congratulations you’ve just setup your first masternode!

4. About your rewards

To have an estimation when you will get your first reward, you could do this formula :

2.6*(total active MN count) / 60 = hh:mm

#example 2.6*(2981) / 60 = 129 hours

You need to verify the amount of masternode present in the network and based on that number you could expect your first reward within 129 hours.

The rewards will be sent directly to the wallet that holds the collateral (the 15 000 XSN).

You will be able to only send any the rewards, not your Masternode collateral (if your MN is active).

5. Verify your masternode status

  1. Head back to the https://cloud.stakenet.io/dashboard
  2. Click on the tab Masternodes then select My masternodes
  3. You are able to see their status, if it is :
  • green : All good, masternode running
  • orange : Masternode requires user intervention
  • red : Masternode is initializing, please wait

If your masternode should encounter issue, you will receive an email notification letting you know.

About initialization on the cloud

First of all, when you create a masternode on the cloud, it can take up to 30 hours before your masternode status turn orange.

Please follow the step on the How to start staking section, to launch your masternode.

Refer to the troubleshooting section before asking for support. Some answers there may help you.

NOTE: IF YOU RECEIVE A DM ON TELEGRAM OR DISCORD IT’S A SCAMMER, TEAM MEMBERS WILL NEVER MESSAGE YOU FIRST.

For Stakenet Cloud queries send an email to support@stakenet.io

How to start staking

When the icon turns orange, you can launch your wallet locally, go to Masternode tab, select the masternode corresponding IP as the one in the cloud, and click on start alias.

As you see on the picture, the Status will turn PRE_ENABLED. It can take up to 30 minutes before your synchronization is done, after that you should see your masternode running with the status ENABLED

Initialization troubleshooting

My icon is still red on the cloud what should i do ?

There are a few reasons could be the problem:

  • First, it can take up to 30 hours before your masternode get initialized in the cloud. So don’t panic before this timeframe. If after 30 hours your masternode is still in red status, you can seek help in the discord or write an email to support@stakenet.io and they will take a look.
  • Second, you need to be sure to have the 15k XSN on your legacy address, and the 150 XSN needed for the hosting fee. If you don’t have them, the masternode will not start.

How to check if my masternode has the 15k XSN on the legacy address ?

  • Open your local wallet and navigate to your masternode tab, and copy the payee adress (the legacy, starting with an X)
  • Head to https://xsnexplorer.io and paste it in the search bar, click find, you will see the current balance.

The status on my cloud is showing green, but on my local wallet the status is not ENABLED

  • Always trust the cloud instead of your local wallet, if your cloud says it’s running, it’s running.
  • If you see a difference between your cloud and your local wallet, you could flush your local wallet cache.
    To do so :
    Tools -> Wallet repairs -> click on Flush mncache

I bought two masternodes, i’ve set them up with many hours difference, and the first one status is still red, but the last one is green, why ?

  • It’s depending the datacenter which your masternode is hosted, some datacenter can take longer to sync the first initialization. Be aware that doesn’t affect the staking, but only the initialization.

Notification when your masternode status change

If your masternode should encounter an issue, you will receive an email notification letting you know.

6. How to restore a wallet

If you encountered a problem with your pc, and you wish to restore your wallet, this section is all about it.

  1. Close your fresh wallet installation if it’s open.
  2. Open a file explorer and navigate to the wallet installation location (default is %appdata%/xsncore/wallets)
  3. Take your wallet.dat file you stored in your usb stick, and drop it in the file explorer windows you opened on step 2.
  4. Open your wallet and let it sync
  5. Your funds should be there now.
  6. If you restored your wallet and you can’t see your funds, try the following :
  • Tools -> Wallet repair -> and click on Recover transactions 2.
  • This will look all the address in your wallet and search the blockchain for any relevant transaction that have your addresses.

Join us on Discord and follow us on Twitter to stay up-to-date with our latest news and developments.

Special thanks to Stakenet community member Sadhill for contributing to this article.