Config.json complete reference for v1.0 [EN]


	Version                   int           `json:"Version"`
	SeedList                  []string      `json:"SeedList"`
	RPCCert                   string        `json:"RPCCert"`
	RPCKey                    string        `json:"RPCKey"`
	HttpWsPort                uint16        `json:"HttpWsPort"`
	HttpJsonPort              uint16        `json:"HttpJsonPort"`
	NodePort                  uint16        `json:"-"`
	LogLevel                  int           `json:"LogLevel"`
	MaxLogFileSize            uint32        `json:"MaxLogSize"`
	IsTLS                     bool          `json:"IsTLS"`
	GenesisBlockProposer      string        `json:"GenesisBlockProposer"`
	NumLowFeeTxnPerBlock      uint32        `json:"NumLowFeeTxnPerBlock"`
	LowFeeTxnSizePerBlock     uint32        `json:"LowFeeTxnSizePerBlock"`
	MinTxnFee                 int64         `json:"MinTxnFee"`
	RegisterIDRegFee          int64         `json:"RegisterIDRegFee"`
	RegisterIDTxnFee          int64         `json:"RegisterIDTxnFee"`
	Hostname                  string        `json:"Hostname"`
	Transport                 string        `json:"Transport"`
	NAT                       bool          `json:"NAT"`
	Mining                    bool          `json:"Mining"`
	MiningDebug               bool          `json:"MiningDebug"`
	BeneficiaryAddr           string        `json:"BeneficiaryAddr"`
	SyncBatchWindowSize       uint32        `json:"SyncBatchWindowSize"`
	SyncBlockHeadersBatchSize uint32        `json:"SyncBlockHeadersBatchSize"`
	SyncBlocksBatchSize       uint32        `json:"SyncBlocksBatchSize"`
	NumTxnPerBlock            uint32        `json:"NumTxnPerBlock"`
	TxPoolPerAccountTxCap     uint32        `json:"TxPoolPerAccountTxCap"`
	TxPoolTotalTxCap          uint32        `json:"TxPoolTotalTxCap"`
	TxPoolMaxMemorySize       uint32        `json:"TxPoolMaxMemorySize"`
	RPCReadTimeout            time.Duration `json:"RPCReadTimeout"`
	RPCWriteTimeout           time.Duration `json:"RPCWriteTimeout"`
	KeepAliveTimeout          time.Duration `json:"KeepAliveTimeout"`
	LogPath                   string        `json:"LogPath"`
	ChainDBPath               string        `json:"ChainDBPath"`
	WalletFile                string        `json:"WalletFile"`
	MaxGetIDSeeds             uint32        `json:"MaxGetIDSeeds"`
	DBFilesCacheCapacity      uint32        `json:"DBFilesCacheCapacity"`

Configuration options

  • SeedList

Before a new node can join NKN network, it needs to acquire neighbor information from any of the existing live nodes in NKN network
When nknd is initiated, it will randomly pick a seed node, and send request to that seed node to get its neighbor list
Any live node can become seed node for others. NKN project team provide 8 seed nodes that can run stably for long period of time.

  • IsTLS

If HttpJson RPC service is using TLS for connection

  • HttpJsonPort

NKN’s designated port for HttpJson service, and its default value is 30003.

  • RPCCert、RPCKey

When HttpJson is using TLS connection, RPCCert is the certificate while RPCKey is the private key.

  • HttpWsPort

NKN’s designated port for WebSocket service, and its default value is 30002. If the last 3 digits of port is 440 (for example 30443), then it is TLS connection.

  • NodePort

nkn network overlay port,and its default value is 30001

  • LogLevel

Level of logging: [0:Debug, 1:Info, 2:Warning, 3:Error]

  • MaxLogSize

The maximum log file size before a new log file is created.
unit in MB,and its default value is 20MB

  • GenesisBlockProposer

Public key of the designated generis block proposer, default value is the public key of NKN developer team.

  • NumLowFeeTxnPerBlock

The number of low fee transactions that miners are willing to include within each block. 0 means there is no limit, and the default value is 0.

  • LowFeeTxnSizePerBlock

The max allowed size (in Bytes) per block for all the low fee transactions. 0 means there is no limit. Default value is 4096.

  • MinTxnFee

The minimum acceptable fee (in NKN) per transaction for this node. If the fees included in the transaction is lower than this, this transaction will not be included in the block. Default value is 0.1.

  • RegisterIDRegFee

The amount registration fee this node is willing to pay for GenerateID. The default value is 0.

  • RegisterIDTxnFee

The amount transaction fee this node is willing to accept for including this GenerateID into the block. The default value is 0.

  • Hostname

Designated public IP address of this node. Upon bootup, the node will use external service to find out own public IP address. Default value is empty.
If you want to run a local testnet with a single machine, Hostname should be set to “”

  • NAT

Whether automatic port forwarding is enabled (requires home router to support UPnP and PMP functionality). Default value is True.

  • Mining

On/Off switch for enabling/disabling mining. Default value is True.

  • Transport

Whether use tcp or udp for socket connection. Default value is “tcp”.

  • MiningDebug

Whether to display node’s current timestamp and proposalSubmitted in getnodestate API. It will help debug Mining issues. Default value is True.

  • BeneficiaryAddr

Configure the wallet address that will receive mining rewards. This will enable the decoupling of miner wallet and asset holding wallet, thus improving security.
If this configuration is not empty, all mining reward will go to BeneficiaryAddr wallet address. Otherwise the mining reward will go to local mining wallet. Default value is empty.

  • SyncBatchWindowSize

During initial synchronization of blockchain data, the number of concurrent job threads. default value is 1024.
The higher the window size, the faster the initial synchronization speed.
However on smaller devices built with less RAM, smaller window size is recommended to avoid out of memory errors during initial synchronization.

  • SyncBlockHeadersBatchSize

During blockchain data synchronization, the number of BlockHeaders each job thread will fetch. Default value is 256.

  • SyncBlocksBatchSize

During blockchain data synchronization, the number of Blocks each job thread will fetch. Default value is 8.

  • NumTxnPerBlock

Maximum amount of transactions per block. Default value is 4096.

  • TxPoolPerAccountTxCap

Maximum amount of transactions per account in the transaction pool. Default value is 32.

  • TxPoolTotalTxCap

Maximum amount of total transactions from all accounts in the transaction pool. 0 means there is no limit. Default value is 0.

  • TxPoolMaxMemorySize

Maximum size (in Mega Bytes or MB) of total transactions from all accounts in the transaction pool. 0 means there is no limit. Default value is 32 (MB).

  • RPCReadTimeout,RPCWriteTimeout,KeepAliveTimeout

Timeout intervals for Read, Write and KeepAlive of HttpJson service