Note: To start a Pastel Masternode, you must own at least five million (5,000,000) PSL coins!
9933
ufw
- check if ufw is enabled by runningsudo ufw status
Active
- allow port 9933
sudo ufw allow 9933
mkdir -p ~/pastel
wget https://github.com/pastelnetwork/pastel/releases/download/v1.0-rc5.1/pastel-ubuntu20.04-rc5.1.tar.gz
tar -xf pastel-ubuntu20.04-rc5.1.tar.gz -C ~/pastel
cd ~/pastel
ls
-rwxr-xr-x fetch-params.sh
-rwxrwxr-x pastel-cli
-rw-r----- pastel.conf
-rwxrwxr-x pasteld
-rwxr-xr-x start-mn.sh
-rwxr-xr-x start-node.sh
chmod 755 *.sh
equihash
parameters. Note: it might take a while - make sure to wait until it is done:./fetch-params.sh
If this script fails for some reason(unmatched checksum, file not existing, etc), all the param files(5 in total) can be downloaded using wget
:
mkdir -p ~/.pastel-params && cd ~/.pastel-params
wget https://download.pastel.network/pastel-params/sapling-output.params
wget https://download.pastel.network/pastel-params/sapling-spend.params
wget https://download.pastel.network/pastel-params/sprout-groth16.params
wget https://download.pastel.network/pastel-params/sprout-proving.key
wget https://download.pastel.network/pastel-params/sprout-verifying.key
mkdir -p ~/.pastel
nano pastel.conf
rpcuser
and rpcpassword
as follows:server=1
listen=1
rpcuser=rt
rpcpassword=rt
pastel.conf
into the data directory:cp pastel.conf ~/.pastel
./start-node.sh
The content of the
start-node.sh
script:#!/bin/bash IP=$(curl ipinfo.io/ip) ./pastel/src/pasteld -txindex=1 -reindex -externalip=$IP
For quick testing you can omit
txindex=1
and-reindex
If you know your external (WAN) IP you can run node using direct command:
./pastel/src/pasteld -externalip=<Your-WAN-IP>
Note: The script starts cNode in daemon mode, without console output; if you want to see the console output, edit start-node.sh to remove the -daemon key from the command line.
When the cNode is running in daemon
mode, you can check its status using the pastel-cli utility as follows:
./pastel-cli getinfo
{
"version": 2000101,
"protocolversion": 170008,
"walletversion": 60000,
"balance": 0,
"blocks": 12000,
"timeoffset": -1,
"connections": 14,
"proxy": "",
"difficulty": 12.77377935873696,
"testnet": false,
"keypoololdest": 1611682155,
"keypoolsize": 101,
"paytxfee": 0.00000,
"relayfee": 0.00100,
"errors": ""
}
./pastel-cli addnode 13.59.218.7 add
./pastel-cli addnode 13.59.218.7 onetry
Give it some time to connect to the other nodes and start synchronizing the blockchain.
Run it for a while to get synchronized (you can check the current network height at the Pastel explorer website.)
To check if the Masternode information is synchronized with the network, you can run:
./pastel-cli mnsync status
{
"AssetID": 999,
"AssetName": "Finished",
"AssetStartTime": <some-number>,
"Attempt": 0,
"IsBlockchainSynced": true,
"IsMasternodeListSynced": true,
"IsWinnersListSynced": true,
"IsSynced": true,
"IsFailed": false
}
AssetName
is stuck on Initial, try to reset with the mnsync reset command as follows:./pastel-cli mnsync reset
./pastel-cli mnsync status
{
"AssetID": 999,
"AssetName": "Finished",
"AssetStartTime": <some-number>,
"Attempt": 0,
"IsBlockchainSynced": true,
"IsMasternodeListSynced": true,
"IsWinnersListSynced": true,
"IsSynced": true,
"IsFailed": false
}
./pastel-cli getnewaddress
<new PSL address>
./pastel-cli dumpprivkey <new PSL address>
<private key of new PSL address>
The so-called “Hot/Cold” wallet approach is the RECOMMENDED and most secure way of running a Masternode!
The Hot/Cold method requires that you run 2 nodes:
Hot node
- the actual Masternode node that is always on-lineCold node
- the Pastel Core node, that has an address with collateral amount in its wallet and which is only available briefly online to activate the Masternode on the Hot node; after that, it is kept powered down for security (a computer not connected to the internet is much more secure than one available online).Assuming you already started the first Pastel Core node as described in the previous section, this node will act as the Hot node
.
Now, start another Pastel Core node following the instructions from the previous section; this node will act as the Cold node
:
Cold node
in a more secure location, such as your home computer.Cold node
can be started in the cloud, for security reasons, you will have to shut it down after using it to activate your Masternode(s).Note: Multiple
Hot nodes
can be started simultaneously from a singleCold node
.
Hot node
and the Cold node
are started, synchronized, and operational, you must perform the following steps to activate the Masternode on the Pastel Network:Send exactly 5,000,000 PSL coins to the PSL address generated on the Cold node
(i.e., the address that you generated at the end of steps to start Pastel Core node) from the wallet where you store your PSL coins. These coins will act as Collateral Address
for your future Masternode.
Note: Remember to save the transaction ID string that results from sending your 5,000,000 PSL coins to the Collateral Address!
Send some amount of PSL coins (at least 1,000 PSL) to the PSL address generated on the Hot node
from the wallet where you store your PSL coins. These PSL coins will be used to pay for the fees associated with setting up a Masternode on the network.
./pastel-cli masternode genkey
<masternode private key>
./pastel-cli stop
start_mn.sh
script to set up the new masternode-private-key
:#!/bin/bash
IP=$(curl ipinfo.io/ip)
PKEY=<masternode private key> # <----- HERE!!!!
echo \"External IP = \"$IP
echo \"Private Key = \"$PKEY
./pasteld -masternode -txindex=1 -reindex -masternodeprivkey=$PKEY -externalip=$IP -daemon
Now save the edited script and exit the editor.
Now you can finally start the Pastel Core node in Masternode Mode:
./start-mn.sh
pastel-cli mnsync
command as explained in the first section:./pastel-cli mnsync status
mnsync status
returns “Finished”, check the Masternode’s status like this:./pastel-cli masternode status
Note: This command should result in the message " “Not capable masternode: Masternode not in masternode list”.
Anything else means that a problem was encountered!
./pastel-cli pastelid newkey <passphrase-that-is-hard-to-guess>
{
"pastelid": "<masternode pastelid>"
}
./pastel-cli tickets register mnid pastelid <passphrase-that-is-hard-to-guess>
{
TB-ADDED
}
txid
and output index
of the PSL transaction that sent the 5,000,000 PSL to the Collateral Address
in the list of available Masternode outputs, which are precisely those with exactly 5,000,000 coins in them:./pastel-cli masternode outputs
./pastel-cli stop
/~.pastel/masternode.conf
file:{
"mnZ – you can change it": {
"mnAddress": "<external IP address of HOT(!!!) node>:19933",
"mnPrivKey": "<masternode private key generated before on the HOT(!!!) node>",
"txid": "<collateral txid>",
"outIndex": "<collateral txid output index>",
"extAddress": "<external IP address of HOT(!!!) node>:4444",
"extCfg": null,
"extKey": "<masternode pastelid>"
}
}
Cold node
again, use this command:./start-node.sh
./pastel-cli mnsync status
Hot node
as a Masternode as follows:./pastel-cli masternode start-alias "<name of your MN in masternode.conf>"
PRE_ENABLED
state:./pastel-cli masternode list
ENABLED
state. If so, congratulations! Your Pastel Core is running in the Masternode mode!Finally, shut down your
Cold Node
to keep it secure.