Skip to main content

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

NameDescriptionTypeDefault value
checkForUpdatesWhether to check for updates of the application or notbooleantrue
shutdownConfiguration for shutdownobject

Shutdown

NameDescriptionTypeDefault value
stopGracePeriodThe maximum time to wait for background processes to finish during shutdown before terminating the appstring"5m"
logConfiguration for Shutdown Logobject

Shutdown Log

NameDescriptionTypeDefault value
enabledWhether to store self-shutdown events to a log filebooleantrue
filePathThe file path to the self-shutdown logstring"shutdown.log"

Example:

  {
"app": {
"checkForUpdates": true,
"shutdown": {
"stopGracePeriod": "5m",
"log": {
"enabled": true,
"filePath": "shutdown.log"
}
}
}
}

2. Logger

NameDescriptionTypeDefault value
levelThe minimum enabled logging levelstring"info"
disableCallerStops annotating logs with the calling function's file name and line numberbooleantrue
disableStacktraceDisables automatic stacktrace capturingbooleanfalse
stacktraceLevelThe level stacktraces are captured and abovestring"panic"
encodingThe logger's encoding (options: "json", "console")string"console"
encodingConfigConfiguration for encodingConfigobject
outputPathsA list of URLs, file paths or stdout/stderr to write logging output toarraystdout
disableEventsPrevents log messages from being raced as eventsbooleantrue

EncodingConfig

NameDescriptionTypeDefault value
timeEncoderSets 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

NameDescriptionTypeDefault value
addressThe INX address to which to connect tostring"localhost:9029"
maxConnectionAttemptsThe amount of times the connection to INX will be attempted before it fails (1 attempt per second)uint30
targetNetworkNameThe network name on which the node should operate on (optional)string""

Example:

  {
"inx": {
"address": "localhost:9029",
"maxConnectionAttempts": 30,
"targetNetworkName": ""
}
}

4. Database

NameDescriptionTypeDefault value
engineThe used database engine (rocksdb/mapdb)string"rocksdb"
chainStateConfiguration for chainStateobject
debugSkipHealthCheckIgnore the check for corrupted databases (should only be used for debug reasons)booleanfalse

ChainState

NameDescriptionTypeDefault value
pathThe path to the chain state databases folderstring"waspdb/chains/data"

Example:

  {
"db": {
"engine": "rocksdb",
"chainState": {
"path": "waspdb/chains/data"
},
"debugSkipHealthCheck": false
}
}

5. P2p

NameDescriptionTypeDefault value
identityConfiguration for identityobject
dbConfiguration for Databaseobject

Identity

NameDescriptionTypeDefault value
privateKeyPrivate key used to derive the node identity (optional)string""
filePathThe path to the node identity PEM filestring"waspdb/identity/identity.key"

Database

NameDescriptionTypeDefault value
pathThe path to the p2p databasestring"waspdb/p2pstore"

Example:

  {
"p2p": {
"identity": {
"privateKey": "",
"filePath": "waspdb/identity/identity.key"
},
"db": {
"path": "waspdb/p2pstore"
}
}
}

6. Registries

NameDescriptionTypeDefault value
chainsConfiguration for chainsobject
dkSharesConfiguration for dkSharesobject
trustedPeersConfiguration for trustedPeersobject
consensusStateConfiguration for consensusStateobject

Chains

NameDescriptionTypeDefault value
filePathThe path to the chain registry filestring"waspdb/chains/chain_registry.json"

DkShares

NameDescriptionTypeDefault value
pathThe path to the distributed key shares registries folderstring"waspdb/dkshares"

TrustedPeers

NameDescriptionTypeDefault value
filePathThe path to the trusted peers registry filestring"waspdb/trusted_peers.json"

ConsensusState

NameDescriptionTypeDefault value
pathThe path to the consensus state registries folderstring"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

NameDescriptionTypeDefault value
peeringURLNode host address as it is recognized by other peersstring"0.0.0.0:4000"
portPort for Wasp committee connection/peeringint4000

Example:

  {
"peering": {
"peeringURL": "0.0.0.0:4000",
"port": 4000
}
}

8. Chains

NameDescriptionTypeDefault value
broadcastUpToNPeersNumber of peers an offledger request is broadcasted toint2
broadcastIntervalTime between re-broadcast of offledger requestsstring"5s"
apiCacheTTLTime to keep processed offledger requests in api cachestring"5m"
pullMissingRequestsFromCommitteeWhether or not to pull missing requests from other committee membersbooleantrue

Example:

  {
"chains": {
"broadcastUpToNPeers": 2,
"broadcastInterval": "5s",
"apiCacheTTL": "5m",
"pullMissingRequestsFromCommittee": true
}
}

9. Write-Ahead Logging

NameDescriptionTypeDefault value
enabledWhether the "write-ahead logging" is enabledbooleantrue
pathThe path to the "write-ahead logging" folderstring"waspdb/wal"

Example:

  {
"wal": {
"enabled": true,
"path": "waspdb/wal"
}
}

10. Profiling

NameDescriptionTypeDefault value
enabledWhether the profiling plugin is enabledbooleanfalse
bindAddressThe bind address on which the profiler listens onstring"localhost:6060"

Example:

  {
"profiling": {
"enabled": false,
"bindAddress": "localhost:6060"
}
}

11. ProfilingRecorder

NameDescriptionTypeDefault value
enabledWhether the ProfilingRecorder plugin is enabledbooleanfalse

Example:

  {
"profilingRecorder": {
"enabled": false
}
}

12. Prometheus

NameDescriptionTypeDefault value
enabledWhether the prometheus plugin is enabledbooleantrue
bindAddressThe bind address on which the Prometheus exporter listens onstring"0.0.0.0:2112"
nodeMetricsWhether to include node metricsbooleantrue
blockWALMetricsWhether to include block Write-Ahead Log (WAL) metricsbooleantrue
consensusMetricsWhether to include consensus metricsbooleantrue
mempoolMetricsWhether to include mempool metricsbooleantrue
chainMessagesMetricsWhether to include chain messages metricsbooleantrue
chainStateMetricsWhether to include chain state metricsbooleantrue
restAPIMetricsWhether to include restAPI metricsbooleantrue
goMetricsWhether to include go metricsbooleantrue
processMetricsWhether to include process metricsbooleantrue
promhttpMetricsWhether to include promhttp metricsbooleantrue

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

NameDescriptionTypeDefault value
enabledWhether the web api plugin is enabledbooleantrue
bindAddressThe bind address for the node web apistring"0.0.0.0:9090"
nodeOwnerAddressesDefines a list of node owner addresses (bech32)array
authConfiguration for authobject
limitsConfiguration for limitsobject
debugRequestLoggerEnabledWhether the debug logging for requests should be enabledbooleanfalse

Auth

NameDescriptionTypeDefault value
schemeSelects which authentication to choosestring"jwt"
jwtConfiguration for JWT Authobject
basicConfiguration for Basic Authobject
ipConfiguration for IP-based Authobject

JWT Auth

NameDescriptionTypeDefault value
durationJwt token lifetimestring"24h"

Basic Auth

NameDescriptionTypeDefault value
usernameThe username which grants access to the servicestring"wasp"

IP-based Auth

NameDescriptionTypeDefault value
whitelistA list of ips that are allowed to access the servicearray0.0.0.0

Limits

NameDescriptionTypeDefault value
timeoutThe timeout after which a long running operation will be canceledstring"30s"
readTimeoutThe read timeout for the HTTP request bodystring"10s"
writeTimeoutThe write timeout for the HTTP response bodystring"10s"
maxBodyLengthThe maximum number of characters that the body of an API call may containstring"2M"
maxTopicSubscriptionsPerClientDefines the max amount of subscriptions per client. 0 = deactivated (default)int0

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
}
}
  • 1. Application
    • Shutdown
    • Shutdown Log
  • 2. Logger
    • EncodingConfig
  • 3. INX
  • 4. Database
    • ChainState
  • 5. P2p
    • Identity
    • Database
  • 6. Registries
    • Chains
    • DkShares
    • TrustedPeers
    • ConsensusState
  • 7. Peering
  • 8. Chains
  • 9. Write-Ahead Logging
  • 10. Profiling
  • 11. ProfilingRecorder
  • 12. Prometheus
  • 13. Web API
    • Auth
    • JWT Auth
    • Basic Auth
    • IP-based Auth
    • Limits