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. Cache
Name | Description | Type | Default value |
---|---|---|---|
cacheSize | Cache size | string | "64MiB" |
cacheStatsInterval | Interval for printing cache statistics | string | "30s" |
enabled | Whether the cache plugin is enabled | boolean | true |
Example:
{
"cache": {
"cacheSize": "64MiB",
"cacheStatsInterval": "30s",
"enabled": true
}
}
5. 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 | boolean | true |
ChainState
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the chain state databases folder | string | "waspdb/chains/data" |
cacheSize | Size of the RocksDB block cache | uint | 33554432 |
Example:
{
"db": {
"engine": "rocksdb",
"chainState": {
"path": "waspdb/chains/data",
"cacheSize": 33554432
},
"debugSkipHealthCheck": true
}
}
6. 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"
}
}
}
7. 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"
}
}
}
8. 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
}
}
9. 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; 0 value means that re-broadcasting is disabled | string | "0s" |
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 |
deriveAliasOutputByQuorum | False means we propose own AliasOutput, true - by majority vote. | boolean | true |
pipeliningLimit | -1 -- infinite, 0 -- disabled, X -- build the chain if there is up to X transactions unconfirmed by L1. | int | -1 |
postponeRecoveryMilestones | Number of milestones to wait until a chain transition is considered as rejected | int | 3 |
consensusDelay | Minimal delay between consensus runs. | string | "500ms" |
recoveryTimeout | Time after which another consensus attempt is made. | string | "20s" |
redeliveryPeriod | The resend period for msg. | string | "2s" |
printStatusPeriod | The period to print consensus instance status. | string | "3s" |
consensusInstsInAdvance | int | 3 | |
awaitReceiptCleanupEvery | For every this number AwaitReceipt will be cleaned up | int | 100 |
mempoolTTL | Time that requests are allowed to sit in the mempool without being processed | string | "24h" |
mempoolMaxOffledgerInPool | Maximum number of off-ledger requests kept in the mempool | int | 2000 |
mempoolMaxOnledgerInPool | Maximum number of on-ledger requests kept in the mempool | int | 1000 |
mempoolMaxTimedInPool | Maximum number of timed on-ledger requests kept in the mempool | int | 100 |
mempoolMaxOffledgerToPropose | Maximum number of off-ledger requests to propose for the next block | int | 500 |
mempoolMaxOnledgerToPropose | Maximum number of on-ledger requests to propose for the next block (includes timed requests) | int | 100 |
mempoolOnLedgerRefreshMinInterval | Minimum interval to try to refresh the list of on-ledger requests after some have been dropped from the pool (this interval is introduced to avoid dropping/refreshing cycle if there are too many requests on L1 to process) | string | "10m" |
Example:
{
"chains": {
"broadcastUpToNPeers": 2,
"broadcastInterval": "0s",
"apiCacheTTL": "5m",
"pullMissingRequestsFromCommittee": true,
"deriveAliasOutputByQuorum": true,
"pipeliningLimit": -1,
"postponeRecoveryMilestones": 3,
"consensusDelay": "500ms",
"recoveryTimeout": "20s",
"redeliveryPeriod": "2s",
"printStatusPeriod": "3s",
"consensusInstsInAdvance": 3,
"awaitReceiptCleanupEvery": 100,
"mempoolTTL": "24h",
"mempoolMaxOffledgerInPool": 2000,
"mempoolMaxOnledgerInPool": 1000,
"mempoolMaxTimedInPool": 100,
"mempoolMaxOffledgerToPropose": 500,
"mempoolMaxOnledgerToPropose": 100,
"mempoolOnLedgerRefreshMinInterval": "10m"
}
}
10. Snapshots
Name | Description | Type | Default value |
---|---|---|---|
snapshotsToLoad | List of snapshots to load; can be either single block hash of a snapshot (if a single chain has to be configured) or list of <chainID>:<blockHash> to configure many chains | array | |
period | How often state snapshots should be made: 1000 meaning "every 1000th state", 0 meaning "making snapshots is disabled" | uint | 0 |
delay | How many states should pass before snapshot is produced | uint | 20 |
localPath | The path to the snapshots folder in this node's disk | string | "waspdb/snap" |
networkPaths | The list of paths to the remote (http(s)) snapshot locations; each of listed locations must contain 'INDEX' file with list of snapshot files | array |
Example:
{
"snapshots": {
"snapshotsToLoad": [],
"period": 0,
"delay": 20,
"localPath": "waspdb/snap",
"networkPaths": []
}
}
11. StateManager
Name | Description | Type | Default value |
---|---|---|---|
blockCacheMaxSize | How many blocks may be stored in cache before old ones start being deleted | int | 1000 |
blockCacheBlocksInCacheDuration | How long should the block stay in block cache before being deleted | string | "1h" |
blockCacheBlockCleaningPeriod | How often should the block cache be cleaned | string | "1m" |
stateManagerGetBlockNodeCount | How many nodes should get block request be sent to | int | 5 |
stateManagerGetBlockRetry | How often get block requests should be repeated | string | "3s" |
stateManagerRequestCleaningPeriod | How often requests waiting for response should be checked for expired context | string | "5m" |
stateManagerStatusLogPeriod | How often state manager status information should be written to log | string | "1m" |
stateManagerTimerTickPeriod | How often timer tick fires in state manager | string | "1s" |
pruningMinStatesToKeep | This number of states will always be available in the store; if 0 - store pruning is disabled | int | 10000 |
pruningMaxStatesToDelete | On single store pruning attempt at most this number of states will be deleted; NOTE: pruning takes considerable amount of time; setting this parameter large may seriously damage Wasp responsiveness if many blocks require pruning | int | 10 |
Example:
{
"stateManager": {
"blockCacheMaxSize": 1000,
"blockCacheBlocksInCacheDuration": "1h",
"blockCacheBlockCleaningPeriod": "1m",
"stateManagerGetBlockNodeCount": 5,
"stateManagerGetBlockRetry": "3s",
"stateManagerRequestCleaningPeriod": "5m",
"stateManagerStatusLogPeriod": "1m",
"stateManagerTimerTickPeriod": "1s",
"pruningMinStatesToKeep": 10000,
"pruningMaxStatesToDelete": 10
}
}
12. Validator
Name | Description | Type | Default value |
---|---|---|---|
address | Bech32 encoded address to identify the node (as access node on gov contract and to collect validator fee payments) | string | "" |
Example:
{
"validator": {
"address": ""
}
}
13. Write-Ahead Logging
Name | Description | Type | Default value |
---|---|---|---|
loadToStore | Load blocks from "write-ahead log" to the store on node start-up | boolean | false |
enabled | Whether the "write-ahead logging" is enabled | boolean | true |
path | The path to the "write-ahead logging" folder | string | "waspdb/wal" |
Example:
{
"wal": {
"loadToStore": false,
"enabled": true,
"path": "waspdb/wal"
}
}
14. 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" |
auth | Configuration for auth | object | |
indexDbPath | Directory for storing indexes of historical data (only archive nodes will create/use them) | string | "waspdb/chains/index" |
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 |
JWT Auth
Name | Description | Type | Default value |
---|---|---|---|
duration | Jwt token lifetime | string | "24h" |
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 | "1m" |
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 |
confirmedStateLagThreshold | The threshold that define a chain is unsynchronized | uint | 2 |
jsonrpc | Configuration for jsonrpc | object |
Jsonrpc
Name | Description | Type | Default value |
---|---|---|---|
maxBlocksInLogsFilterRange | Maximum amount of blocks in eth_getLogs filter range | int | 1000 |
maxLogsInResult | Maximum amount of logs in eth_getLogs result | int | 10000 |
websocketRateLimitMessagesPerSecond | The websocket rate limit (messages per second) | int | 20 |
websocketRateLimitBurst | The websocket burst limit | int | 5 |
websocketConnectionCleanupDuration | Defines in which interval stale connections will be cleaned up | string | "5m" |
websocketClientBlockDuration | The duration a misbehaving client will be blocked | string | "5m" |
Example:
{
"webapi": {
"enabled": true,
"bindAddress": "0.0.0.0:9090",
"auth": {
"scheme": "jwt",
"jwt": {
"duration": "24h"
}
},
"indexDbPath": "waspdb/chains/index",
"limits": {
"timeout": "30s",
"readTimeout": "10s",
"writeTimeout": "1m",
"maxBodyLength": "2M",
"maxTopicSubscriptionsPerClient": 0,
"confirmedStateLagThreshold": 2,
"jsonrpc": {
"maxBlocksInLogsFilterRange": 1000,
"maxLogsInResult": 10000,
"websocketRateLimitMessagesPerSecond": 20,
"websocketRateLimitBurst": 5,
"websocketConnectionCleanupDuration": "5m",
"websocketClientBlockDuration": "5m"
}
},
"debugRequestLoggerEnabled": false
}
}
15. Profiling
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the profiling component is enabled | boolean | false |
bindAddress | The bind address on which the profiler listens on | string | "localhost:6060" |
Example:
{
"profiling": {
"enabled": false,
"bindAddress": "localhost:6060"
}
}
16. ProfilingRecorder
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the ProfilingRecorder plugin is enabled | boolean | false |
Example:
{
"profilingRecorder": {
"enabled": false
}
}
17. 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" |
Example:
{
"prometheus": {
"enabled": true,
"bindAddress": "0.0.0.0:2112"
}
}