Configuration#
A node reads a HOCON configuration file whose settings live under the dcc key. Built-in defaults (application.conf and network-defaults.conf) are merged with your file, so your file only needs the settings you want to change.
Note
Verified against node-scala v1.8.0. Do not use the shipped application.conf as your own config file; it is a defaults file.
Environment variables (Docker)#
The Docker entrypoint translates these variables into JVM options:
Variable |
Default |
Effect |
|---|---|---|
|
|
Sets |
|
|
JVM |
|
|
Console log level: |
|
|
Sets |
|
— |
Base58 wallet seed, written to a private temporary config file at start-up and then unset |
|
— |
Wallet file password, handled the same way |
|
— |
Extra JVM options |
To use your own file, mount it at /etc/dcc/dcc.conf. The entrypoint loads it automatically and layers wallet secrets on top. DCC_WALLET_SEED and DCC_WALLET_PASSWORD only take effect when such a file is mounted (and no command arguments are passed to the container); without /etc/dcc/dcc.conf they are ignored.
Ports and network defaults#
Network |
P2P port |
Peer to connect to |
|---|---|---|
Mainnet |
6868 |
not published yet |
Public Testnet |
6868 |
|
The REST API listens on port 6869 on every network.
Note
The public DecentralChain Testnet (testnet-node.decentralchain.io) is a custom chain (dcc.blockchain.type = CUSTOM, chain ID !). The built-in testnet profile (DCC_NETWORK=testnet without a config file) is a different network and will not join it. Join the Public Testnet gives the complete configuration file.
Commonly changed settings#
Key |
Default |
Description |
|---|---|---|
|
|
Base directory for node data |
|
|
Maximum number of blocks a rollback can undo |
|
|
Index transactions by address (needed by address history endpoints) |
|
|
Wallet file path |
|
unset |
Wallet file password |
|
unset |
Base58 seed; if unset the node generates one |
|
|
Turn the REST API on or off |
|
|
Interface the API listens on |
|
|
API port |
|
|
Hash of the API key that protects privileged endpoints |
|
|
Set to a specific origin in production |
|
|
Max results for address transaction history |
|
|
Max blocks per range request |
|
|
Max unconfirmed transactions held |
|
|
Inbound peer limit |
|
|
Outbound peer limit |
|
|
Testnet-only: lets a HotStuff commit certificate raise the finalized height. Requires |
|
|
The node’s miner submits its own Commit To Generation transaction for each generation period |
|
|
Ticks (about 1 s each) of peer-reconnection stall before the node clears suspensions and redials |
|
|
HotStuff fast-finality engine. Leave it off on Mainnet. The public Testnet’s own nodes run it enabled and authoritative (see Features and Activation) |
API key#
Privileged endpoints (wallet, rollback, /debug/*, /node/stop) require an X-Api-Key header. The node stores only a hash of the key. Generate the hash with the node itself:
curl -X POST http://localhost:6869/utils/hash/secure \
-H 'Content-Type: text/plain' -d 'my-secret-api-key'
Put the hash value from the JSON response in dcc.rest-api.api-key-hash, restart, and send my-secret-api-key in X-Api-Key.
Example: minimal Mainnet file#
dcc {
directory = "/var/lib/dcc"
rest-api {
bind-address = "127.0.0.1"
api-key-hash = "<hash from /utils/hash/secure>"
}
wallet {
password = "change-me"
}
}