Skip to content

03 Configuration

xvcf edited this page Feb 21, 2025 · 1 revision

⚙ Configuration

Since NXTChain is based on multiple components, all of them are configurable. Below is the unified configuration for the entire system.

📜 Configuration Overview

The config.json file contains various settings that control the behavior and parameters of the NXTChain components: Node, Miner, and Wallet.

Configuration Fields

  • block_dir: Specifies the directory where blockchain blocks are stored. The default value is blocks.

  • default_ports:

    • node: 0 (default value is 0, will be randomized on every start if not changed).
    • miner: 5012.
    • wallet: 0 (will also be randomized of not changed, see above).
  • default_web_port: Specifies the port number that the node's web server will use. The default value is 80 which represents the default http port. A node is not required to use https, if you wish to do this though, just change the port to 443.

  • max_connections:

    • node: 50.
    • miner: 50.
    • wallet: 50.
  • privatekey_name: Specifies the name of the file where the private key is stored. Default: privatekey.

  • publickey_name: Specifies the name of the file where the public key is stored. Default: publickey.

  • ruleset: Defines blockchain parameters:

    • difficulty: Mining difficulty level (6). This will automatically be adjusted.
    • max_transactions: Maximum number of transactions per block (10).
    • version: Blockchain protocol version (0).
    • initial_reward: Initial mining reward (5000000000000 which is 50.00000000000 NXT as an integer).
  • miner_settings:

    • currency: NXT (default mining currency).
    • wallet: Wallet address for mining rewards (default: "", needs configuration).
    • tick: Interval (in seconds) for miner actions (Default: 5).
  • seed_nodes: A string array of IPs or domain names of seed nodes for bootstrapping connections. Default: [] (empty string array).

  • wallet_dir: Directory where wallet files are stored. Default: wallets.

These configuration settings ensure that all components operate correctly by defining network parameters, key storage locations, blockchain rules, and connection limits. Adjusting these values allows users to customize the behavior of the NXTChain ecosystem to suit their specific needs.

Clone this wiki locally