Links

SuperNode

This guide will walk you through the process of setting up a Pastel Supernode in HOT/COLD mode on two hosts, even if you are not a technical person. Just follow the step-by-step instructions below.

Cold/Hot Strategy

A 5 million PSL stake is required to operate a SuperNode. In order to avoid anything happening to that 5 million PSL, the recommended strategy is to keep these funds on the node that is turned off and in a more secure location than on a publicly accessible server. Thus, we use two SuperNode installations:
  • One cold node where the 5 million PSL stays, that is only on for a brief activation window and then disconnected
  • One hot node that actually operates on the network, but doesn't have 5 million PSL in its wallet
In order for this to occur, the cold node must vouch for the hot node, indicating that the owner of the hot node has properly staked 5 million PSL.

Prerequisites

  • Two nodes (computers)
    • HOT node - this can be cloud instance on some cloud provider. This host MUST have - Ubuntu 22.04 installed
    • COLD node - more secure located computer - local laptop or desktop is recommended, but still can be cloud instance that will be shutdown after SuperNode on HOT node set, initialized and started. This host can be Windows, MacOS or Ubuntu 22.04
  • 5,000,000 PSL that will be used as collateral in some outside wallet

Step 1: Set up the local (COLD) node

As with node installation in the quick start guide, pastelup is the best method for SuperNode installation.
NOTE: All commands should be executed on the COLD node!

1. Download the pastel up

wget https://download.pastel.network/beta/pastelup/pastelup-darwin-amd64

2. Install the Pastel node

./pastelup install node -r latest
This method will also work if you already had node installed as in the quick start guide. A prompt will ask if you'd like to continue installation to the same directory, select yes and wait for installation to complete.

4. Start the local node and wait for it to fully sync with the Pastel network

./pastelup start node

5. Check the sync status of the node

Windows:
~/Applications/PastelWallet/pastel-cli mnsync status
MacOS:
%userprofile%\AppData\Roaming\PastelWallet\pastel-cli mnsync status
Linux:
~/pastel/pastel-cli mnsync status

Step 2: Install and initialize Supernode on the remote (HOT) host

NOTE: All commands should be executed on the COLD node!

1. Install the Supernode on HOT node

Replace the placeholders with the appropriate values!
./pastelup install supernode remote -r latest --ssh-ip <IP_ADDRESS_OF_HOT_NODE> --ssh-user <SSH_USER_OF_HOT_NODE> --ssh-key <PATH_TO_HOT_NODE_SSH_PRIVATE_KEY_FILE>

2. Initialize the Supernode on HOT node

Replace the placeholders with the appropriate values!
./pastelup init supernode coldhot --new --name <SN_name> --ssh-ip <IP_ADDRESS_OF_HOT_NODE> --ssh-user <SSH_USER_OF_HOT_NODE> --ssh-key <PATH_TO_HOT_NODE_SSH_PRIVATE_KEY_FILE>
During initialization, you will be prompted to either search for an existing collateral transaction or create a new address and send PLS (mainnet) or LSP (testnet) to it. You will also need to provide a passphrase for the new PastelID.
WRITE DOWN PASSPHRASE YOU ENTERD HERE! (<PASSPHRASE>)
You won't be able to recover it later!!!

3. Activate the SuperNode

NOTE: All commands should be executed on the COLD node!
Replace the placeholders with the appropriate values!
Windows:
%userprofile%\AppData\Roaming\PastelWallet\pastel-cli masternode start-alias <SN_name>
MacOS:
~/Applications/PastelWallet/pastel-cli masternode start-alias <SN_name>
Linux:
./pastel-cli masternode start-alias <SN_name>

Step 3: Register PastelID

NOTE: All commands should be executed on the HOT node!

1. SSH to your HOT node:

Replace the placeholders with the appropriate values!
ssh <SSH_USER_OF_HOT_NODE>@<IP_ADDRESS_OF_HOT_NODE> -i <PATH_TO_HOT_NODE_SSH_PRIVATE_KEY_FILE>

2. Check masternode status and find PastelID

./pastel/pastel-cli masternode status
./pastel/pastel-cli pastelid list
Status should be something like that:
{
"outpoint": "0000000000000000000000000000000000000000000000000000000000000000-0",
"service": "<IP_ADDRESS_OF_HOT_NODE>:9933",
"status": "Not capable masternode: Masternode not in masternode list"
}
And PastelID list:
[
{
"PastelID": "<YOUR_SN_PASTELID>",
"legRoastKey": "..."
}
]
Remember, or better write down your SuperNodes PastelID

3. Check balance on the SuperNode

Next you will have to register PastelID in the blockchain. That requires some available funds (slightly more then 1000PSL - we recommend at least 2000PSL) in the SuperNode wallet.
Check balance:
./pastel/pastel-cli getbalance
If that returns 0 or anything less then 200PSL, you will need to generate new address and send some coins to it from your other walet.
./pastel/pastel-cli getnewaddress
Remember, or better write down your address (<ADDRESS>)
Send some coins to that address from another host with balance
Wait until coins get available, checking periodically with getbalance command.

4. Register pastelid

After funds get avaialiable, run the following command
Replace the placeholders with the appropriate values!
./pastel/pastel-cli tickets register mnid <YOUR_SN_PASTELID> <PASSPHRASE> <ADDRESS>
Check status again:
./pastel/pastel-cli masternode status
This time it should be something like that:
{
"outpoint": "...",
"service": "<IP_ADDRESS_OF_HOT_NODE>:9933",
"payee": "...",
"extAddress": "<IP_ADDRESS_OF_HOT_NODE>:4444",
"extP2P": "<IP_ADDRESS_OF_HOT_NODE>:4445",
"extKey": "<YOUR_SN_PASTELID>",
"extCfg": "",
"alias": "<SN_name>",
"status": "Masternode successfully started"
}
Youy can exit your SSH session to HOT node after that. You SuperNodes is running!

Step 4: Set up the SuperNode as a service

NOTE: All commands should be executed on the COLD node!
To simplify management of SuperNode it is recommended to set it up as systems service. Follow the steps to do that

1. Stop SuperNode

Before setting up SuperNode's applications as systemd services, you first need to stop them
./pastelup-darwin-amd64 stop supernode remote --ssh-ip <IP_ADDRESS_OF_HOT_NODE> --ssh-user <SSH_USER_OF_HOT_NODE> --ssh-key <PATH_TO_HOT_NODE_SSH_PRIVATE_KEY_FILE>

2. Set as service

./pastelup-darwin-amd64 update install-service remote --solution supernode --autostart --ssh-ip <IP_ADDRESS_OF_HOT_NODE> --ssh-user <SSH_USER_OF_HOT_NODE> --ssh-key <PATH_TO_HOT_NODE_SSH_PRIVATE_KEY_FILE>

3. Start SN again, this time as services

TIP: Instead of this command, you can add flag --start to the previous one
./pastelup-darwin-amd64 start supernode remote --ssh-ip <IP_ADDRESS_OF_HOT_NODE> --ssh-user <SSH_USER_OF_HOT_NODE> --ssh-key <PATH_TO_HOT_NODE_SSH_PRIVATE_KEY_FILE>