Skip to main content

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

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

NameDescriptionTypeDefault value
tangleConfiguration for tangleobject
snapshotConfiguration for snapshotobject
spentConfiguration for spentobject
debugIgnore the check for corrupted databases (should only be used for debug reasons)booleanfalse

Tangle

NameDescriptionTypeDefault value
pathThe path to the tangle database folderstring"database/tangle"

Snapshot

NameDescriptionTypeDefault value
pathThe path to the snapshot database folderstring"database/snapshot"

Spent

NameDescriptionTypeDefault value
pathThe path to the spent database folderstring"database/spent"

Example:

{
"db": {
"tangle": {
"path": "database/tangle"
},
"snapshot": {
"path": "database/snapshot"
},
"spent": {
"path": "database/spent"
},
"debug": false
}
}

4. RestAPI

NameDescriptionTypeDefault value
bindAddressThe bind address on which the legacy API HTTP server listensstring"localhost:9093"
advertiseAddressThe address of the legacy API HTTP server which is advertised to the INX Server (optional)string""
limitsConfiguration for limitsobject
swaggerEnabledWhether to provide swagger API documentation under endpoint "/swagger"booleanfalse
debugRequestLoggerEnabledWhether the debug logging for requests should be enabledbooleanfalse

Limits

NameDescriptionTypeDefault value
maxBodyLengthThe maximum number of characters that the body of an API call may containstring"1M"
maxResultsThe maximum number of results that may be returned by an endpointint1000

Example:

{
"restAPI": {
"bindAddress": "localhost:9093",
"advertiseAddress": "",
"limits": {
"maxBodyLength": "1M",
"maxResults": 1000
},
"swaggerEnabled": false,
"debugRequestLoggerEnabled": false
}
}

5. INX

NameDescriptionTypeDefault value
enabledWhether to connect to a node via INXbooleanfalse
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": {
"enabled": false,
"address": "localhost:9029",
"maxConnectionAttempts": 30,
"targetNetworkName": ""
}
}

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

7. Prometheus

NameDescriptionTypeDefault value
enabledWhether the prometheus plugin is enabledbooleanfalse
bindAddressThe bind address on which the Prometheus HTTP server listens onstring"localhost:9312"
goMetricsWhether to include go metricsbooleanfalse
processMetricsWhether to include process metricsbooleanfalse
restAPIMetricsWhether to include restAPI metricsbooleantrue
inxMetricsWhether to include INX metricsbooleantrue
promhttpMetricsWhether to include promhttp metricsbooleanfalse

Example:

{
"prometheus": {
"enabled": false,
"bindAddress": "localhost:9312",
"goMetrics": false,
"processMetrics": false,
"restAPIMetrics": true,
"inxMetrics": true,
"promhttpMetrics": false
}
}
  • 1. Application
    • Shutdown
    • Shutdown Log
  • 2. Logger
    • EncodingConfig
  • 3. Database
    • Tangle
    • Snapshot
    • Spent
  • 4. RestAPI
    • Limits
  • 5. INX
  • 6. Profiling
  • 7. Prometheus