Technical Guide to Create Mining Masternodes in Ubuntu (Linux) with Matrix AI Network

  • 16 GB of RAM (or more)
  • Approximately 500 GB of disk space per Masternode (anticipating large storage space as it keeps increasing with time)
  • At least 1MB/s internet bandwidth per MasterNode
  • To launch a Validation Masternode (used for pools), you must stake at least 100,000 MAN.
  • Each Masternode must have 2 Wallets A and B associated with it (which you will therefore need to create).
    Wallet B will be configured on the machine and will serve as a secure bridge to wallet A where your staking will be located and where you will also receive your MAN rewards.
  • There are two types of rewards generated:
    - Staking rewards
    - Mining rewards
    Both types of rewards will be sent to Wallet A of each node.
    However the staking rewards will remain locked as long as the staking is also locked, while mining rewards will be available and transferable at all times.
  • Synchronizations with the blockchain are particularly long.
    We will use a file called “snapshot” so that we don’t have to synchronize everything from scratch.

Steps to synchronize a first Masternode

1. Download the latest snapshot, at the time of this article, it is this one, taken at block 5,900,000: https://www.matrix.io/assets/dropdown/TrieData5900000.tgz

git clone https://github.com/MatrixAINetwork/go-matrix.git masternode
cd masternode
wget https://github.com/MatrixAINetwork/GMAN_CLIENT/raw/master/MAINNET/20200520/linux/gman
chmod 775 gman && mkdir chaindata && mkdir chaindata/keystore
mv man.json chaindata && cp -R picstore chaindata/
[ { 
“Address”:””,
“Password”:””
} ]
./gman -datadir chaindata init MANGenesis.json && ./gman -datadir ./chaindata aes -aesin ./signAccount.json -aesout entrust.json
./gman --datadir ./chaindata --networkid 1  --debug --verbosity 3 --port 5101 --manAddress MANADDRESS --entrust ./entrust.json --gcmode archive --outputinfo 1 --syncmode full --loadsnapfile "TrieData5900000"
./gman --datadir ./chaindata --networkid 1  --debug --verbosity 3 --port 5101 --manAddress MANADDRESS --entrust ./entrust.json --gcmode archive --outputinfo 1 --syncmode full
./gman attach ./chaindata/gman.ipc
man.syncing

Steps for other masternodes

(Assuming that the first one is 100% synchronized, which allows to do the sync only once and then re-use it, rather than waiting for the sync for each node)

mkdir ../../snapchain && rsync -a --progress ../../MiningNode1/masternode/chaindata/gman ../../snapchain
./gman --datadir ./chaindata --networkid 1  --debug --verbosity 3 --port 5101 --manAddress MANADDRESS --entrust ./entrust.json --gcmode archive --outputinfo 1 --syncmode full
rsync -a --progress ../../snapchain/gman chaindata/
./gman --datadir ./chaindata --networkid 1  --debug --verbosity 3 --port 5102 --manAddress MANADDRESS --entrust ./entrust.json --gcmode archive --outputinfo 1 --syncmode full

Check the status and operation of a MasterNode

1. Go to the Terminal corresponding to the MasterNode to check, let’s say Terminal 3 for MasterNode 3.

./gman attach ./chaindata/gman.ipc
man.syncing
  • If the node is not actively being synchronized, it will return “false”.
  • Otherwise it returns several informations such as “currentBlock” and “highestBlock” which correspond respectively to the number of the current block of the Node and the current number of the blockchain. When the 2 match, the node is fully synchronized with the blockchain.
man.blockNumber
admin.peers

Manage your nodes server remotely

The easiest, free and secure way is to use TeamViewer software.

Query your node through its API

For developpers and more complex configurations, the API documentation of a Masternode is available here:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store