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
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 log | object |
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. Node
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"
}
}
4. Protocol
Name | Description | Type | Default value |
---|---|---|---|
targetNetworkName | The initial network name on which this node operates on | string | "shimmer" |
milestonePublicKeyCount | The amount of public keys in a milestone | int | 7 |
baseToken | Configuration for baseToken | object | |
publicKeyRanges | Configuration for publicKeyRanges | array | see example below |
BaseToken
Name | Description | Type | Default value |
---|---|---|---|
name | The base token name | string | "Shimmer" |
tickerSymbol | The base token ticker symbol | string | "SMR" |
unit | The base token unit | string | "SMR" |
subunit | The base token subunit | string | "glow" |
decimals | The base token amount of decimals | uint | 6 |
useMetricPrefix | The base token uses the metric prefix | boolean | false |
PublicKeyRanges
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": "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
Name | Description | Type | Default value |
---|---|---|---|
engine | The used database engine (pebble/rocksdb/mapdb) | string | "rocksdb" |
path | The path to the database folder | string | "shimmer/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": "shimmer/database",
"autoRevalidation": false,
"checkLedgerStateOnStartup": false
}
}
6. Proof of Work
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"
}
}
7. Peer to Peer
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 |
ConnectionManager
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 |
Database
Name | Description | Type | Default value |
---|---|---|---|
path | The path to the p2p database | string | "shimmer/p2pstore" |
Gossip
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" |
Autopeering
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.shimmer.network/udp/14626/autopeering/HK6EKbNtjwve9HMbL6PH6R3uLXZYQoBoqNPD5LsoWuA6 /dns/entry-hornet-1.h.shimmer.network/udp/14626/autopeering/BT8EiSRXTixnH2wMoy4ecNpVtiAXxfXKfYsJ2KvU3WLx |
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": "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
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"
}
}
9. Tangle
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"
}
}
10. Snapshots
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 | "shimmer/snapshots/full_snapshot.bin" |
deltaPath | Path to the delta snapshot file | string | "shimmer/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 |
DownloadURLs
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": "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
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 |
Milestones
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 |
Size
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
}
}
12. 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"
}
}
13. RestAPI
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* |
protectedRoutes | The HTTP REST routes which need to be called with authorization. Wildcards using * are allowed | array | /api/* |
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 |
JWT Auth
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" |
Proof of Work
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 |
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": {
"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
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
}
}
15. Tipselection
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the tipselection plugin is enabled | boolean | true |
nonLazy | Configuration for nonLazy | object | |
semiLazy | Configuration for semiLazy | object |
NonLazy
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 |
SemiLazy
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
}
}
}
16. Receipts
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the receipts plugin is enabled | boolean | false |
backup | Configuration for backup | object | |
validator | Configuration for validator | object |
Backup
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" |
Validator
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 |
API
Name | Description | Type | Default value |
---|---|---|---|
address | Address of the legacy node API | string | "http://localhost:14266" |
timeout | Timeout of API calls | string | "5s" |
Coordinator
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
}
}
}
}
17. Prometheus
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 |
FileServiceDiscovery
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
}
}
18. INX
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 |
Proof of Work
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
}
}
}
19. Debug
Name | Description | Type | Default value |
---|---|---|---|
enabled | Whether the debug plugin is enabled | boolean | false |
Example:
{
"debug": {
"enabled": false
}
}