Skip to main content
Version: v1.4

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. Cache

NameDescriptionTypeDefault value
cacheSizeCache sizestring"64MiB"
cacheStatsIntervalInterval for printing cache statisticsstring"30s"
enabledWhether the cache plugin is enabledbooleantrue

Example:

  {
"cache": {
"cacheSize": "64MiB",
"cacheStatsInterval": "30s",
"enabled": true
}
}

5. Database

NameDescriptionTypeDefault value
engineThe used database engine (rocksdb/mapdb)string"rocksdb"
chainStateConfiguration for chainStateobject
debugSkipHealthCheckIgnore the check for corrupted databasesbooleantrue

ChainState

NameDescriptionTypeDefault value
pathThe path to the chain state databases folderstring"waspdb/chains/data"
cacheSizeSize of the RocksDB block cacheuint33554432

Example:

  {
"db": {
"engine": "rocksdb",
"chainState": {
"path": "waspdb/chains/data",
"cacheSize": 33554432
},
"debugSkipHealthCheck": true
}
}

6. 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"
}
}
}

7. 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"
}
}
}

8. 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
}
}

9. Chains

NameDescriptionTypeDefault value
broadcastUpToNPeersNumber of peers an offledger request is broadcasted toint2
broadcastIntervalTime between re-broadcast of offledger requests; 0 value means that re-broadcasting is disabledstring"0s"
apiCacheTTLTime to keep processed offledger requests in api cachestring"5m"
pullMissingRequestsFromCommitteeWhether or not to pull missing requests from other committee membersbooleantrue
deriveAliasOutputByQuorumFalse means we propose own AliasOutput, true - by majority vote.booleantrue
pipeliningLimit-1 -- infinite, 0 -- disabled, X -- build the chain if there is up to X transactions unconfirmed by L1.int-1
postponeRecoveryMilestonesNumber of milestones to wait until a chain transition is considered as rejectedint3
consensusDelayMinimal delay between consensus runs.string"500ms"
recoveryTimeoutTime after which another consensus attempt is made.string"20s"
redeliveryPeriodThe resend period for msg.string"2s"
printStatusPeriodThe period to print consensus instance status.string"3s"
consensusInstsInAdvanceint3
awaitReceiptCleanupEveryFor every this number AwaitReceipt will be cleaned upint100
mempoolTTLTime that requests are allowed to sit in the mempool without being processedstring"24h"
mempoolMaxOffledgerInPoolMaximum number of off-ledger requests kept in the mempoolint2000
mempoolMaxOnledgerInPoolMaximum number of on-ledger requests kept in the mempoolint1000
mempoolMaxTimedInPoolMaximum number of timed on-ledger requests kept in the mempoolint100
mempoolMaxOffledgerToProposeMaximum number of off-ledger requests to propose for the next blockint500
mempoolMaxOnledgerToProposeMaximum number of on-ledger requests to propose for the next block (includes timed requests)int100
mempoolOnLedgerRefreshMinIntervalMinimum 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

NameDescriptionTypeDefault value
snapshotsToLoadList 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 chainsarray
periodHow often state snapshots should be made: 1000 meaning "every 1000th state", 0 meaning "making snapshots is disabled"uint0
delayHow many states should pass before snapshot is produceduint20
localPathThe path to the snapshots folder in this node's diskstring"waspdb/snap"
networkPathsThe list of paths to the remote (http(s)) snapshot locations; each of listed locations must contain 'INDEX' file with list of snapshot filesarray

Example:

  {
"snapshots": {
"snapshotsToLoad": [],
"period": 0,
"delay": 20,
"localPath": "waspdb/snap",
"networkPaths": []
}
}

11. StateManager

NameDescriptionTypeDefault value
blockCacheMaxSizeHow many blocks may be stored in cache before old ones start being deletedint1000
blockCacheBlocksInCacheDurationHow long should the block stay in block cache before being deletedstring"1h"
blockCacheBlockCleaningPeriodHow often should the block cache be cleanedstring"1m"
stateManagerGetBlockNodeCountHow many nodes should get block request be sent toint5
stateManagerGetBlockRetryHow often get block requests should be repeatedstring"3s"
stateManagerRequestCleaningPeriodHow often requests waiting for response should be checked for expired contextstring"5m"
stateManagerStatusLogPeriodHow often state manager status information should be written to logstring"1m"
stateManagerTimerTickPeriodHow often timer tick fires in state managerstring"1s"
pruningMinStatesToKeepThis number of states will always be available in the store; if 0 - store pruning is disabledint10000
pruningMaxStatesToDeleteOn 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 pruningint10

Example:

  {
"stateManager": {
"blockCacheMaxSize": 1000,
"blockCacheBlocksInCacheDuration": "1h",
"blockCacheBlockCleaningPeriod": "1m",
"stateManagerGetBlockNodeCount": 5,
"stateManagerGetBlockRetry": "3s",
"stateManagerRequestCleaningPeriod": "5m",
"stateManagerStatusLogPeriod": "1m",
"stateManagerTimerTickPeriod": "1s",
"pruningMinStatesToKeep": 10000,
"pruningMaxStatesToDelete": 10
}
}

12. Validator

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

NameDescriptionTypeDefault value
loadToStoreLoad blocks from "write-ahead log" to the store on node start-upbooleanfalse
enabledWhether the "write-ahead logging" is enabledbooleantrue
pathThe path to the "write-ahead logging" folderstring"waspdb/wal"

Example:

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

14. Web API

NameDescriptionTypeDefault value
enabledWhether the web api plugin is enabledbooleantrue
bindAddressThe bind address for the node web apistring"0.0.0.0:9090"
authConfiguration for authobject
indexDbPathDirectory for storing indexes of historical data (only archive nodes will create/use them)string"waspdb/chains/index"
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

JWT Auth

NameDescriptionTypeDefault value
durationJwt token lifetimestring"24h"

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"1m"
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
confirmedStateLagThresholdThe threshold that define a chain is unsynchronizeduint2
jsonrpcConfiguration for jsonrpcobject

Jsonrpc

NameDescriptionTypeDefault value
maxBlocksInLogsFilterRangeMaximum amount of blocks in eth_getLogs filter rangeint1000
maxLogsInResultMaximum amount of logs in eth_getLogs resultint10000
websocketRateLimitMessagesPerSecondThe websocket rate limit (messages per second)int20
websocketRateLimitBurstThe websocket burst limitint5
websocketConnectionCleanupDurationDefines in which interval stale connections will be cleaned upstring"5m"
websocketClientBlockDurationThe duration a misbehaving client will be blockedstring"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

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

Example:

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

16. ProfilingRecorder

NameDescriptionTypeDefault value
enabledWhether the ProfilingRecorder plugin is enabledbooleanfalse

Example:

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

17. Prometheus

NameDescriptionTypeDefault value
enabledWhether the prometheus plugin is enabledbooleantrue
bindAddressThe bind address on which the Prometheus exporter listens onstring"0.0.0.0:2112"

Example:

  {
"prometheus": {
"enabled": true,
"bindAddress": "0.0.0.0:2112"
}
}
  • 1. Application
    • Shutdown
    • Shutdown Log
  • 2. Logger
    • EncodingConfig
  • 3. INX
  • 4. Cache
  • 5. Database
    • ChainState
  • 6. P2p
    • Identity
    • Database
  • 7. Registries
    • Chains
    • DkShares
    • TrustedPeers
    • ConsensusState
  • 8. Peering
  • 9. Chains
  • 10. Snapshots
  • 11. StateManager
  • 12. Validator
  • 13. Write-Ahead Logging
  • 14. Web API
    • Auth
    • JWT Auth
    • Limits
    • Jsonrpc
  • 15. Profiling
  • 16. ProfilingRecorder
  • 17. Prometheus