-
Notifications
You must be signed in to change notification settings - Fork 10
Masternode Hot Wallet Setup
This guide covers the setup of a single masternode on a Linux system. To compile and run RACE on linux please see the building guide.
Requirements:
- 1.000 RACE
- Masternode Server (VPS, online 24/7)
- Unique IPv4 address
Startup raced
with default settings and wait for it to sync. To verify that it has also fully synced check the output of race-cli mnsync status
:
~# race-cli mnsync status
{
"AssetID": 999,
"AssetName": "MASTERNODE_SYNC_FINISHED",
"Attempt": 0,
"IsBlockchainSynced": true,
"IsMasternodeListSynced": true,
"IsWinnersListSynced": true,
"IsSynced": true,
"IsFailed": false
}
Important part here is that "AssetName": "MASTERNODE_SYNC_FINISHED"
. Once the wallet is online and synced you can generate the privatekey:
~# race-cli masternode genkey
7duYOUR_MASTERNODE_PRIVATE_KEY
Now we need to find out the wallet address of the node:
~# race-cli getaccountaddress ""
RdeDRACE_WALLET_ADDRESS
Please check before you send that the receiving wallet will receive 1000 RACE and the sending wallet is paying the transaction fees.
On the masternode wallet you can verify that it is receiving your 1000 RACE
~# race-cli listtransactions ""
[
{
"account": "",
"address": "RdeDRACE_WALLET_ADDRESS",
"category": "receive",
"amount": 1000.00000000,
"label": "",
"vout": 1,
"confirmations": 4,
"instantlock": false,
"blockhash": "00000000001d9f6b5683014125d46998dxe8a1b28bd9691171468ab4b46c876f",
"blockindex": 1,
"blocktime": 1517177836,
"txid": "f5d4ec12b6ab68977eed84913255ea6685110e5f781e5e525a12bc2fd1c6b9d",
"walletconflicts": [
],
"time": 1517577850,
"timereceived": 1517577850,
"bip125-replaceable": "no"
}
]
Wait for the transaction to have at least 15 confirmations. See confirmations above ("confirmations": 4,
in example).
Interesting parts are the txid and the vout, we can get those easily by running masternode outputs
.
txid
is the first part (f5d40c12b6ab68977eed84913255ea6685110e5f781e5e525a12bc2fd1c6b9d
), and vout
the second part (1
) of the output.
~# race-cli masternode outputs
{
"f5d4ec12b6ab68977eed84913255ea6685110e5f781e5e525a12bc2fd1c6b9d": "1"
}
We need to edit two files for our masternode - race.conf
and masternode.conf
. Both are located in the .racecore
folder.
masternodeprivkey
is the key from step 2
45.XX.XX.XX
represents the external IP address of your wallet server and needs to be adopted
transactionid
is the transaction id from step 7
vout
is the vout from step 7
alias
a (for you) unique alias to identify your masternode. We use mn1
here.
Below are listed the important options for both files:
~# cat ~/.racecore/race.conf
masternode=1
masternodeprivkey=7duYOUR_MASTERNODE_PRIVATE_KEY
externalip=45.XX.XX.XX
~# cat ~/.racecore/masternode.conf
# Masternode config file
# Format: alias IP:port masternodeprivkey collateral_output_txid collateral_output_index
# Example: mn1 127.0.0.2:19701 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0
mn1 45.XX.XX.XX:8800 7duYOUR_MASTERNODE_PRIVATE_KEY f5d4ec12b6ab68977eed84913255ea6685110e5f781e5e525a12bc2fd1c6b9d 1
Last thing after you have edited both files is to just restart your masternode:
~# race-cli stop
~# raced
Sentinel is a watchdog script based on python which is required and keeps your masternode health. Sentinel for a RACE Masternode can be found here: https://github.com/racecrypto/sentinel
To verify that your masternode is started issue the following command. After a fresh startup it can take ~5 minutes until masternode is sycned and started.
~# race-cli masternode status
{
"vin": "CTxIn(COutPoint(f5d4ec12b6ab68977eed84913255ea6685110e5f781e5e525a12bc2fd1c6b9d, 1), scriptSig=)",
"service": "45.XX.XX.XX:8800",
"payee": "RdeDRACE_WALLET_ADDRESS",
"status": "Masternode successfully started"
}