Skip to main content

Configuration

HORNET Node Configuration

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

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 logobject

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"
outputPathsA list of URLs, file paths or stdout/stderr to write logging output toarraystdout
disableEventsPrevents log messages from being raced as eventsbooleantrue

Example:

  {
"logger": {
"level": "info",
"disableCaller": true,
"disableStacktrace": false,
"stacktraceLevel": "panic",
"encoding": "console",
"outputPaths": [
"stdout"
],
"disableEvents": true
}
}

3. Node

NameDescriptionTypeDefault value
profileThe profile the node runs withstring"auto"
aliasSet an alias to identify a nodestring"HORNET node"

Example:

  {
"node": {
"profile": "auto",
"alias": "HORNET node"
}
}

4. Protocol

NameDescriptionTypeDefault value
targetNetworkNameThe initial network name on which this node operates onstring"shimmer"
milestonePublicKeyCountThe amount of public keys in a milestoneint7
baseTokenConfiguration for baseTokenobject
publicKeyRangesConfiguration for publicKeyRangesarraysee example below

BaseToken

NameDescriptionTypeDefault value
nameThe base token namestring"Shimmer"
tickerSymbolThe base token ticker symbolstring"SMR"
unitThe base token unitstring"SMR"
subunitThe base token subunitstring"glow"
decimalsThe base token amount of decimalsuint6
useMetricPrefixThe base token uses the metric prefixbooleanfalse

PublicKeyRanges

NameDescriptionTypeDefault value
keyThe ed25519 public key of the coordinator in hex representationstring"0000000000000000000000000000000000000000000000000000000000000000"
startIndexThe start milestone index of the public keyuint0
endIndexThe end milestone index of the public keyuint0

Example:

  {
"protocol": {
"targetNetworkName": "shimmer",
"milestonePublicKeyCount": 7,
"baseToken": {
"name": "Shimmer",
"tickerSymbol": "SMR",
"unit": "SMR",
"subunit": "glow",
"decimals": 6,
"useMetricPrefix": false
},
"publicKeyRanges": [
{
"key": "a507d2a592a5f0424ed8530603c08acebe088ae26211e90b79bfec0970a2397f",
"start": 0,
"end": 0
},
{
"key": "71a09774449a081450a51e0245a1e9850190f93508fd8f21bb9b9ca169765f30",
"start": 0,
"end": 0
},
{
"key": "a375515bfe5adf7fedb64ef4cebe1e621e85a056b0ccd5db72bc0d474325bf38",
"start": 0,
"end": 0
},
{
"key": "1df26178a7914126fd8cb934c7a7437073794c1c8ce99319172436b1d4973eba",
"start": 0,
"end": 0
},
{
"key": "45432d7c767e16586403262331a725c7eaa0b2dd79ea442f373c845ae3443aa9",
"start": 0,
"end": 0
},
{
"key": "9d87b4d2538b10799b582e25ace4726d92d7798ddfb696ff08e450db7917c9ad",
"start": 0,
"end": 0
},
{
"key": "a921841628d64c3f08bd344118b8106ade072e68c774beff30135e036194493a",
"start": 0,
"end": 0
},
{
"key": "16ee3356c21e410a0aaab42896021b1a857eb8d97a14a66fed9b13d634c21317",
"start": 0,
"end": 0
},
{
"key": "99c7d9752c295cb56b550191015ab5a40226fb632e8b02ec15cfe574ea17cf67",
"start": 0,
"end": 0
},
{
"key": "4af647910ba47000108b87c63abe0545643f9b203eacee2b713729b0450983fe",
"start": 0,
"end": 0
}
]
}
}

5. Database

NameDescriptionTypeDefault value
engineThe used database engine (pebble/rocksdb/mapdb)string"rocksdb"
pathThe path to the database folderstring"shimmer/database"
autoRevalidationWhether to automatically start revalidation on startup if the database is corruptedbooleanfalse
checkLedgerStateOnStartupWhether to check if the ledger state matches the total supply on startupbooleanfalse

Example:

  {
"db": {
"engine": "rocksdb",
"path": "shimmer/database",
"autoRevalidation": false,
"checkLedgerStateOnStartup": false
}
}

6. Proof of Work

NameDescriptionTypeDefault value
refreshTipsIntervalInterval for refreshing tips during PoW for blocks passed without parents via APIstring"5s"

Example:

  {
"pow": {
"refreshTipsInterval": "5s"
}
}

7. Peer to Peer

NameDescriptionTypeDefault value
bindMultiAddressesThe bind addresses for this nodearray/ip4/0.0.0.0/tcp/15600
/ip6/::/tcp/15600
connectionManagerConfiguration for connectionManagerobject
identityPrivateKeyPrivate key used to derive the node identity (optional)string""
dbConfiguration for Databaseobject
reconnectIntervalThe time to wait before trying to reconnect to a disconnected peerstring"30s"
gossipConfiguration for gossipobject
autopeeringConfiguration for autopeeringobject

ConnectionManager

NameDescriptionTypeDefault value
highWatermarkThe threshold up on which connections count truncates to the lower watermarkint10
lowWatermarkThe minimum connections count to hold after the high watermark was reachedint5

Database

NameDescriptionTypeDefault value
pathThe path to the p2p databasestring"shimmer/p2pstore"

Gossip

NameDescriptionTypeDefault value
unknownPeersLimitMaximum amount of unknown peers a gossip protocol connection is established toint4
streamReadTimeoutThe read timeout for reads from the gossip streamstring"1m"
streamWriteTimeoutThe write timeout for writes to the gossip streamstring"10s"

Autopeering

NameDescriptionTypeDefault value
enabledWhether the autopeering plugin is enabledbooleanfalse
bindAddressBind address for autopeeringstring"0.0.0.0:14626"
entryNodesList of autopeering entry nodes to usearray/dns/entry-hornet-0.h.shimmer.network/udp/14626/autopeering/HK6EKbNtjwve9HMbL6PH6R3uLXZYQoBoqNPD5LsoWuA6
/dns/entry-hornet-1.h.shimmer.network/udp/14626/autopeering/BT8EiSRXTixnH2wMoy4ecNpVtiAXxfXKfYsJ2KvU3WLx
entryNodesPreferIPv6Defines if connecting over IPv6 is preferred for entry nodesbooleanfalse
runAsEntryNodeWhether the node should act as an autopeering entry nodebooleanfalse

Example:

  {
"p2p": {
"bindMultiAddresses": [
"/ip4/0.0.0.0/tcp/15600",
"/ip6/::/tcp/15600"
],
"connectionManager": {
"highWatermark": 10,
"lowWatermark": 5
},
"identityPrivateKey": "",
"db": {
"path": "shimmer/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.shimmer.network/udp/14626/autopeering/HK6EKbNtjwve9HMbL6PH6R3uLXZYQoBoqNPD5LsoWuA6",
"/dns/entry-hornet-1.h.shimmer.network/udp/14626/autopeering/BT8EiSRXTixnH2wMoy4ecNpVtiAXxfXKfYsJ2KvU3WLx"
],
"entryNodesPreferIPv6": false,
"runAsEntryNode": false
}
}
}

8. Requests

NameDescriptionTypeDefault value
discardOlderThanThe maximum time a request stays in the request queuestring"15s"
pendingReEnqueueIntervalThe interval the pending requests are re-enqueuedstring"5s"

Example:

  {
"requests": {
"discardOlderThan": "15s",
"pendingReEnqueueInterval": "5s"
}
}

9. Tangle

NameDescriptionTypeDefault value
milestoneTimeoutThe interval milestone timeout events are fired if no new milestones are receivedstring"30s"
maxDeltaBlockYoungestConeRootIndexToCMIThe maximum allowed delta value for the YCRI of a given block in relation to the current CMI before it gets lazyint8
maxDeltaBlockOldestConeRootIndexToCMIThe maximum allowed delta value between OCRI of a given block in relation to the current CMI before it gets semi-lazyint13
whiteFlagParentsSolidTimeoutDefines the the maximum duration for the parents to become solid during white flag confirmation API or INX callstring"2s"

Example:

  {
"tangle": {
"milestoneTimeout": "30s",
"maxDeltaBlockYoungestConeRootIndexToCMI": 8,
"maxDeltaBlockOldestConeRootIndexToCMI": 13,
"whiteFlagParentsSolidTimeout": "2s"
}
}

10. Snapshots

NameDescriptionTypeDefault value
enabledWhether to generate snapshot filesbooleanfalse
depthThe depth, respectively the starting point, at which a snapshot of the ledger is generatedint50
intervalInterval, in milestones, at which snapshot files are created (snapshots are only created if the node is synced)int200
fullPathPath to the full snapshot filestring"shimmer/snapshots/full_snapshot.bin"
deltaPathPath to the delta snapshot filestring"shimmer/snapshots/delta_snapshot.bin"
deltaSizeThresholdPercentageCreate 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)float50.0
deltaSizeThresholdMinSizeThe 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"
downloadURLsConfiguration for downloadURLsarraysee example below

DownloadURLs

NameDescriptionTypeDefault value
fullURL of the full snapshot filestring""
deltaURL of the delta snapshot filestring""

Example:

  {
"snapshots": {
"enabled": false,
"depth": 50,
"interval": 200,
"fullPath": "shimmer/snapshots/full_snapshot.bin",
"deltaPath": "shimmer/snapshots/delta_snapshot.bin",
"deltaSizeThresholdPercentage": 50,
"deltaSizeThresholdMinSize": "50M",
"downloadURLs": [
{
"full": "https://files.shimmer.network/snapshots/latest-full_snapshot.bin",
"delta": "https://files.shimmer.network/snapshots/latest-delta_snapshot.bin"
}
]
}
}

11. Pruning

NameDescriptionTypeDefault value
milestonesConfiguration for milestonesobject
sizeConfiguration for sizeobject
pruneReceiptsWhether to delete old receipts data from the databasebooleanfalse

Milestones

NameDescriptionTypeDefault value
enabledWhether to delete old block data from the database based on maximum milestones to keepbooleanfalse
maxMilestonesToKeepMaximum amount of milestone cones to keep in the databaseint60480

Size

NameDescriptionTypeDefault value
enabledWhether to delete old block data from the database based on maximum database sizebooleantrue
targetSizeTarget size of the databasestring"30GB"
thresholdPercentageThe percentage the database size gets reduced if the target size is reachedfloat10.0
cooldownTimeCooldown time between two pruning by database size eventsstring"5m"

Example:

  {
"pruning": {
"milestones": {
"enabled": false,
"maxMilestonesToKeep": 60480
},
"size": {
"enabled": true,
"targetSize": "30GB",
"thresholdPercentage": 10,
"cooldownTime": "5m"
},
"pruneReceipts": false
}
}

12. Profiling

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

Example:

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

13. RestAPI

NameDescriptionTypeDefault value
enabledWhether the REST API plugin is enabledbooleantrue
bindAddressThe bind address on which the REST API listens onstring"0.0.0.0:14265"
publicRoutesThe HTTP REST routes which can be called without authorization. Wildcards using * are allowedarray/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*
protectedRoutesThe HTTP REST routes which need to be called with authorization. Wildcards using * are allowedarray/api/*
debugRequestLoggerEnabledWhether the debug logging for requests should be enabledbooleanfalse
jwtAuthConfiguration for JWT Authobject
powConfiguration for Proof of Workobject
limitsConfiguration for limitsobject

JWT Auth

NameDescriptionTypeDefault value
saltSalt used inside the JWT tokens for the REST API. Change this to a different value to invalidate JWT tokens not matching this new valuestring"HORNET"

Proof of Work

NameDescriptionTypeDefault value
enabledWhether the node does PoW if blocks are received via APIbooleanfalse
workerCountThe amount of workers used for calculating PoW when issuing blocks via APIint1

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": {
"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*"
],
"protectedRoutes": [
"/api/*"
],
"debugRequestLoggerEnabled": false,
"jwtAuth": {
"salt": "HORNET"
},
"pow": {
"enabled": false,
"workerCount": 1
},
"limits": {
"maxBodyLength": "1M",
"maxResults": 1000
}
}
}

14. WarpSync

NameDescriptionTypeDefault value
enabledWhether the warpsync plugin is enabledbooleantrue
advancementRangeThe used advancement range per warpsync checkpointint150

Example:

  {
"warpsync": {
"enabled": true,
"advancementRange": 150
}
}

15. Tipselection

NameDescriptionTypeDefault value
enabledWhether the tipselection plugin is enabledbooleantrue
nonLazyConfiguration for nonLazyobject
semiLazyConfiguration for semiLazyobject

NonLazy

NameDescriptionTypeDefault value
retentionRulesTipsLimitThe maximum number of current tips for which the retention rules are checked (non-lazy)int100
maxReferencedTipAgeThe maximum time a tip remains in the tip pool after it was referenced by the first block (non-lazy)string"3s"
maxChildrenThe maximum amount of references by other blocks before the tip is removed from the tip pool (non-lazy)uint30

SemiLazy

NameDescriptionTypeDefault value
retentionRulesTipsLimitThe maximum number of current tips for which the retention rules are checked (semi-lazy)int20
maxReferencedTipAgeThe maximum time a tip remains in the tip pool after it was referenced by the first block (semi-lazy)string"3s"
maxChildrenThe maximum amount of references by other blocks before the tip is removed from the tip pool (semi-lazy)uint2

Example:

  {
"tipsel": {
"enabled": true,
"nonLazy": {
"retentionRulesTipsLimit": 100,
"maxReferencedTipAge": "3s",
"maxChildren": 30
},
"semiLazy": {
"retentionRulesTipsLimit": 20,
"maxReferencedTipAge": "3s",
"maxChildren": 2
}
}
}

16. Receipts

NameDescriptionTypeDefault value
enabledWhether the receipts plugin is enabledbooleanfalse
backupConfiguration for backupobject
validatorConfiguration for validatorobject

Backup

NameDescriptionTypeDefault value
enabledWhether to backup receipts in the backup folderbooleanfalse
pathPath to the receipts backup folderstring"receipts"

Validator

NameDescriptionTypeDefault value
validateWhether to validate receiptsbooleanfalse
ignoreSoftErrorsWhether to ignore soft errors and not panic if one is encounteredbooleanfalse
apiConfiguration for APIobject
coordinatorConfiguration for coordinatorobject

API

NameDescriptionTypeDefault value
addressAddress of the legacy node APIstring"http://localhost:14266"
timeoutTimeout of API callsstring"5s"

Coordinator

NameDescriptionTypeDefault value
addressAddress of the legacy coordinatorstring"UDYXTZBE9GZGPM9SSQV9LTZNDLJIZMPUVVXYXFYVBLIEUHLSEWFTKZZLXYRHHWVQV9MNNX9KZC9D9UZWZ"
merkleTreeDepthDepth of the Merkle tree of the coordinatorint24

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

17. Prometheus

NameDescriptionTypeDefault value
enabledWhether the prometheus plugin is enabledbooleanfalse
bindAddressThe bind address on which the Prometheus exporter listens onstring"localhost:9311"
fileServiceDiscoveryConfiguration for fileServiceDiscoveryobject
databaseMetricsWhether to include database metricsbooleantrue
nodeMetricsWhether to include node metricsbooleantrue
gossipMetricsWhether to include gossip metricsbooleantrue
cachesMetricsWhether to include caches metricsbooleantrue
restAPIMetricsWhether to include restAPI metricsbooleantrue
inxMetricsWhether to include INX metricsbooleantrue
migrationMetricsWhether to include migration metricsbooleantrue
debugMetricsWhether to include debug metricsbooleanfalse
goMetricsWhether to include go metricsbooleanfalse
processMetricsWhether to include process metricsbooleanfalse
promhttpMetricsWhether to include promhttp metricsbooleanfalse

FileServiceDiscovery

NameDescriptionTypeDefault value
enabledWhether the plugin should write a Prometheus 'file SD' filebooleanfalse
pathThe path where to write the 'file SD' file tostring"target.json"
targetThe target to write into the 'file SD' filestring"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
}
}

18. INX

NameDescriptionTypeDefault value
enabledWhether the INX plugin is enabledbooleanfalse
bindAddressThe bind address on which the INX can be accessed fromstring"localhost:9029"
powConfiguration for Proof of Workobject

Proof of Work

NameDescriptionTypeDefault value
workerCountThe amount of workers used for calculating PoW when issuing blocks via INX. (use 0 to use the maximum possible)int0

Example:

  {
"inx": {
"enabled": false,
"bindAddress": "localhost:9029",
"pow": {
"workerCount": 0
}
}
}

19. Debug

NameDescriptionTypeDefault value
enabledWhether the debug plugin is enabledbooleanfalse

Example:

  {
"debug": {
"enabled": false
}
}
  • 1. Application
    • Shutdown
    • Log
  • 2. Logger
  • 3. Node
  • 4. Protocol
    • BaseToken
    • PublicKeyRanges
  • 5. Database
  • 6. Proof of Work
  • 7. Peer to Peer
    • ConnectionManager
    • Database
    • Gossip
    • Autopeering
  • 8. Requests
  • 9. Tangle
  • 10. Snapshots
    • DownloadURLs
  • 11. Pruning
    • Milestones
    • Size
  • 12. Profiling
  • 13. RestAPI
    • JWT Auth
    • Proof of Work
    • Limits
  • 14. WarpSync
  • 15. Tipselection
    • NonLazy
    • SemiLazy
  • 16. Receipts
    • Backup
    • Validator
    • API
    • Coordinator
  • 17. Prometheus
    • FileServiceDiscovery
  • 18. INX
    • Proof of Work
  • 19. Debug