Documentchain Masternodes

Masternodes store a copy of the entire blockchain, they are available whenever possible, they manage immediate cash (InstantSend) and they secure the network. In addition to mining, providing a masternode is another way to generate coins.

For the operation of a masternode you need

  • a computer connected to the Internet with a fixed IP throughout. This could be, for example, a shared Virtual Private Server (VPS) with Linux Ubuntu 16.04
  • The DMS wallet, which usually runs on your local PC.
  • 5000 DMS coins as a masternode collateral (see Shared Masternode if you have less coins).

Setting up a Masternode

1. In the wallet software “DMS Core” on your local computer

  • Please select the menu command Tools | Debug console.
  • At the bottom of the text box, please enter masternode genkey and press Enter. You will need the return value later.
    Note: Each masternode requires its own private key.
  • Now enter getaccountaddress MN1 ein. “MN1” is the recommended name for your first masternode. Alternatively, you can also use the address under File | Receiving addresses.
  • Send exactly 5000 DMS to this new address.

Open the Github website and copy the link to the latest Linux release to the clipboard. This will be used at “wget” below.

2. On the VPS

Connect with an SSH client to your Virtual Private Server and enter the following commands into the Linux console:

  • mkdir dms
  • cd dms
  • wget https://github.com/Krekeler/documentchain/releases/download/v0.12.16.0/dmscore-0.12.16-x86_64-linux-gnu.tar.gz (replace the URL with the latest release)
    If a certificate error occurs: apt-get install ca-certificates
  • tar -xzf dmscore-0.12.16-x86_64-linux-gnu.tar.gz
  • rm dmscore-0.12.16-x86_64-linux-gnu.tar.gz
  • ./dmsd -daemon
  • Wait a moment, the data directory ~/.dmscore is created.
  • killall dmsd
  • Check the firewall status: ufw status
  • If you are running a firewall, please open port 41319: ufw allow 41319/tcp

Adapt the configuration file dms.conf. You can freely assign “rpcuser” and “rpcpassword”. “externalip” is the IP of the VPS followed by port 41319. You have previously created “masternodeprivkey” in the local wallet with the genkey command. “addnode” is possible, but not required. The addresses of some masternodes are hard-coded.

Example file:

rpcuser=dmsrpcuser
rpcpassword=MyPassword
rpcallowip=127.0.0.1
server=1
listen=1
daemon=1
maxconnections=125
masternode=1
masternodeprivkey=5VNdUDTqdh…
externalip=123.123.123.123:41319

  • vi ~/.dmscore/dms.conf
    As a template, you can copy the example file to the clipboard. In vi, press i and then right-click to paste from clipboard. Save the file with <Esc>:w<Enter>:q<Enter>. Of course you can also use another editor than vi.
  • ./dmsd -daemon
  • ./dms-cli getinfo to verify that the daemon is running.
  • The daemon is now syncing with the blockchain, which may takes some time. Initially only the headers will be synchronized, you will not see any progress for the first two or three hours. You can enter ./dms-cli mnsync status to get the synchronization status. Proceed immediately with the following instructions.

3. “DMS Core” on your local computer

Go to the Transactions tab page and hover your mouse over the previously created 5000-coin Masternode transfer. A pop-up will show the number of recent confirmations for this payment:

You must wait at least 15 confirmations before proceeding. On average, 15 confirmations take 90 minutes.

  • Menu Tools | Debug console.
  • Enter masternode outputs. You will get an output like “120326c48d9d46abc64f5a123427fb63abcbd7512337c97f5abc879fea123e1b”: “1”.
  • Menu Tools | Open Mastenode Configuration File, to load “masternode.conf” into the editor.
  • Add a new line at the end and enter your data:
    Name IP:Port Key Outputs1 Outputs2
    Name is in our example “MN1”.
    The IP of your VPS followed by port 41319.
    The key was initially generated.
    Outputs1 is the transaction ID, which you have queried with “masternode outputs”
    and Outputs2 the number behind, in our example it is 1.
  • Save masternode.conf
  • Menu Settings | Options.
  • On tab Wallet, check the options Enable coin control features and Show Masternodes Tab.
  • Save with OK, exit the Wallet and restart.

4. On the VPS

Use ./dms-cli mnsync status to verify that synchronization is now complete:

Please wait until “IsBlockchainSynced”, “IsMasternodeListSynced”, “IsWinnerListSynced” and “IsSynced” have the value “true”.

5. “DMS Core” on your local computer

  • Go to the tab page Masternodes.
  • Select the newly created MN1 and click on Start Alias.

6. Set up automatic service start on VPS (optional)

Your provider will probably restart the VPS occasionally. To run dmsd automatically afterwards, you can create a service unit:

  • cd /etc/systemd/system/
  • vi dms.service
  • Adapt the sample file shown below to your IT-environment and copy the content to the editor. Save and exit editor.
  • systemctl enable dms.service

Example dms.service

[Unit]
Description=DMS service
After=network.target
[Service]
User=root
Group=root
Type=forking
ExecStart=/root/dms/dmsd -daemon
ExecStop=/root/dms/dms-cli stop
Restart=always
RestartSec=15
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=10s
StartLimitInterval=120s
StartLimitBurst=5
[Install]
WantedBy=multi-user.target

7. Possibly mining

Does the computer have at least 2 virtual CPU and sufficient system resources? If so, then you can use the wallet to mine coins:

dms/dms-cli setgenerate true 1

For a rented server, please ask yourself if the provider agrees. If you renting an expensive server, mining on 1 or 2 CPU will probably be ok. At a VPS for $1 each month, the provider will not calculate with a 100% CPU usage.

Tip: Weak mining. The parameter setgenerate true -2 or -3 pauses after each calculation. The system uses only a small part of one virtual CPU.

8. Monitoring

Check the masternode status in your local wallet regularly. You should restart it, if the status is “NEW_START_REQUIRED”. Check the VPS, if the status “MISSING” is shown.


Suitable VPS for Masternodes

Some experience to choose a server for your Masternode.

We have tried some server providers with masternodes. Especially for Documentchain, but also with other Altcoins during the planning phase. Basically, one can say that 256 MB of RAM are not enough. Initially, these small VPS worked, but with increasing blockchain size, they went offline.

System requirement in our experience is 1 vCPU and 0.5 GB RAM. SSD or HDD is usually offered from 10 GB, which is quite sufficient. If you are renting a cheap server, please make sure that a upgrade option is offered.

As operating system we have installed Ubuntu 16.04 and in one case 18.04, because only this version was available. Both work.

Tested VPS

Provider VPS approx. 1) ok
deinserverhost.de KVM with 0,5 GB RAM € 1,95
Evolution Host Starter 1 GB RAM, 1 vCPU € 5,00
Evolution Host Developer 2 GB RAM, 2 vCPU € 10,00
hetzner.com CX11 with 2 GB RAM € 2,96
hetzner.com CX21 with 4 GB RAM, 2 vCPU € 5,83
hostus.us US/EU Special 2 with 0.7 GB $ 1,33 ✔ 3)
hostus.us HK AP Special with 0.5 GB
Hong Kong and Singapore
$ 2,91 ✔ 3)
ionos.com Cloud S with 0,5 GB € 1 – $ 2
Serverdiscounter 2) Virtual Nano with 0,2 GB € 1,00
strato.de V30 with 8 GB RAM, 4 vCPU € 12,00
virmach.com Micro+ with 0,2 GB RAM $ 1,25
virmach.com Value+ with 0,5 GB RAM $ 2,50

✔ works with masterternode
❌ unsatisfactory

1) Prices per month, we have paid. For current price information see provider page.
2) Problems after setup, wrong payment allocation, no upgrade possibility.
3) Special price for annual payment via affiliate link. Tip: For other orders you can try “TOPPROVIDER” as a coupon code.