Core Configuration
INX-api-core-v0 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 inx-api-core-v0
executable.
For example:
inx-api-core-v0 -c config_defaults.json
You can always get the most up-to-date description of the config parameters by running:
inx-api-core-v0 -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. Database
Name | Description | Type | Default value |
---|---|---|---|
tangle | Configuration for tangle | object | |
snapshot | Configuration for snapshot | object | |
spent | Configuration for spent | object | |
debug | Ignore the check for corrupted databases (should only be used for debug reasons) | boolean | false |
Tangle
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the tangle database folder | string | "database/tangle" |
Snapshot
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the snapshot database folder | string | "database/snapshot" |
Spent
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the spent database folder | string | "database/spent" |
Example:
{
"db": {
"tangle": {
"path": "database/tangle"
},
"snapshot": {
"path": "database/snapshot"
},
"spent": {
"path": "database/spent"
},
"debug": false
}
}
4. RestAPI
Name | Description | Type | Default value |
---|---|---|---|
bindAddress | The bind address on which the legacy API HTTP server listens | string | "localhost:9093" |
advertiseAddress | The address of the legacy API HTTP server which is advertised to the INX Server (optional) | string | "" |
limits | Configuration for limits | object | |
swaggerEnabled | Whether to provide swagger API documentation under endpoint "/swagger" | boolean | false |
debugRequestLoggerEnabled | Whether the debug logging for requests should be enabled | boolean | false |
Limits
Name | Description | Type | Default value |
---|---|---|---|
maxBodyLength | The maximum number of characters that the body of an API call may contain | string | "1M" |
maxResults | The maximum number of results that may be returned by an endpoint | int | 1000 |
Example:
{
"restAPI": {
"bindAddress": "localhost:9093",
"advertiseAddress": "",
"limits": {
"maxBodyLength": "1M",
"maxResults": 1000
},
"swaggerEnabled": false,
"debugRequestLoggerEnabled": false
}
}
5. INX
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether to connect to a node via INX | boolean | false |
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": {
"enabled": false,
"address": "localhost:9029",
"maxConnectionAttempts": 30,
"targetNetworkName": ""
}
}
6. 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"
}
}
7. Prometheus
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the prometheus plugin is enabled | boolean | false |
bindAddress | The bind address on which the Prometheus HTTP server listens on | string | "localhost:9312" |
goMetrics | Whether to include go metrics | boolean | false |
processMetrics | Whether to include process metrics | boolean | false |
restAPIMetrics | Whether to include restAPI metrics | boolean | true |
inxMetrics | Whether to include INX metrics | boolean | true |
promhttpMetrics | Whether to include promhttp metrics | boolean | false |
Example:
{
"prometheus": {
"enabled": false,
"bindAddress": "localhost:9312",
"goMetrics": false,
"processMetrics": false,
"restAPIMetrics": true,
"inxMetrics": true,
"promhttpMetrics": false
}
}