Waves Node Configuration - waves.conf file
In this article you will find the structure of the Waves MainNet Node configuration file (waves.conf), as well as details on the individual components. If you want to set up a WAVES node, I have provided you with a minimal and a complete configuration file for download here. You can use the minimal configuration to test whether your node is generally working. You can then switch to the complete configuration file.
Storage location of the waves.conf - file under Linux (Ubuntu/Lubuntu)
The Waves configuration file is stored in the following directories. Note that the location of the file is different for MainNet and TestNet.
$ /etc/waves/waves.conf # MainNet $ /etc/waves-testnet/waves.conf # TestNet
Download the waves.conf configuration file (MainNet)
You can download the minimal configuration file (MainNet) using the following download command. It is stored in the directory /etc/waves/ (MainNet).
To download the minimal configuration, run this command:
$ curl https://www.chaincheck.de/stuff/waves-node-anleitung/mainnet/waves-conf-mini-1.conf -o /etc/waves/waves.conf
To download the complete configuration file (MainNet), you can use this command:
$ curl https://www.chaincheck.de/stuff/waves-node-anleitung/mainnet/waves-conf-full-1.conf -o /etc/waves/waves.conf
Waves Complete Configuration - MainNet
If your Waves Node works with the prepared minimal configuration, you can now familiarize yourself with the contents of the waves.conf file and make adjustments. This detailed information can help you with this. Click on the links to get more information about the individual components.
waves { # Blockchain settings # MAINNET, TESTNET or STAGENET blockchain.type = MAINNET # Wallet settings wallet { # Password to protect wallet file # Example: password = "u5PtzQph#lgg1n_G29Y" password = "u5PtzQph#lgg1n_G29Y" # Wallet seed as BASE58 string # from: 3PJg2KZM6hZ3vXrzt6emYP4NvAucoG6rKo5 seed = "dJgzTwCpGwxSXb5Tqe3g7AU9skFRdRn3T61wiiGQ5RMM7ETPhgRcN9rF5QUuC1vKwaRkkjhm7JdAS9aSoSBbtWHA7vqV3DEPf7bd8VnGQC5zfALbLHXRLwJ5eR6Hu76jHjB" } # Node's REST API settings rest-api { # Enable/disable node's REST API enable = yes # Network address to bind to bind-address = "127.0.0.1" # Port to listen to REST API requests port = 6869 # Hash of API key string # Example: api-key-hash = "xxxx" # From password Swaager UI/utils/hash/secure/ api-key-hash = "2d3KsBmNqg5HygW6dH53pzZp5fKpWRaU1Dx9RkW9iASj" } # P2P Network settings network { # Port number port = 6868 # Node name to send during handshake. Comment this string out to set random node name. # Example: node-name = "Waves Chainchech Node" node-name = "Name-deiner-Node" # String with IP address and port to send as external address during handshake. # Could be set automatically if uPnP is enabled. # Example: declared-address = "111.11.1.1.1:6868" # Für Portprüfung notwendig declared-address = "deine-internet-ip:6868" } # supported futures features { supported = [2, 14, 15] } # desired rewards rewards { desired = 600000000 } }
Component: wallet
This information is mandatory. The password and seed fields must be specified. The Waves Node cannot start without this information.
wallet | password
This password encrypts the wallet.dat. The wallet.dat is located in the directory /var/lib/waves/wallet/ (MainNet). The password can be freely chosen. When operating a MainNet node, a complex and therefore secure password should be chosen.
Important: Based on the password and seed information, the file /var/lib/waves/wallet/wallet.dat is created automatically. Accordingly, the wallet.dat must be deleted after each change to the waves.conf so that the Waves node can create a new wallet.dat. Otherwise, the node will not be able to start. The following error message appears:
$ Caused by: java.lang.RuntimeExeption: File storage decrypt error
wallet | seed
Each Waves node uses its own Waves wallet. The wallet seed, i.e. the 15 words, must be entered in the "seed" field encoded in Base58. Under Linux (Ubuntu/Lubuntu) the base58 program can be used for encoding. However, this is much easier: You can find your Base58 encoded seed under "Settings / Security / Encoded Seed" in your wx.network (WAVES wallet).
component: rest-api
This information is not mandatory. If it is not specified, rest-api is automatically activated with the default values. The default values are bind-address 127.0.0.1 and port 6869. If the REST API is activated, the node can be accessed via the API using Swagger. With default values, only the server itself can access the API. This means that external access is not possible with the default values.
The bind-address must be set to "0.0.0.0:6869" to enable external access. Port forwarding must then also be set up.
Digression: Port forwarding
To activate port forwarding, port 6869 must be activated in the router via the TCP protocol on the target computer (node). As an example of how this looks on the Vodafone router CH7465VF when port forwarding is aimed at the target computer 192.168.0.29:
If you want to disable rest-api completely, set "enable = no" in waves.conf.
You can access Swagger via the browser (URL http://127.0.0.1:6869). To access it externally, you must enter your own Internet IP address here.
rest-api | api-key-hash
The api-key-hash is necessary if you want to perform advanced functions via API/Swagger. For example, the node can be stopped or restarted via API.
The password freely selected under "password" (part of the wallet) is encrypted (hashed) in the "api-key-hash" field. Swagger is used for hashing. To do this, open Swagger and go to "/utils/hash/secure". Enter your password there. You will receive the hashed password. You then enter this string in the "api-key-hash" field.
Important note! If you set up a MainNet node, please do not use a foreign node to hash the password. Nobody can guarantee that the password will not be intercepted over the Internet. Nor can anyone guarantee that the foreign node will not read the password. The solution: First create a TestNet node. You can use a foreign node to hash the password for the TestNet node. You can then use your TestNet node to hash in the local network.
component: network
If this component is not configured manually, default values are automatically used.
network | port
If no value is specified manually, it will automatically be set to 6868.
network | node-name
Here you can enter the name of your node, e.g. My Waves Node. The node name will be generated automatically if you do not enter a name here.
network | declared-address
If uPnP is activated in the router, then your own Internet address does not need to be entered here. Most routers have uPnP activated. However, this also means that if uPnP is not active, your own IP address should be entered. If this is not done, it can lead to problems when acknowledging the connection partner (handshake).
You can find out your IP address using IP Address Check - shows your Internet IP address
Important: You must activate this area to check the port. An automatic port check can be used, for example, to check the server status. You can use Portcheck - port check for this.
Bestandteil: features & rewards
futures | supported
Use this field to vote your node yes for certain futures. This information must be separated by commas.
rewards | desired
This field is used to vote on the BlockReward amount for Future 14 (Monetary Policy). This means how many waves per block your node votes for. This value must be entered x 100,000,000. If you want your node to vote for 6 WAVES per block, you must enter 600,000,000.