Core Configuration
WASP uses a JSON standard format as a config file. If you are unsure about JSON syntax, you can find more information in the official JSON specs.
You can change the path of the config file by using the -c
or --config
argument while executing wasp
executable.
For example:
wasp -c config_defaults.json
You can always get the most up-to-date description of the config parameters by running:
wasp -h --full
1. Application
Name | Description | Type | Default value |
---|---|---|---|
checkForUpdates | Whether to check for updates of the application or not | boolean | true |
shutdown | Configuration for shutdown | object |
Shutdown
Name | Description | Type | Default value |
---|---|---|---|
stopGracePeriod | The maximum time to wait for background processes to finish during shutdown before terminating the app | string | "5m" |
log | Configuration for Shutdown Log | object |
Shutdown Log
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether to store self-shutdown events to a log file | boolean | true |
filePath | The file path to the self-shutdown log | string | "shutdown.log" |
Example:
{
"app": {
"checkForUpdates": true,
"shutdown": {
"stopGracePeriod": "5m",
"log": {
"enabled": true,
"filePath": "shutdown.log"
}
}
}
}
2. Logger
Name | Description | Type | Default value |
---|---|---|---|
level | The minimum enabled logging level | string | "info" |
disableCaller | Stops annotating logs with the calling function's file name and line number | boolean | true |
disableStacktrace | Disables automatic stacktrace capturing | boolean | false |
stacktraceLevel | The level stacktraces are captured and above | string | "panic" |
encoding | The logger's encoding (options: "json", "console") | string | "console" |
encodingConfig | Configuration for encodingConfig | object | |
outputPaths | A list of URLs, file paths or stdout/stderr to write logging output to | array | stdout |
disableEvents | Prevents log messages from being raced as events | boolean | true |
EncodingConfig
Name | Description | Type | Default value |
---|---|---|---|
timeEncoder | Sets the logger's timestamp encoding. (options: "nanos", "millis", "iso8601", "rfc3339" and "rfc3339nano") | string | "rfc3339" |
Example:
{
"logger": {
"level": "info",
"disableCaller": true,
"disableStacktrace": false,
"stacktraceLevel": "panic",
"encoding": "console",
"encodingConfig": {
"timeEncoder": "rfc3339"
},
"outputPaths": [
"stdout"
],
"disableEvents": true
}
}
3. INX
Name | Description | Type | Default value |
---|---|---|---|
address | The INX address to which to connect to | string | "localhost:9029" |
maxConnectionAttempts | The amount of times the connection to INX will be attempted before it fails (1 attempt per second) | uint | 30 |
targetNetworkName | The network name on which the node should operate on (optional) | string | "" |
Example:
{
"inx": {
"address": "localhost:9029",
"maxConnectionAttempts": 30,
"targetNetworkName": ""
}
}
4. Database
Name | Description | Type | Default value |
---|---|---|---|
engine | The used database engine (rocksdb/mapdb) | string | "rocksdb" |
chainState | Configuration for chainState | object | |
debugSkipHealthCheck | Ignore the check for corrupted databases (should only be used for debug reasons) | boolean | false |
ChainState
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the chain state databases folder | string | "waspdb/chains/data" |
Example:
{
"db": {
"engine": "rocksdb",
"chainState": {
"path": "waspdb/chains/data"
},
"debugSkipHealthCheck": false
}
}
5. P2p
Name | Description | Type | Default value |
---|---|---|---|
identity | Configuration for identity | object | |
db | Configuration for Database | object |
Identity
Name | Description | Type | Default value |
---|---|---|---|
privateKey | Private key used to derive the node identity (optional) | string | "" |
filePath | The path to the node identity PEM file | string | "waspdb/identity/identity.key" |
Database
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the p2p database | string | "waspdb/p2pstore" |
Example:
{
"p2p": {
"identity": {
"privateKey": "",
"filePath": "waspdb/identity/identity.key"
},
"db": {
"path": "waspdb/p2pstore"
}
}
}
6. Registries
Name | Description | Type | Default value |
---|---|---|---|
chains | Configuration for chains | object | |
dkShares | Configuration for dkShares | object | |
trustedPeers | Configuration for trustedPeers | object | |
consensusState | Configuration for consensusState | object |
Chains
Name | Description | Type | Default value |
---|---|---|---|
filePath | The path to the chain registry file | string | "waspdb/chains/chain_registry.json" |
DkShares
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the distributed key shares registries folder | string | "waspdb/dkshares" |
TrustedPeers
Name | Description | Type | Default value |
---|---|---|---|
filePath | The path to the trusted peers registry file | string | "waspdb/trusted_peers.json" |
ConsensusState
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the consensus state registries folder | string | "waspdb/chains/consensus" |
Example:
{
"registries": {
"chains": {
"filePath": "waspdb/chains/chain_registry.json"
},
"dkShares": {
"path": "waspdb/dkshares"
},
"trustedPeers": {
"filePath": "waspdb/trusted_peers.json"
},
"consensusState": {
"path": "waspdb/chains/consensus"
}
}
}
7. Peering
Name | Description | Type | Default value |
---|---|---|---|
peeringURL | Node host address as it is recognized by other peers | string | "0.0.0.0:4000" |
port | Port for Wasp committee connection/peering | int | 4000 |
Example:
{
"peering": {
"peeringURL": "0.0.0.0:4000",
"port": 4000
}
}
8. Chains
Name | Description | Type | Default value |
---|---|---|---|
broadcastUpToNPeers | Number of peers an offledger request is broadcasted to | int | 2 |
broadcastInterval | Time between re-broadcast of offledger requests | string | "5s" |
apiCacheTTL | Time to keep processed offledger requests in api cache | string | "5m" |
pullMissingRequestsFromCommittee | Whether or not to pull missing requests from other committee members | boolean | true |
Example:
{
"chains": {
"broadcastUpToNPeers": 2,
"broadcastInterval": "5s",
"apiCacheTTL": "5m",
"pullMissingRequestsFromCommittee": true
}
}
9. Write-Ahead Logging
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the "write-ahead logging" is enabled | boolean | true |
path | The path to the "write-ahead logging" folder | string | "waspdb/wal" |
Example:
{
"wal": {
"enabled": true,
"path": "waspdb/wal"
}
}
10. Profiling
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the profiling plugin is enabled | boolean | false |
bindAddress | The bind address on which the profiler listens on | string | "localhost:6060" |
Example:
{
"profiling": {
"enabled": false,
"bindAddress": "localhost:6060"
}
}
11. ProfilingRecorder
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the ProfilingRecorder plugin is enabled | boolean | false |
Example:
{
"profilingRecorder": {
"enabled": false
}
}
12. Prometheus
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the prometheus plugin is enabled | boolean | true |
bindAddress | The bind address on which the Prometheus exporter listens on | string | "0.0.0.0:2112" |
nodeMetrics | Whether to include node metrics | boolean | true |
blockWALMetrics | Whether to include block Write-Ahead Log (WAL) metrics | boolean | true |
consensusMetrics | Whether to include consensus metrics | boolean | true |
mempoolMetrics | Whether to include mempool metrics | boolean | true |
chainMessagesMetrics | Whether to include chain messages metrics | boolean | true |
chainStateMetrics | Whether to include chain state metrics | boolean | true |
restAPIMetrics | Whether to include restAPI metrics | boolean | true |
goMetrics | Whether to include go metrics | boolean | true |
processMetrics | Whether to include process metrics | boolean | true |
promhttpMetrics | Whether to include promhttp metrics | boolean | true |
Example:
{
"prometheus": {
"enabled": true,
"bindAddress": "0.0.0.0:2112",
"nodeMetrics": true,
"blockWALMetrics": true,
"consensusMetrics": true,
"mempoolMetrics": true,
"chainMessagesMetrics": true,
"chainStateMetrics": true,
"restAPIMetrics": true,
"goMetrics": true,
"processMetrics": true,
"promhttpMetrics": true
}
}
13. Web API
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the web api plugin is enabled | boolean | true |
bindAddress | The bind address for the node web api | string | "0.0.0.0:9090" |
nodeOwnerAddresses | Defines a list of node owner addresses (bech32) | array | |
auth | Configuration for auth | object | |
limits | Configuration for limits | object | |
debugRequestLoggerEnabled | Whether the debug logging for requests should be enabled | boolean | false |
Auth
Name | Description | Type | Default value |
---|---|---|---|
scheme | Selects which authentication to choose | string | "jwt" |
jwt | Configuration for JWT Auth | object | |
basic | Configuration for Basic Auth | object | |
ip | Configuration for IP-based Auth | object |
JWT Auth
Name | Description | Type | Default value |
---|---|---|---|
duration | Jwt token lifetime | string | "24h" |
Basic Auth
Name | Description | Type | Default value |
---|---|---|---|
username | The username which grants access to the service | string | "wasp" |
IP-based Auth
Name | Description | Type | Default value |
---|---|---|---|
whitelist | A list of ips that are allowed to access the service | array | 0.0.0.0 |
Limits
Name | Description | Type | Default value |
---|---|---|---|
timeout | The timeout after which a long running operation will be canceled | string | "30s" |
readTimeout | The read timeout for the HTTP request body | string | "10s" |
writeTimeout | The write timeout for the HTTP response body | string | "10s" |
maxBodyLength | The maximum number of characters that the body of an API call may contain | string | "2M" |
maxTopicSubscriptionsPerClient | Defines the max amount of subscriptions per client. 0 = deactivated (default) | int | 0 |
Example:
{
"webapi": {
"enabled": true,
"bindAddress": "0.0.0.0:9090",
"nodeOwnerAddresses": [],
"auth": {
"scheme": "jwt",
"jwt": {
"duration": "24h"
},
"basic": {
"username": "wasp"
},
"ip": {
"whitelist": [
"0.0.0.0"
]
}
},
"limits": {
"timeout": "30s",
"readTimeout": "10s",
"writeTimeout": "10s",
"maxBodyLength": "2M",
"maxTopicSubscriptionsPerClient": 0
},
"debugRequestLoggerEnabled": false
}
}