Configuring MASQ Node
You will need to add configuration of your Node before starting it and connecting to MASQ Network neighbors

Prerequisites

    Find and delete your node-data.db from your local disk, if you have run MASQ Node in testing before
(its usually in C:\Users\xxxxx\AppData\Local\MASQ on Windows)
    Open CLI window with elevated-permissions (as Admin) and start the Daemon
    Have your testing seed words (mnemonic phrase) ready to use the recover-wallets command (and derivation paths of earning and consuming wallets if not using defaults)
    Place to write down seed words if you are generating new wallets for using Node, using the generate-wallets command

Configuration using Config Toml

The easiest way to configure and save your settings is using a config.toml file - this will allow you to load all your configuration by passing in the config.toml when initializing the Daemon.
Feel free to use this sample TOML file below as a start.
config.toml
328B
Binary
Sample config.toml (created in Notepad)
If you want to create one from scratch, follow below:
    Open up Notepad to create a new text file
    Copy and Paste below, making sure each setting is preserved on its own line
1
chain="ropsten"
2
blockchain-service-url="https://ropsten.infura.io/v3/0ead23143b174f6983c76f69ddcf4026"
3
clandestine-port="xxxxx"
4
db-password="xxxxx"
5
dns-servers="4.2.2.2,8.8.8.8"
6
#earning-wallet=""
7
ip="xxxxx"
8
gas-price=99
9
log-level="debug"
10
neighborhood-mode="standard"
11
#real-user=""
12
#ui-port=5333
13
#neighbors=""
14
#consuming-private-key=""
Copied!
    Add values for your specific configuration in between the quote marks with x's marked "xxxxx"
      clandestine-port - this is the port you want to keep using for MASQ to communicate in the network, so you can add a port forward and keep it the same in your router config - its best to choose one here thats 4-5 digits long. If left blank MASQ will randomly assign one.
      db-password - this is a database password to encrypt sensitive information
      ip - this is your public IP found on your computer network adaptor, or simply going to a site like ipchicken.com
If you do require an infura address for --block-service-url, you can use the one provided above temporarily - its one set up for team testing:https://ropsten.infura.io/v3/0ead23143b174f6983c76f69ddcf4026
Once testing scales out, it may reach its free API call limits

Saving the config.toml

After completing the parameter in the file, save it and make sure the file extension .toml
If your system asks to change file extension click Yes

Configuring using commands

MASQ Node lets you run in interactive-mode by running masq command from your binary directory - this will show a command line prefix of masq> indicating you are in interactive mode
From here you will be able to execute consecutive software commands.
Type setup to output the default settings
Here is an example on Windows cmd, in the second command window you will be using:
1
C:\Users\*****\Desktop\Node\GH-352\bin>masq
2
masq> setup
3
NAME VALUE STATUS
4
blockchain-service-url Required
5
chain mainnet Default
6
clandestine-port Required
7
config-file config.toml Default
8
consuming-private-key ******************************************** Blank
9
crash-point Blank
10
data-directory C:\Users\*****\AppData\Local\MASQ\mainnet Default
11
db-password **************** Required
12
dns-servers 1.1.1.1 Default
13
earning-wallet Blank
14
gas-price 1 Default
15
ip Required
16
log-level warn Default
17
neighborhood-mode standard Default
18
neighbors Blank
19
20
ERRORS:
21
neighborhood-mode
22
Node cannot run as --neighborhood-mode standard without --ip specified
23
24
masq>
Copied!
Notice there are headings for NAME of parameter, VALUE and STATUS
The STATUS column is important as it will tell the user which parameters are set, blank and defaulted.
Parameters with the 'Required' status will alert you when trying to start Node when they are not configured. In the above example, the ERROR message explains you cannot run without specifying your public IP address

Initial IP - Required Config

As a minimum to run the start command to start the Node instance, you will need to specify an IP address for the node.
For local testing you can configure this to anything you wish, but to join Testnet on Ropsten and eventually mainnet, this will be your public IP address (the IP address facing the internet world on the outside of your router)
In interactive mode this is simple to change
1
masq> setup --ip 1.2.3.4
2
NAME VALUE STATUS
3
blockchain-service-url Required
4
chain mainnet Default
5
clandestine-port Required
6
config-file config.toml Default
7
consuming-private-key ******************************************** Blank
8
crash-point Blank
9
data-directory C:\Users\*****\AppData\Local\MASQ\mainnet Default
10
db-password **************** Required
11
dns-servers 1.1.1.1 Default
12
earning-wallet Blank
13
gas-price 1 Default
14
ip 1.2.3.4 Set
15
log-level warn Default
16
neighborhood-mode standard Default
17
neighbors Blank
18
19
masq>
Copied!
You can see the setup values are output again and the ip address is stored with STATUS as Set - the error message also goes away.

Setting Password --db-password

Node will require a password to encrypt the database sensitive information such as the consuming-private-key and any references to the mnemonic seed words.
Before Node is running, you can set this password using --db-password setup command
setup --db-password <VALUE>
1
masq> setup --db-password 1234
2
3
NAME VALUE STATUS
4
blockchain-service-url Required
5
chain mainnet Default
6
clandestine-port Required
7
config-file config.toml Default
8
consuming-private-key ******************************************** Blank
9
crash-point Blank
10
data-directory C:\Users\*****\AppData\Local\MASQ\mainnet Default
11
db-password **************** Set
12
dns-servers 1.1.1.1 Default
13
earning-wallet Blank
14
gas-price 1 Default
15
ip 1.2.3.4 Set
16
log-level warn Default
17
neighborhood-mode standard Default
18
neighbors Blank
19
20
masq>
Copied!

Password Commands While Node is Running

While Node is already running, you can also set or change the password interactively, without bringing down the Node instance
To configure the password while Node is running, there are 3 commands that interact with the --db-password parameter value:
    set-password
    check-password
      USAGE: check-password [db-password]
    change-password
      USAGE: check-password <OLD-DB-PASSWORD> <NEW-DB-PASSWORD>
set-password simply sets the password - there are no default requirements
check-password will check the current db-password value is correct
change-password will change the current db-password value if correct current password is input
WARNING - the db-password VALUE can be set to a "" blank VALUE meaning that it can be saved without any character. Be careful when setting this.

Other Password Information

Whenever the database password is changed, the Node should send out a broadcast to all connected UIs (other than the one changing the password) notifying them that there has been a change.
Last modified 15d ago