Crypto.BI Toolbox Configuration

Toolbox tries to read configuration from $HOME/.cyptobi/cryptobi.conf

If a config file is unavailable, then defaults will be applied.

The order of precendence from highest to lowest is:

  1. Command line options override all others.
  2. Config file options override defaults.
  3. Program defaults.

Environment

Set CRYPTOBI_HOME environment variable to the directory where you cloned the Crypto.BI Toolbox from Github.

On Linux:

$ export CRYPTOBI_HOME=/your/path/to/cryptobi_toolbox

The Python tools require additional configurations.

Defaults

Default values are defined in toolbox/system/CBConfig.h and implemented in CBConfig.cpp

The defaults look for Bitcoin block files in $HOME/.bitcoin/blocks and Toolbox configuration file in $HOME/.Crypto.BI/crypto.bi.initboth in Windows and Unix-like platforms (Mac / Linux tested).

Command Line Options

Command line options names and values are the same as those in the Toolbox configuration file.

You will find a complete listing of options and descriptions at toolbox/system/config_options.map

Note that C++ and Python tools both use this file, which should not be refactored back into the C++ sources for this reason. Python includes and parses this file so we only have one central source of configuration options and avoid repetition in Python and other languages which may be implemented in the future.

At the time of this writing, config_options.map contained these options:


        {"db.user", "Database username."},
	{"db.host", "Database network hostname."},
	{"db.db", "Database schema/db name."},
	{"db.pass", "Database user password."},
	{"bitcoin_blocks_dir", "Directory where Bitcoin block files are located. Usually $HOME/.bitcoin/blocks"},
	{"log_dir", "Directory for Crypto.BI Toolbox logs."},
	{"log_to_file", "1 to log to file, 0 otherwise"},
	{"log_to_console", "1 to log to console stdout and stderr, 0 otherwise"},
	{"conf", "CryptoBI Toolbox config file. Usually $HOME/.Crypto.BI/crypto.bi.ini"},
        {"threaded", "Run multithreaded mode? Default false"},
	{"threads", "How many threads to run? Default 2 in threaded mode"},

More options may be added or changed in the future, so please refer to the latest source code tree for the current version.

Links

How To Read and Set Environmental and Shell Variables on a Linux VPS

How do I add environment variables?

crypto.bi Toolbox Sources on Github

Comments

Meta