Skip to content

tohsnoom/dash-masternode-tool

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dash Masternode Tool (DMT)

Contents

Masternodes

Dash masternodes are full-nodes which are incentivized by paying them a share of the block reward for the work they do for the network, from which the most important are participation in InstantSend and PrivateSend transactions. In order to run a masternode, apart from setting up a server wich runs the software, you must dedicate a 1000 Dash collateral, which is "tied up" to your node as long as you want it to be considered a masternode. It's worth to mention, that the private key controlling the funds can (and for security reasons it should) be kept outside the masternode server itself.

A server + installed Dash daemon software make a Dash full-node, but before the rest of the network accepts it as a legitimate masternode, one more thing must happen: the person controlling the node must prove, that he/she is also in control of the private key of the node's 1000 Dash collateral. This is achieved by the requirement of sending to the network a special message (start masternode message) signed by this private key.

This action can be performed with the Dash reference software client - Dash Core. As can be expected, this requires sending of 1000 Dash to the address controlled by Dash Core wallet. After the recent increase in the value of Dash and burst of the amount of malware distributed over the Internet, you do not have to be paranoid to say that keeping that amount of funds in a software wallet is not really secure. For these reasons, it's highly recommended to use a hardware wallet for this purpose.

DashMasternodeTool

The main purpose of the application is to give masternode owners (MNOs) the ability to send Start masternode command with easy to use a graphical interface if MN's collateral is controlled by a hardware wallet such as Trezor or Keepkey.

Features list

  • Sending Start masternode command if the collateral is controlled by a hardware wallet.
  • Transfering masternode's earnings in a safe way - without touching collateral's 1000 Dash transaction.
  • Signing messages with a hardware wallet.
  • Voting on proposals (work in progress).

Supported hardware wallets

  • Trezor
  • KeepKey
  • Ledger Nano S

Most ot the application features are accessible from the main program window:
Main window

Configuration

Setting up the hardware wallet type

  • Click the Configure button.
  • In the configuration dialog that will open, select the Miscellaneous tab.
  • Depending on the type of your hard ware wallet, select the Trezor, Keepkey or Ledger Nano S option.
    1

Connection setup

Most of the application features involve exchanging data between the application itself and the Dash network. Thus, DMT needs to connect to one of the full nodes that make up the network, more specifically - the one that handles JSON-RPC requests. For DMT this node will be playing the role of a gateway to the Dash network. It does not matter which exactly this node is - for the Dash network all are equal and exchange information among themselves.

Depending on your preferences (and skills) you can choose one of three possible connection types:

Masternode setup

Here, I have to make the following assumptions:

  • You already have a server with a running Dash daemon software (dashd), that you want to use as a masternode. If you don't, you need to install and configure one, following the guidelines from Dashpay Atlassian Wiki: https://dashpay.atlassian.net/wiki/display/DOC/Set+Up.
  • A few times I will be referring to a dashd configuration file, so I'm assuming here, that your dashd works on linux OS, as the most popular and recommended OS for this purpose.
  • Your server has a public IP address that will be visible on the Internet.
  • You have set up a TCP port on which your dashd listens for incoming connections (usually 9999).

Further configuration steps depend on whether you already have a masternode controlled by Dash Core and which you'd like to migrate to DMT + Trezor tandem or you are just setting up a new one.

Scenario A - moving masternode management from Dash Core
Scenario B - configuration of a new masternode

Commandline parameters

Currently the application supports one command-line parameter: --config, which can be used to pass a non-standard path to a configuration file. Example:

DashMasternodeTool.exe --config=C:\dmt-configs\config1.ini 

Features

Starting Masternode

Once you set up the Dash daemon and perform the required DMT configuration, you need to broadcast the Start masternode message to the Dash network, so that the other Dash nodes start to perceive your daemon as a masternode and add it to the payment queue.

To do this, click the Start Masternode using Hardware Wallet button.

Sequence of actions

Below I present steps the application performs while starting the masternode and possible problems that may occur during the process.

The steps are as follows:

  1. Verification if all the required fields are filled with the correct values. These are the fields: IP, port, MN private key, Collateral, Collateral TX ID and TX index.
    An example message in case of errors:
    1

  2. Opening a connection to the Dash network and verifying if the Dash daemon to which it is connected is not synchronizing.
    Message in the case of failure:
    1

  3. Verification if the masternode status is not ENABLED or PRE_ENABLED. If it is, the following warning appears:
    1
    If your masternode is running and you decide to send Start masternode message anyway, your masternode's payment queue location will be reset.

  4. Opening a connection to the hardware wallet.
    Message in the case of failure:
    1

  5. If the BIP32 path value is empty, DMT uses the collateral address to read the BIP32 path from the hardware wallet.

  6. Retrieving the Dash address from the hardware wallet for the BIP32 path specified in the configuration. If it differs from the collateral address provided in the configuration, the following warning appears:
    1
    The most common reason for this error is mistyping the hardware wallet passphrase. Remember, that different passphrases result in different Dash addresses for the same BIP32 path.

  7. Verification if the specified transaction ID exists, points to your collateral address, is unspent and equals to 1000 Dash.
    Messages in the case of failure:
    1
    1
    If you decide to continue anyway, you probably won't be able to successfully start masternode.

  8. Verification on the Dash network level if the specified transaction id is valid.
    Message in the case of failure:
    1

  9. After completing all pre-verification, the application will ask you whether you want to continue:
    1
    This is the last moment when you can stop the process.

  10. Sending the start masternode message.
    Success will end with the following message:
    1
    In the case of failure, the message text may vary, depending on the problem nature. Example:
    1

Transferring of masternode earnings

Beginning with version 0.9.4 of DMT you can transfer your masternode earnings. Unlike other Dash wallets, DMT gives you a 100% control on which unspent transaction outputs (utxo) you wish to transfer. This has the same effect as the Coin control functionality implemented in Dash Core wallet.

Transfer funds window shows all UTXOs of a currently selected Masternode (mode 1), all Masternodes in current configuration (mode 2) or any address controlled by a hardware wallet (mode 3). All UTXOs, not used as collateral are initially checked. Additionally, collaterals' UTXOs (1000 Dash) are initially hidden, just to avoid unintentional sending its funds and thus breaking MN. You can show those hidden entries by unchecking Hide collateral utxos option.

To show up the Transfer funds window, click the Tools button. Then, from popup menu choose:

  • Transfer funds from current Masternode's address (mode 1)
  • Transfer funds from all Masternodes addresses (mode 2)
  • Transfer funds from any HW address (mode 3)

Sending masternodes' payouts:
1

Transferring of funds from any address controlled by a hardware wallet:
1

Select all UTXOs you wish to include in your transaction, verify transaction fee and click the Send button. After signing the transaction with your hardware wallet, application will ask you if you wish to broadcast it to the Dash network.

1

After clicking Yes, application broadcasts the transaction and then shows a message box with a transaction ID as a hyperlink directing to a Dash block explorer:

1

Signing messages with hardware wallet

To sign a message with your hardware wallet click the Tools button and then select the Sign message with HW for current Masternode's address menu item. This will show the Sign message window:

1

Changing hardware wallet's PIN/passphrase

Click the Tools button and then Hardware Wallet PIN/Passphrase configuration item. This will show up the configuration window:

1

Downloads

This application is written in Python 3, but to run it requires several libraries, which in turn require an installation of the C++ compiler. All in all, preparation is not very trivial to non-technical people, especially in Linux OS (though it will be documented soon).

Therefore, in addition to providing source code in GitHub, I've also released binary versions for all three major operating systems - Mac OS, Windows (32 and 64-bit) and Linux. Applications are "compiled" and tested under the following OS distributions:

  • Windows 7 64-bit
  • Mac OSX El Capitan 10.11.6
  • Linux Debian Jessie

Binary versions of the latest release can be downloaded from: https://github.com/Bertrand256/dash-masternode-tool/releases/latest.

About

Tool for managing Dash masternodes with a hardware wallet (Trezor, Keepkey, Ledger Nano S)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%