status-go/config
RichΛrd 40359f9c1b
go-waku integration (#2247)
* Adding wakunode module
* Adding wakuv2 fleet files
* Add waku fleets to update-fleet-config script
* Adding config items for waku v2
* Conditionally start waku v2 node depending on config
* Adapting common code to use go-waku
* Setting log level to info
* update dependencies
* update fleet config to use WakuNodes instead of BootNodes
* send and receive messages
* use hash returned when publishing a message
* add waku store protocol
* trigger signal after receiving store messages
* exclude linting rule SA1019 to check deprecated packages
2021-06-16 16:19:45 -04:00
..
cli go-waku integration (#2247) 2021-06-16 16:19:45 -04:00
README.md make Waku the default protocol 2020-08-20 10:27:47 +02:00
status-chain-genesis.json Streamline configuration in status-go. Part of #1180 (#1183) 2018-09-13 18:31:29 +02:00

README.md

Introduction

This document describes the available options in the JSON config for status-go.

The structure of the JSON config is defined in the params/config.go file, which also contains detailed comments on meaning of each option. The NodeConfig struct defines the general configuration keys at the root of the JSON file.

If the descriptions of any options are too vague feel free to open an issue.

Example config files can be viewed in the config/cli folder.

Important Sections

The JSON config is separated into several sections. The most important ones are listed below.

NodeConfig

The root of the JSON configuration.

An example of most important settings would include:

{
    "NetworkID": 1,
    "DataDir": "/tmp/status-go-data",
    "NodeKey": "123qwe123qwe123qwe123",
    "Rendezvous": true,
    "NoDiscovery": false,
    "ListenAddr": "0.0.0.0:30303",
    "AdvertiseAddr": "12.34.56.78",
    "RegisterTopics": ["whispermail"]
}

If you'd want to enable JSON RPC port you'd need:

{
    "HTTPEnabled": true,
    "HTTPHost": "0.0.0.0",
    "HTTPPort": 8545,
    "APIModules": "eth,net,web3,admin"
}

In order to adjust logging settings you'd need:

{
    "LogFile": "/var/log/status-go.log",
    "LogLevel": "INFO",
    "LogMaxSize": 200,
    "LogMaxBackups": 5,
    "LogCompressRotated": true
}

Valid LogLevel settings are: ERROR, WARN, INFO, DEBUG, TRACE

WakuConfig

If you want your node to relay Waku(modified Whisper) protocol messages you'll want to include this:

{
    "WakuConfig": {
        "Enabled": true,
        "EnableMailServer": true,
        "DataDir": "/tmp/status-go-data/waku",
        "MailServerPassword": "status-offline-inbox"
    }
}

The MailServerPassword is used for symmetric encryption of history requests.

By default it will use leveldb embedded database. To use postgres instead you need to add this to your config:

{
    "DatabaseConfig": {
      "PGConfig": {
        "Enabled": true,
        "URI": "postgres://user:password@host:port?options"
      }
    }
}

NOTE: The default password used by Status App and our mailservers is status-offline-inbox.

ClusterConfig

This config manages what peers and bootstrap nodes your status-go instance connects when it starts.

{
  "ClusterConfig": {
    "Enabled": true,
    "Fleet": "eth.prod",
    "BootNodes": [
      "enode://345ert345ert@23.45.67.89:30404"
    ],
    "TrustedMailServers": [
      "enode://qwe123qwe123@98.76.54.32:30504"
    ],
    "StaticNodes": [
      "enode://123qwe123qwe@12.34.56.78:30305"
    ],
    "RendezvousNodes": [
      "/ip4/87.65.43.21/tcp/30703/ethv4/16Uiu2HAm312312312312312312312312"
    ]
  }
}

BootNodes help the status-go instance find peers. They are more important to have than StaticNodes or TrustedMailServers, which are just statically added peers on start.

RendezvousNodes are an alternative protocol for doing the same peer discovery as BootNodes do.