While we aim for the Koinos node to be usable by as many people as possible, there are times when you need to configure your node for your specific deployment. There are five files that can be used to configure your Koinos node. The first four are mapped in to the microservices themselves and are contained within the config directory. The last is the .env file that configures the cluster. The node provides two sets of configurations, one for mainnet which is contained in config-example and env.example in the root of the repo and another for the Harbinger testnet which is in the harbinger directory.
genesis_data.yml isn't really a config file, but it is crucial to the operation of a Koinos node. The genesis data defines the initial state of the blockchain prior to the first block. This helps configuration some basic parameters of the blockchain and is also used to seed the snapshot balances of the KOIN token for the mainnet. The genesis data is also used to generate the chain ID of the specific blockchain which is used to uniquely identify the blockchain in the p2p network and prevents crosstalk between networks by requiring transactions specify the chain ID of their intended chain. This file should not be changed. Please note that the mainnet and Harbinger testnet configurations have different genesis data and mixing up those files will cause the node to malfunction.
koinos_descriptors.pb contains the Protobuf descriptors for all of the built in types used by the node. This file is used specifically by the JSON-RPC microservice in order to dynamically convert between JSON-RPC requests and the internal Protobuf requests. It should not need to changed manually, but should be updated every release of the Koinos node to match the most current descriptor file.
The Koinos node uses RabbitMQ to communicate between microservices. rabbitmq.conf is the configuration for the AMQP microservice. It can be modified, but it is recommended only advanced users modify this file for specific use cases. The provided rabbitmq.conf should be sufficient for nearly all Koinos node deployments. or more information on configuring Rabbit MQ, please read the official documentation.
config.yml contains the configuration specific to the Koinos microservices. The structure of the config has two main sections. The first is the global section which contains options that apply to multiple microservices. The second main second contains overrides for individual microservices. If an option is set for an individual microservice, it will override the value set in the global section. For example, if log-level is set to info in the global section, but you set log-level to debug in the chain section, then the Chain microservice will log at the debug level, while all other microservices will log at the info level.
Below are the config options for each microservice.
Option
Type
Description
Shared by
help
boolean
Print this help message and exit
All
version
boolean
Print version string and exit
All
basedir
string
Koinos base directory
All
amqp
string
AMQP server URL
All
log-level
enum
The log level (debug, info, warn, or error)
All
instance-id
string
An ID that uniquely identifies the instance
All
jobs
uint
The number of worker jobs (Default: system native concurrency)
All
read-compute-bandwidth-limit
uint
The compute bandwidth when reading contracts via the API
None
genesis-data
string
The genesis data file
None
statedir
string
The location of the blockchain state files (absolute path or relative to basedir/chain)
Some microservices use the multiaddr format. This is an abstraction and replacement for typical dotted decimal notation for a protocol://address:port URL. To learn more about the multiaddr (and multiformats) specification, please refer to the official documentation.
The .env file defines configuration for the node as a whole. The top section (BASEDIR, network bindings, and COMPOSE_PROFILES) will likely not need to change. However, on a new release of the Koinos node, you should always copy the new microservice versions and restart your node. Any of these values can be overridden temporarily by setting them in your environment.
Variable
Description
BASEDIR
The basedir on the host system to be used by the Koinos node
AMQP_INTERFACE
The host interface that AMQP should bind to
AMQP_PORT
The host port that AMQP should bind to
AMQP_ADMIN_INTERFACE
The host interface that the AMQP admin interface should bind to
AMQP_ADMIN_PORT
The host port that the AMQP admin interface should bind to
P2P_INTERFACE
The host interface that the p2p microservice should bind to
P2P_PORT
The host port that the p2p microservice should bind to
JSONRPC_INTERFACE
The host interface that the JSON-RPC microservice should bind to
JSONRPC_PORT
The host port that the JSON-RPC microservice should bind to
GRPC_INTERFACE
The host interface that the gRPC microservice should bind to
GRPC_PORT
The host port that the gRPC microservice should bind to
COMPOSE_PROFILES
A list of compose profiles to enable on the node
ACCOUNT_HISTORY_TAG
The version of the Account History microservice to run
BLOCK_PRODUCER_TAG
The version of the Block Producer microservice to run
BLOCK_STORE_TAG
The version of the Block Store microservice to run
CHAIN_TAG
The version of the Chain microservice to run
CONTRACT_META_STORE_TAG
The version of the Contract Meta Store microservice to run
GRPC_TAG
The version of the gRPC microservice to run
JSONRPC_TAG
The version of the JSON-RPC microservice to run
MEMPOOL_TAG
The version of the Mempool microservice to run
P2P_TAG
The version of the p2p microservice to run
TRANSACTION_STORE_TAG
The version of the Transaction Store microservice to run