HORNET 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 hornet
executable.
For example:
hornet -c config_example.json
You can always get the most up-to-date description of the config parameters by running:
hornet -h --full
Name | Description | Type | Default value |
---|---|---|---|
checkForUpdates | Whether to check for updates of the application or not | boolean | true |
shutdown | Configuration for shutdown | object |
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 log | object |
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"
}
}
}
}
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 |
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
}
}
Name | Description | Type | Default value |
---|---|---|---|
profile | The profile the node runs with | string | "auto" |
alias | Set an alias to identify a node | string | "HORNET node" |
Example:
{
"node": {
"profile": "auto",
"alias": "HORNET node"
}
}
Name | Description | Type | Default value |
---|---|---|---|
targetNetworkName | The initial network name on which this node operates on | string | "iota-mainnet" |
milestonePublicKeyCount | The amount of public keys in a milestone | int | 7 |
baseToken | Configuration for baseToken | object | |
publicKeyRanges | Configuration for publicKeyRanges | array | see example below |
Name | Description | Type | Default value |
---|---|---|---|
name | The base token name | string | "IOTA" |
tickerSymbol | The base token ticker symbol | string | "IOTA" |
unit | The base token unit | string | "IOTA" |
subunit | The base token subunit | string | "micro" |
decimals | The base token amount of decimals | uint | 6 |
useMetricPrefix | The base token uses the metric prefix | boolean | false |
Name | Description | Type | Default value |
---|---|---|---|
key | The ed25519 public key of the coordinator in hex representation | string | "0000000000000000000000000000000000000000000000000000000000000000" |
startIndex | The start milestone index of the public key | uint | 0 |
endIndex | The end milestone index of the public key | uint | 0 |
Example:
{
"protocol": {
"targetNetworkName": "iota-mainnet",
"milestonePublicKeyCount": 7,
"baseToken": {
"name": "IOTA",
"tickerSymbol": "IOTA",
"unit": "IOTA",
"subunit": "micro",
"decimals": 6,
"useMetricPrefix": false
},
"publicKeyRanges": [
{
"key": "2fb1d7ec714adf365eefa343b66c0c459a9930276aff08cde482cb8050028624",
"start": 0,
"end": 0
},
{
"key": "8845cd560d66d50070c6e251d7a0a19f8de217fabf53a78ee15b41d85a489cc6",
"start": 0,
"end": 0
},
{
"key": "1d61aab6f7e52129b78fcdf9568def0baa9c71112964f5b4d86ffc406866a986",
"start": 0,
"end": 0
},
{
"key": "fa94be504dfb10876a449db5272f19393ded922cbe3b023b4e57b62a53835721",
"start": 0,
"end": 0
},
{
"key": "5fadfabe6944f5f0166ada11452c642010339f916e28187ecf8b4a207c8dba47",
"start": 0,
"end": 0
},
{
"key": "347e6892d72b71e0423bd14daaf61d2ac35e91852fa5b155b92ddda0e064f55f",
"start": 0,
"end": 0
},
{
"key": "0e403f526a66b4c0b18e8b0257671b07892a419e4b6e4540707d9a4793d1e3be",
"start": 0,
"end": 0
},
{
"key": "3af73a609696ff6fe63c36d060455cd83ec23edea2d2b87d5317004849cc0e9a",
"start": 0,
"end": 0
},
{
"key": "ee1bfa9e791a9f57ea72c6192b000d906f21479ba8f40bb20cdd8badb7ddcb78",
"start": 0,
"end": 0
},
{
"key": "083d7af99250a06d086b07bdd5bccd2bff406ee17e19332ccdb08d8be72218ce",
"start": 0,
"end": 0
}
]
}
}
Name | Description | Type | Default value |
---|---|---|---|
engine | The used database engine (pebble/rocksdb/mapdb) | string | "rocksdb" |
path | The path to the database folder | string | "mainnet/database" |
autoRevalidation | Whether to automatically start revalidation on startup if the database is corrupted | boolean | false |
checkLedgerStateOnStartup | Whether to check if the ledger state matches the total supply on startup | boolean | false |
Example:
{
"db": {
"engine": "rocksdb",
"path": "mainnet/database",
"autoRevalidation": false,
"checkLedgerStateOnStartup": false
}
}
Name | Description | Type | Default value |
---|---|---|---|
refreshTipsInterval | Interval for refreshing tips during PoW for blocks passed without parents via API | string | "5s" |
Example:
{
"pow": {
"refreshTipsInterval": "5s"
}
}
Name | Description | Type | Default value |
---|---|---|---|
bindMultiAddresses | The bind addresses for this node | array | /ip4/0.0.0.0/tcp/15600 /ip6/::/tcp/15600 |
connectionManager | Configuration for connectionManager | object | |
identityPrivateKey | Private key used to derive the node identity (optional) | string | "" |
db | Configuration for Database | object | |
reconnectInterval | The time to wait before trying to reconnect to a disconnected peer | string | "30s" |
gossip | Configuration for gossip | object | |
autopeering | Configuration for autopeering | object |
Name | Description | Type | Default value |
---|---|---|---|
highWatermark | The threshold up on which connections count truncates to the lower watermark | int | 10 |
lowWatermark | The minimum connections count to hold after the high watermark was reached | int | 5 |
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the p2p database | string | "mainnet/p2pstore" |
Name | Description | Type | Default value |
---|---|---|---|
unknownPeersLimit | Maximum amount of unknown peers a gossip protocol connection is established to | int | 4 |
streamReadTimeout | The read timeout for reads from the gossip stream | string | "1m" |
streamWriteTimeout | The write timeout for writes to the gossip stream | string | "10s" |
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the autopeering plugin is enabled | boolean | false |
bindAddress | Bind address for autopeering | string | "0.0.0.0:14626" |
entryNodes | List of autopeering entry nodes to use | array | /dns/entry-hornet-0.h.stardust-mainnet.iotaledger.net/udp/14626/autopeering/K4cHM64KxzYJ5ZB2a9P3stJUHjvQDh4bzhCw49xDowi /dns/entry-hornet-1.h.stardust-mainnet.iotaledger.net/udp/14626/autopeering/8UbVu5MjRZH2c9fnEdpfPvd7qqDgrVFsNsvc933FuMTm |
entryNodesPreferIPv6 | Defines if connecting over IPv6 is preferred for entry nodes | boolean | false |
runAsEntryNode | Whether the node should act as an autopeering entry node | boolean | false |
Example:
{
"p2p": {
"bindMultiAddresses": [
"/ip4/0.0.0.0/tcp/15600",
"/ip6/::/tcp/15600"
],
"connectionManager": {
"highWatermark": 10,
"lowWatermark": 5
},
"identityPrivateKey": "",
"db": {
"path": "mainnet/p2pstore"
},
"reconnectInterval": "30s",
"gossip": {
"unknownPeersLimit": 4,
"streamReadTimeout": "1m",
"streamWriteTimeout": "10s"
},
"autopeering": {
"enabled": false,
"bindAddress": "0.0.0.0:14626",
"entryNodes": [
"/dns/entry-hornet-0.h.stardust-mainnet.iotaledger.net/udp/14626/autopeering/K4cHM64KxzYJ5ZB2a9P3stJUHjvQDh4bzhCw49xDowi",
"/dns/entry-hornet-1.h.stardust-mainnet.iotaledger.net/udp/14626/autopeering/8UbVu5MjRZH2c9fnEdpfPvd7qqDgrVFsNsvc933FuMTm"
],
"entryNodesPreferIPv6": false,
"runAsEntryNode": false
}
}
}
Name | Description | Type | Default value |
---|---|---|---|
discardOlderThan | The maximum time a request stays in the request queue | string | "15s" |
pendingReEnqueueInterval | The interval the pending requests are re-enqueued | string | "5s" |
Example:
{
"requests": {
"discardOlderThan": "15s",
"pendingReEnqueueInterval": "5s"
}
}
Name | Description | Type | Default value |
---|---|---|---|
milestoneTimeout | The interval milestone timeout events are fired if no new milestones are received | string | "30s" |
maxDeltaBlockYoungestConeRootIndexToCMI | The maximum allowed delta value for the YCRI of a given block in relation to the current CMI before it gets lazy | int | 8 |
maxDeltaBlockOldestConeRootIndexToCMI | The maximum allowed delta value between OCRI of a given block in relation to the current CMI before it gets semi-lazy | int | 13 |
whiteFlagParentsSolidTimeout | Defines the the maximum duration for the parents to become solid during white flag confirmation API or INX call | string | "2s" |
Example:
{
"tangle": {
"milestoneTimeout": "30s",
"maxDeltaBlockYoungestConeRootIndexToCMI": 8,
"maxDeltaBlockOldestConeRootIndexToCMI": 13,
"whiteFlagParentsSolidTimeout": "2s"
}
}
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether to generate snapshot files | boolean | false |
depth | The depth, respectively the starting point, at which a snapshot of the ledger is generated | int | 50 |
interval | Interval, in milestones, at which snapshot files are created (snapshots are only created if the node is synced) | int | 200 |
fullPath | Path to the full snapshot file | string | "mainnet/snapshots/full_snapshot.bin" |
deltaPath | Path to the delta snapshot file | string | "mainnet/snapshots/delta_snapshot.bin" |
deltaSizeThresholdPercentage | Create a full snapshot if the size of a delta snapshot reaches a certain percentage of the full snapshot (0.0 = always create delta snapshot to keep ms diff history) | float | 50.0 |
deltaSizeThresholdMinSize | The minimum size of the delta snapshot file before the threshold percentage condition is checked (below that size the delta snapshot is always created) | string | "50M" |
downloadURLs | Configuration for downloadURLs | array | see example below |
Name | Description | Type | Default value |
---|---|---|---|
full | URL of the full snapshot file | string | "" |
delta | URL of the delta snapshot file | string | "" |
Example:
{
"snapshots": {
"enabled": false,
"depth": 50,
"interval": 200,
"fullPath": "mainnet/snapshots/full_snapshot.bin",
"deltaPath": "mainnet/snapshots/delta_snapshot.bin",
"deltaSizeThresholdPercentage": 50,
"deltaSizeThresholdMinSize": "50M",
"downloadURLs": [
{
"full": "https://files.stardust-mainnet.iotaledger.net/snapshots/latest-full_snapshot.bin",
"delta": "https://files.stardust-mainnet.iotaledger.net/snapshots/latest-delta_snapshot.bin"
}
]
}
}
Name | Description | Type | Default value |
---|---|---|---|
milestones | Configuration for milestones | object | |
size | Configuration for size | object | |
pruneReceipts | Whether to delete old receipts data from the database | boolean | false |
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether to delete old block data from the database based on maximum milestones to keep | boolean | false |
maxMilestonesToKeep | Maximum amount of milestone cones to keep in the database | int | 60480 |
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether to delete old block data from the database based on maximum database size | boolean | true |
targetSize | Target size of the database | string | "30GB" |
thresholdPercentage | The percentage the database size gets reduced if the target size is reached | float | 10.0 |
cooldownTime | Cooldown time between two pruning by database size events | string | "5m" |
Example:
{
"pruning": {
"milestones": {
"enabled": false,
"maxMilestonesToKeep": 60480
},
"size": {
"enabled": true,
"targetSize": "30GB",
"thresholdPercentage": 10,
"cooldownTime": "5m"
},
"pruneReceipts": false
}
}
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"
}
}
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the REST API plugin is enabled | boolean | true |
bindAddress | The bind address on which the REST API listens on | string | "0.0.0.0:14265" |
publicRoutes | The HTTP REST routes which can be called without authorization. Wildcards using * are allowed | array | /health /api/routes /api/core/v2/info /api/core/v2/tips /api/core/v2/blocks* /api/core/v2/transactions* /api/core/v2/milestones* /api/core/v2/outputs* /api/core/v2/treasury /api/core/v2/receipts* /api/debug/v1/* /api/indexer/v1/* /api/mqtt/v1 /api/participation/v1/events* /api/participation/v1/outputs* /api/participation/v1/addresses* /api/core/v0/* /api/core/v1/* |
protectedRoutes | The HTTP REST routes which need to be called with authorization. Wildcards using * are allowed | array | /api/* |
useGZIP | Use the gzip middleware to compress HTTP responses | boolean | true |
debugRequestLoggerEnabled | Whether the debug logging for requests should be enabled | boolean | false |
jwtAuth | Configuration for JWT Auth | object | |
pow | Configuration for Proof of Work | object | |
limits | Configuration for limits | object |
Name | Description | Type | Default value |
---|---|---|---|
salt | Salt used inside the JWT tokens for the REST API. Change this to a different value to invalidate JWT tokens not matching this new value | string | "HORNET" |
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the node does PoW if blocks are received via API | boolean | false |
workerCount | The amount of workers used for calculating PoW when issuing blocks via API | int | 1 |
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": {
"enabled": true,
"bindAddress": "0.0.0.0:14265",
"publicRoutes": [
"/health",
"/api/routes",
"/api/core/v2/info",
"/api/core/v2/tips",
"/api/core/v2/blocks*",
"/api/core/v2/transactions*",
"/api/core/v2/milestones*",
"/api/core/v2/outputs*",
"/api/core/v2/treasury",
"/api/core/v2/receipts*",
"/api/debug/v1/*",
"/api/indexer/v1/*",
"/api/mqtt/v1",
"/api/participation/v1/events*",
"/api/participation/v1/outputs*",
"/api/participation/v1/addresses*",
"/api/core/v0/*",
"/api/core/v1/*"
],
"protectedRoutes": [
"/api/*"
],
"useGZIP": true,
"debugRequestLoggerEnabled": false,
"jwtAuth": {
"salt": "HORNET"
},
"pow": {
"enabled": false,
"workerCount": 1
},
"limits": {
"maxBodyLength": "1M",
"maxResults": 1000
}
}
}
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the warpsync plugin is enabled | boolean | true |
advancementRange | The used advancement range per warpsync checkpoint | int | 150 |
Example:
{
"warpsync": {
"enabled": true,
"advancementRange": 150
}
}
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the tipselection plugin is enabled | boolean | true |
nonLazy | Configuration for nonLazy | object | |
semiLazy | Configuration for semiLazy | object |
Name | Description | Type | Default value |
---|---|---|---|
retentionRulesTipsLimit | The maximum number of current tips for which the retention rules are checked (non-lazy) | int | 100 |
maxReferencedTipAge | The maximum time a tip remains in the tip pool after it was referenced by the first block (non-lazy) | string | "3s" |
maxChildren | The maximum amount of references by other blocks before the tip is removed from the tip pool (non-lazy) | uint | 30 |
Name | Description | Type | Default value |
---|---|---|---|
retentionRulesTipsLimit | The maximum number of current tips for which the retention rules are checked (semi-lazy) | int | 20 |
maxReferencedTipAge | The maximum time a tip remains in the tip pool after it was referenced by the first block (semi-lazy) | string | "3s" |
maxChildren | The maximum amount of references by other blocks before the tip is removed from the tip pool (semi-lazy) | uint | 2 |
Example:
{
"tipsel": {
"enabled": true,
"nonLazy": {
"retentionRulesTipsLimit": 100,
"maxReferencedTipAge": "3s",
"maxChildren": 30
},
"semiLazy": {
"retentionRulesTipsLimit": 20,
"maxReferencedTipAge": "3s",
"maxChildren": 2
}
}
}
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the receipts plugin is enabled | boolean | false |
backup | Configuration for backup | object | |
validator | Configuration for validator | object |
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether to backup receipts in the backup folder | boolean | false |
path | Path to the receipts backup folder | string | "receipts" |
Name | Description | Type | Default value |
---|---|---|---|
validate | Whether to validate receipts | boolean | false |
ignoreSoftErrors | Whether to ignore soft errors and not panic if one is encountered | boolean | false |
api | Configuration for API | object | |
coordinator | Configuration for coordinator | object |
Name | Description | Type | Default value |
---|---|---|---|
address | Address of the legacy node API | string | "http://localhost:14266" |
timeout | Timeout of API calls | string | "5s" |
Name | Description | Type | Default value |
---|---|---|---|
address | Address of the legacy coordinator | string | "UDYXTZBE9GZGPM9SSQV9LTZNDLJIZMPUVVXYXFYVBLIEUHLSEWFTKZZLXYRHHWVQV9MNNX9KZC9D9UZWZ" |
merkleTreeDepth | Depth of the Merkle tree of the coordinator | int | 24 |
Example:
{
"receipts": {
"enabled": false,
"backup": {
"enabled": false,
"path": "receipts"
},
"validator": {
"validate": false,
"ignoreSoftErrors": false,
"api": {
"address": "http://localhost:14266",
"timeout": "5s"
},
"coordinator": {
"address": "UDYXTZBE9GZGPM9SSQV9LTZNDLJIZMPUVVXYXFYVBLIEUHLSEWFTKZZLXYRHHWVQV9MNNX9KZC9D9UZWZ",
"merkleTreeDepth": 24
}
}
}
}
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the prometheus plugin is enabled | boolean | false |
bindAddress | The bind address on which the Prometheus exporter listens on | string | "localhost:9311" |
fileServiceDiscovery | Configuration for fileServiceDiscovery | object | |
databaseMetrics | Whether to include database metrics | boolean | true |
nodeMetrics | Whether to include node metrics | boolean | true |
gossipMetrics | Whether to include gossip metrics | boolean | true |
cachesMetrics | Whether to include caches metrics | boolean | true |
restAPIMetrics | Whether to include restAPI metrics | boolean | true |
inxMetrics | Whether to include INX metrics | boolean | true |
migrationMetrics | Whether to include migration metrics | boolean | true |
debugMetrics | Whether to include debug metrics | boolean | false |
goMetrics | Whether to include go metrics | boolean | false |
processMetrics | Whether to include process metrics | boolean | false |
promhttpMetrics | Whether to include promhttp metrics | boolean | false |
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the plugin should write a Prometheus 'file SD' file | boolean | false |
path | The path where to write the 'file SD' file to | string | "target.json" |
target | The target to write into the 'file SD' file | string | "localhost:9311" |
Example:
{
"prometheus": {
"enabled": false,
"bindAddress": "localhost:9311",
"fileServiceDiscovery": {
"enabled": false,
"path": "target.json",
"target": "localhost:9311"
},
"databaseMetrics": true,
"nodeMetrics": true,
"gossipMetrics": true,
"cachesMetrics": true,
"restAPIMetrics": true,
"inxMetrics": true,
"migrationMetrics": true,
"debugMetrics": false,
"goMetrics": false,
"processMetrics": false,
"promhttpMetrics": false
}
}
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the INX plugin is enabled | boolean | false |
bindAddress | The bind address on which the INX can be accessed from | string | "localhost:9029" |
pow | Configuration for Proof of Work | object |
Name | Description | Type | Default value |
---|---|---|---|
workerCount | The amount of workers used for calculating PoW when issuing blocks via INX. (use 0 to use the maximum possible) | int | 0 |
Example:
{
"inx": {
"enabled": false,
"bindAddress": "localhost:9029",
"pow": {
"workerCount": 0
}
}
}
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the debug plugin is enabled | boolean | false |
Example:
{
"debug": {
"enabled": false
}
}