Skip to main content
Version: 2.0

Core Configuration

INX-api-core-v1 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-v1 executable.

For example:

inx-api-core-v1 -c config_defaults.json

You can always get the most up-to-date description of the config parameters by running:

inx-api-core-v1 -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
utxoConfiguration for UTXOobject
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"

UTXO

NameDescriptionTypeDefault value
pathThe path to the UTXO database folderstring"database/utxo"

Example:

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

4. Protocol

NameDescriptionTypeDefault value
networkIDThe network ID on which this app operates onstring"chrysalis-mainnet"
bech32HRPThe HRP which should be used for Bech32 addressesstring"iota"

Example:

{
"protocol": {
"networkID": "chrysalis-mainnet",
"bech32HRP": "iota"
}
}

5. RestAPI

NameDescriptionTypeDefault value
bindAddressThe bind address on which the chrysalis API HTTP server listensstring"localhost:9094"
advertiseAddressThe address of the chrysalis 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:9094",
"advertiseAddress": "",
"limits": {
"maxBodyLength": "1M",
"maxResults": 1000
},
"swaggerEnabled": false,
"debugRequestLoggerEnabled": false
}
}

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

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

8. 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
    • UTXO
  • 4. Protocol
  • 5. RestAPI
    • Limits
  • 6. INX
  • 7. Profiling
  • 8. Prometheus