Modden – How To Setup Wallet And Master Nodes

This guide was done on an Ubuntu 20.04 VPS server and Mac Desktop but should be adaptable to other versions of Linux and Desktops.

RackNerd Linux VPS Specials (It’s hard to beat RackNerd’s prices)
768MB, 1CPU, 10GB SSD 11.88/year
1.2GB, 1CPU, 16GB SSD $14.88/year
2GB, 2CPU, 25GB SSD $20.98/year


Mac Wallet Setup

Download Wallet https://github.com/ModdenBF/Modden/releases/download/v3.0.0.0/Modden-Mac.zip
Install Modden Core Wallet
Open Modden Core from Applications
The wallet will automatically start syncing to the blockchain.

It’s recommend to set a password on the wallet, you can click the unlocked lock icon in the upper right. Make sure you write this password down somewhere safe as it is not recoverable.

The Modden Core wallet will close after this, you will need to reopen it.
Click the lock to unlock the wallet, you can also click on “Staking Only” to stake from your wallet while it’s locked.

Note: You must keep your computer running 24/7 with the wallet open to receive all of your staking rewards. If you cannot do this or don't have a reliable internet connection then you should stake your coins on a VPS or with a staking provider like https://investing.moneybyte.org/pos-staking/. I recommend a Linux VPS for full control, see below.

Click “Receive” on the left. This will show your default wallet address, you can send MDDN here.

Mac Wallet Backup

Backup the directory “~/Library/Application\ Support/Modden”
The wallet also makes it’s own backups in “~/Library/Application\ Support/Modden/backups” in case anything gets corrupt you have multiple versions.


Mac Wallet Masternode Setup

Click “MASTER NODES” button in left column

Click “Create Masternode Controller” button
Click Next
Set Masternode Name and click Next button
Enter your Masternode IP address

Click “RECEIVE” button in left column

Click “My Addresses” on right
Select the Masternode name you created above
Copy the Modden address to clipboard

Click “SEND” button in left column

Paste the Modden address of Masternode into “MDDN address or contact label”. Your Masternode name should appear in the “Address label”.
Enter 12000 MDDN as collateral for the Masternode.
Then click “SEND” button.
You have to wait for 15 confirmations after sending the collateral.
Click “Debug Console” button in upper right

In Console Input enter “getmasternodeoutputs”
Copy the txhash and outputidx
In Console Input enter “createmasternodekey”
Copy the key

Click the masternode.conf icon in the top right

Enter the Masternode Information in the text editor that pops up. Make sure there are no blank lines at the end of the file.
Example> alias IP:port masternodeprivkey collateral_output_txid collateral_output_index

modden01 1.1.1.1:8668 9kTURvAv64YT3rb2oa208QMygoqLGdicbdy9ekhRosnvFdRwbjw hd9256fv36b40500ccfc9263dc4f1e8204d86c0a8rb54bef8ac8a0ad27a97af0 1


Linux Staking Setup

Setup a VPS – We recommend RackNerds (See top of article for specials)

ssh root@YourIPAddress

Warning: Linux creates a history by default of everything you do on the command line. To make sure your command line history is not saved run the following command. It will help ensure that your password you setup next for encryption is not exposed, in case your server is compromised.

unset HISTFILE

This installs wget, downloads modden archive from GitHub https://github.com/ModdenBF/Modden/releases, uncompresses archive, and starts daemon service.

apt install wget
mkdir modden
cd modden
wget https://github.com/ModdenBF/Modden/releases/download/v3.0.0.0/Modden-Linux.tar.gz
tar zxvpf Modden-Linux.tar.gz
./moddend -daemon -service

Once the daemon is started it will start syncing the blockchain. You can check progress with “tail -f ~/.modden/debug.log”.

Encrypt your wallet with a password (Note: Write it down in a safe place, you cannot recover it.)

./modden-cli encryptwallet "YourPasswordHere"

This will stop the moddend daemon. So you need to restart it.

./moddend -daemon -service

Unlock your wallet for staking (Note: You need to unlock the wallet for staking anytime you restart moddend)

./modden-cli walletpassphrase "YourPasswordHere" 0 true

Get new wallet address, then copy this address and send the amount you want to stake to it.
stakingwallet = AnyNameYouWant

./modden-cli getnewaddress stakingwallet

Lookup receive address for later

./modden-cli getaddressesbylabel stakingwallet

Get wallet info: Shows wallet balance, unconfirmed balance and more

./modden-cli getwalletinfo

Unlock wallet for 5 mins and send a transaction

./modden-cli walletpassphrase "YourPasswordHere" 300
./modden-cli sendtoaddress MCashKQV4ioydMxXrHdGECc6hM9gviihqj 0.5 "Transfer to Mac wallet"


Linux Master Node Setup

Install Modden just like shown above in “Linux Staking Setup”.
You will need the masternode private key that you created with “createmasternodekey” in the Debug section of the Mac (desktop) Wallet.
Edit the file “nano ~/.modden/modden.conf” and add the following to the end of the file, update with your IP address and master node private key.

masternode=1
externalip=1.1.1.1
masternodeaddr=1.1.1.1:8668
masternodeprivkey=9HFUVvAv74YT2rF2oa2f8rMYtoqLRdic4dy9efhrwsn4FdRwtPL

Restart the moddend daemon. This command looks for the moddend daemon and issues the kill command to the process.

kill `ps ax | grep moddend | grep -v grep | awk -F" " '{print $1}'`

Then start the daemon.

./moddend -daemon -service

Make sure you unlock for staking if you are also using the VPS to stake with. (It’s recommended to use a second VPS or computer for staking to be the most secure.)

./modden-cli walletpassphrase "YourPasswordHere" 0 true

Check if everything is working, if there isn’t any configuration errors, you should see “Active Masternode not initialized.”.

./modden-cli getmasternodestatus

Start The Master Node

Go back to the Mac Modden Core Desktop Wallet

Click “MASTER NODES” button in left column

Click on the ellipsis (three vertical dots) to the left of the master node that you created earlier. And click “Start”.
If everything is good the master node should start, if not you might get an error at the bottom.


Master Node Collateral Change

Check the Reward Table below to see when Collateral needs to be upped.
Backup the directory “~/Library/Application\ Support/Modden”

Click “SEND” button in left column

Click “Coin Control” on the right

Right click on the masternode and click “Unlock unspent”. After a 100 confirmations the coins will be back in your wallet.

Once the coins are back in your wallet (100 confirmations), or if you already have enough collateral, send the new required collateral to your masternode wallet like you did when you originally setup the master node. See, “Mac Wallet Masternode Setup” above.

Now go back to the Debug console in the Wallet top right and get the masternode outputs.

In Console Input enter “getmasternodeoutputs”
Copy the txhash and outputidx

Click the masternode.conf icon in the top right and update the transaction hash and output id.
Node name + [IP] + key + txhash + outputidx
Make sure there are not any extra lines at the end and save the masternode.conf file.
Now you have to restart your Masternode and Desktop wallet.

On Linux VPS

Restart the moddend daemon. This command looks for the moddend daemon and issues the kill command to the process.

kill `ps ax | grep moddend | grep -v grep | awk -F" " '{print $1}'`

Then start the daemon.

./moddend -daemon -service

Unlock your wallet for staking (Note: You need to unlock the wallet for staking anytime you restart moddend)

./modden-cli walletpassphrase "YourPasswordHere" 0 true
./moddend getmasternodestatus

On Mac Modden Wallet

Note: You have to wait for 15 confirmations from when you sent the collateral to start your master node.
Go back to the Mac Modden Core Desktop Wallet

Click “MASTER NODES” button in left column

Click on the ellipsis (three vertical dots) to the right of the master node that you created earlier. And click “Start”.
If everything is good the master node should start, if not you might get an error at the bottom.


Modden Nagios Plugin

This is a Nagios plugin that we created to monitor that our Staking Wallet staking status is true. And that our Master Nodes are successfully in a started state.
Feel free to use it or adapt it to your needs.

Download Modden Nagios Plugin

################################################

# Setup Nagios Server NRPE checks
# Edit your server config file and add new service(s)
nano /etc/nagios/servers/server.cfg

# Modden Staking Service    
define service {
    use                        generic-service
    host_name                  YourServerHostname
    service_description        Check Modden Staking
    check_command              check_nrpe!check_modden_staking
}

# Modden Master Node Service
define service {
    use                        generic-service
    host_name                  YourServerHostname
    service_description        Check Modden Master Node
    check_command              check_nrpe!check_modden_masternode
}

# Restart Nagios
systemctl restart nagios

################################################

# Setup Nagios Client NRPE checks
nano /etc/nagios/nrpe.cfg

# Modden Staking Service
command[check_modden_staking]=/usr/lib/nagios/plugins/check_modden -s

# Modden Master Node Service
command[check_modden_masternode]=/usr/lib/nagios/plugins/check_modden -m

# Restart Nagios NRPE
systemctl restart nagios-nrpe-server


Modden Links

Where To Buy
Documents
Reward Table

Command Line Commands

== Blockchain ==
findserial "serial"
getbestblockhash
getblock "hash" ( verbose )
getblockchaininfo
getblockcount
getblockhash index
getblockheader "hash" ( verbose )
getblockindexstats height range ( fFeeOnly )
getburnaddresses ( withvalues )
getchaintips
getdifficulty
getfeeinfo blocks
getmempoolinfo
getrawmempool ( verbose )
getserials height range ( fVerbose )
gettxout "txid" n ( includemempool )
gettxoutsetinfo
verifychain ( numblocks )

== Control ==
getinfo
help ( "command" )
stop

== Generating ==
generate numblocks
getgenerate
gethashespersec
setgenerate generate ( genproclimit )

== Mining ==
getblocktemplate ( "jsonrequestobject" )
getmininginfo
getnetworkhashps ( blocks height )
prioritisetransaction <txid> <priority delta> <fee delta>
submitblock "hexdata" ( "jsonparametersobject" )

== Modden ==
checkbudgets
createmasternodebroadcast "command" ( "alias")
createmasternodekey
decodemasternodebroadcast "hexstring"
getbudgetinfo ( "proposal" )
getbudgetprojection
getbudgetvotes "proposal-name"
getmasternodecount
getmasternodeoutputs
getmasternodescores ( blocks )
getmasternodestatus
getmasternodewinners ( blocks "filter" )
getnextsuperblock
listmasternodeconf ( "filter" )
listmasternodes ( "filter" )
masternodecurrent
mnbudgetrawvote "masternode-tx-hash" masternode-tx-index "proposal-hash" yes|no time "vote-sig"
mnbudgetvote "local|many|alias" "votehash" "yes|no" ( "alias" )
mnfinalbudget "command"... ( "passphrase" )
mnsync "status|reset"
preparebudget "proposal-name" "url" payment-count block-start "MDDN-address" monthy-payment
relaymasternodebroadcast "hexstring"
spork "name" ( value )
startmasternode "local|all|many|missing|disabled|alias" lockwallet ( "alias" )
submitbudget "proposal-name" "url" payment-count block-start "MDDN-address" monthly-payment "fee-tx"

== Network ==
addnode "node" "add|remove|onetry"
clearbanned
disconnectnode "node" 
getaddednodeinfo dummy ( "node" )
getconnectioncount
getnettotals
getnetworkinfo
getpeerinfo
listbanned
ping
setban "ip(/netmask)" "add|remove" (bantime) (absolute)

== Rawtransactions ==
createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...} ( locktime )
decoderawtransaction "hexstring"
decodescript "hex"
fundrawtransaction "hexstring" ( options )
getrawtransaction "txid" ( verbose "blockhash" )
sendrawtransaction "hexstring" ( allowhighfees )
signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )

== Util ==
createmultisig nrequired ["key",...]
estimatefee nblocks
estimatesmartfee nblocks
logging [include,...] <exclude>
validateaddress "MDDNaddress"
verifymessage "MDDNaddress" "signature" "message"

== Wallet ==
abandontransaction "txid"
addmultisigaddress nrequired ["key",...] ( "label" )
autocombinerewards enable ( threshold )
backupwallet "destination"
bip38decrypt "moddenaddress" "passphrase"
bip38encrypt "moddenaddress" "passphrase"
dumpprivkey "moddenaddress"
dumpwallet "filename"
encryptwallet "passphrase"
getaccount (Deprecated, will be removed in v5.0. To use this command, start moddend with -deprecatedrpc=accounts)
getaccountaddress (Deprecated, will be removed in v5.0. To use this command, start moddend with -deprecatedrpc=accounts)
getaddressesbyaccount (Deprecated, will be removed in v5.0. To use this command, start moddend with -deprecatedrpc=accounts)
getaddressesbylabel "label"
getaddressinfo ( "address" )
getbalance ( "account" minconf includeWatchonly )
getnewaddress ( "label" )
getrawchangeaddress
getreceivedbylabel "label" ( minconf )
getreceivedbyaddress "MDDNaddress" ( minconf )
getstakesplitthreshold
getstakingstatus
gettransaction "txid" ( includeWatchonly )
getunconfirmedbalance
getwalletinfo
importaddress "script" ( "label" rescan )
importprivkey "moddenprivkey" ( "label" rescan fStakingAddress )
importpubkey "pubkey" ( "label" rescan )
importwallet "filename"
keypoolrefill ( newsize )
listaccounts (Deprecated, will be removed in v5.0. To use this command, start moddend with -deprecatedrpc=accounts)
listaddressgroupings
listlabels ( "purpose" )
listlockunspent
listreceivedbylabel ( minconf includeempty includeWatchonly)
listreceivedbyaddress ( minconf includeempty includeWatchonly addressFilter)
listsinceblock ( "blockhash" target-confirmations includeWatchonly)
listtransactions ( "dummy" count from includeWatchonly )
listunspent ( minconf maxconf  ["address",...] watchonlyconfig )
lockunspent unlock [{"txid":"txid","vout":n},...]
move (Deprecated, will be removed in v5.0. To use this command, start moddend with -deprecatedrpc=accounts)
Multisend is disabled in this wallet version
sendfrom (Deprecated, will be removed in v5.0. To use this command, start moddend with -deprecatedrpc=accounts)
sendmany "" {"address":amount,...} ( minconf "comment" )
sendtoaddress "MDDNaddress" amount ( "comment" "comment-to" )
setlabel "MDDNaddress" "label"
sethdseed ( newkeypool "seed" )
setstakesplitthreshold value
settxfee amount
signmessage "MDDNaddress" "message"
upgradewallet

== Zerocoin ==
createrawzerocoinspend mint_input ( "address" )
dzMDDNstate
exportzerocoins include_spent ( denomination )
generatemintlist
getarchivedzerocoin
getspentzerocoinamount hexstring index
getzerocoinbalance
getzMDDNseed
importzerocoins importdata 
listmintedzerocoins (fVerbose) (fMatureOnly)
listspentzerocoins
listzerocoinamounts
mintzerocoin amount ( utxos )
reconsiderzerocoins
resetmintzerocoin ( fullscan )
resetspentzerocoin
searchdzMDDN
setzMDDNseed "seed"
spendrawzerocoin "serialHex" denom "randomnessHex" "priv key" ( "address" "mintTxId" )
spendzerocoin amount ( "address" )
spendzerocoinmints mints_list ( "address" ) 

Note: Everything in this article was setup for the documentation. None of the wallet addresses or transaction ID’s are in use.

Previous Post: Orbiter.Finance Layer 2 Bridge

August 20, 2022 - In Bridges

Next Post: Decentralized VPN – How To Setup Mysterium VPN

September 8, 2022 - In Tools