masq CLI commands

masq is a command-line user interface to the MASQ Daemon and the MASQ Node

masq> help

    -h, --help       Prints help information
    -V, --version    Prints version information

        --ui-port If the Daemon is listening for connections at some port other
        than 5333, specify that port here. Must be between 1025 and 65535. 
        [default: 5333]
    change-password      Changes the existing password on the Node database
    check-password       Checks whether the supplied db-password (if any) is the correct password for the Node's database
    configuration        Displays a running Node's current configuration.
    connection-status    Returns the current stage of the connection status. (NotConnected, ConnectedToNeighbor or ThreeHopsRouteFound)
    crash                Causes an element of the Node to crash with a specified message. Only valid if the Node has been started with '--crash-point message'
    descriptor           Displays the Node descriptor of the running MASQNode. Only valid if Node is already running.
    financials           Displays financial statistics of this Node. Only valid if Node is already running.
    generate-wallets     Generates a pair of wallets (consuming and earning) for the Node if they haven't been generated already.
    help                 Prints this message or the help of the given subcommand(s)
    recover-wallets      Recovers a pair of wallets (consuming and earning) for the Node if they haven't been recovered already
    scan                 Orders the Node to perform an immediate scan of the indicated type
    set-configuration    Sets Node configuration parameters being enabled for this operation when the Node is running
    set-password         Sets an initial password on the Node database
    setup                Establishes (if Node is not already running) and displays startup parameters for MASQNode.
    shutdown             Shuts down the running MASQNode. Only valid if Node is already running.
    start                Starts a MASQNode with the parameters that have been established by 'setup.' Only valid if Node is not already running.
    wallet-addresses     Provides addresses of consuming and earning wallets.Only valid if the wallets were successfully generated (generate-wallets) or recovered (recover-wallets)

Dump Config `--dump-config`

The Daemon has a space inside it to hold Setup information for the Node. A UI can query the Daemon to get a dump of the information in the Setup space. When the Node is not running, the information in the Setup space can be changed by the UI. When the Node is running, the information in the Setup space is frozen and immutable. This is so that when the Node is running, you can use the UI to query the Daemon to discover the configuration with which the Node was started.

  • ./MASQNode --dump-config --chain <CHAIN-NAME> shows the contents of the configuration table of the Node's database from specific chain directory. The secret items - particularly exampleEncrypted, pastNeighbors, and seed, should be unintelligible strings of hexadecimal.

  • ./MASQNode --dump_config --db-password should show the same values for the non-secret items, but it should show decrypted secret values. exampleEncrypted should be a 64-character hexadecimal value. (If it's a two-character hexadecimal value, that's because the database wasn't written by this version of MASQNode; it's okay.) seed should be a 128-character hexadecimal value. pastNeighbors should be a comma-separated list of Node descriptors.


The --dump-config command requests a dump of the Node's current configuration information. If you know the database password, provide it, and the response will contain the secrets in the database.

If you don't supply a password, or you do but it's wrong, you'll still get a response, but it will have only public information: the secrets will be missing.

Another reason the secrets might be missing is that there are not yet any secrets in the database.

./MASQNode --dump-config --db-password <PASSWORD> --chain <CHAIN-NAME>

The output should appear like this:

"payload": {
    "currentSchemaVersion": <string>,
    "clandestinePort": <string>,
    "gasPrice": <number>,
    "mnemonicSeedOpt": <optional string>,
    "consumingWalletDerivationPathOpt": <optional string>,
    "earningWalletAddressOpt": <optional string>,
    "pastNeighbors": [
        <string>, ...
    "startBlock": <number>

Output Description

This conveys the Node's current configuration information. Some of it is optional: if it's missing, it might be because it hasn't been configured yet, or it might be because it's secret and you didn't provide the correct database password. If you want to know whether the password you have is the correct one, try the checkPassword command.

  • currentSchemaVersion: This will be a three-part version number for the database schema. This will always be the same for a given version of Node. If you upgrade your Node, and the new Node wants to see a later schema version in the database, it will migrate your existing data to the new schema and update its schema version. If this attempt fails for some reason, this value can be used to diagnose the issue.

  • clandestinePort: The port on which the Node is currently listening for connections from other Nodes.

  • gasPrice: The Node will not pay more than this number of wei for gas to complete a transaction.

  • mnemonicSeedOpt: This is a secret string of hexadecimal digits that corresponds exactly with the mnemonic phrase, plus any "25th word" mnemonic passphrase. You won't see this if the password isn't correct. You also won't see it if the password is correct but the seed hasn't been set yet.

  • consumingWalletDerivationPathOpt: This is the derivation path (from the mnemonic seed) of the consuming wallet. More than likely, it's m/44'/60'/0'/0/0.

  • earningWalletAddressOpt: The wallet address for the earning wallet. This is not secret, so if you don't get this field, it's because it hasn't been set yet.

  • pastNeighbors: This is an array containing the Node descriptors of the neighbors the Node is planning to try to connect to when it starts up next time.

Last updated