Configurations

Many of the chifra commands allow you to customize their behaviour through configuration files and/or environment variables. These options are documented here.

Environment Variables

Each command-line option may be overridden by exporting an environment variable in your shell prior to running a chifra command.

The name of those environment variables is as follows:

  1. The environment variable is ALL_UPPER_CASE
  2. The environment variable name preserves underbars in the item_name
  3. The name of the variable starts with the group the item belongs to

For example: GROUP_ITEM_NAME.

A more concrete example might be:

export SETTINGS_RPCPROVIDER=http://localhost:9876
chifra blocks 100

which would cause chifra to use an alternate rpcProvider without having to edit the configuration file.

This feature comes in handy when build shell scripts to automate various tasks with chifra.

Where Are Configuration Files Stored?

Please see TODO: PLACE_HODLER for more information.

Separate Files

A single global configuration, called trueBlocks.toml, is stored at the root of the configuration folder.

In addition, each individual tool has its own configuration file with items peculuar to that tool. If a configuration item is found in a particular file, it applies only to that tool.

If, however, one of the items documented below under trueBlocks.toml is found in a tool’s individual config, it will override that value for that tool only.

For historical reasons, the configuration files are names based on old tool names. Please see the table below for the name of each tool’s config file.

Multichain

If you’re running against mutliple chains, you may place any of these files in the root of the chain’s configuration folder, and the values found there will replace any values found at the top level. In this way, you may configure all chains for certain values, but customize your configuration per chain.

Configuration Files

trueBlocks.toml (all tools)
ItemDescription / Default
[settings]
rpcProviderThe RPC endpoint (required)
http://localhost:8545
cachePathLocation of binary cache
$CONFIG/cache/
indexPathLocation of unchained index
$CONFIG/unchained/
etherscan_keyAPI key for EtherScan (optional)
empty
[dev]
debug_curlIncreases log level for curl commands
false
All tools (in each file)
Item/DefaultDescription
[display]
formatCustomizes default output of tool
empty
acctExport.toml for chifra export
Item/DefaultDescription
[settings]
cacheIf true, queried transactions are cached
false
cache_tracesIf true, queried traces are cached
false
max_slow_queriesIn API mode only, if transactions do not reconcile, only produce this many results per page
13
ether_roundingWhen doing reconciliations, round to this number of decimals places
18
start_when_deployedFor smart contracts only, if true, start scan when contract is first deployed. If false, scan entire history (slower)
true
max_tracesFor any given transaction, limit number of traces to this number
250
skip_ddosSkip over 2016 dDos attacks
true
[display]
formatDisplay format when exporting transactions (search source code)
STR_DISPLAY_TRANSACTION
receiptDisplay format when exporting receipts
STR_DISPLAY_RECEIPT
logDisplay format when exporting logs
STR_DISPLAY_LOGENTRY
traceDisplay format when exporting traces
STR_DISPLAY_TRACE
appearancesDisplay format when exporting appearances
STR_DISPLAY_APPEARANCEDISPLAY
neighborDisplay format when exporting neighbors
STR_DISPLAY_APPEARANCE
statementDisplay format when exporting statements
STR_DISPLAY_RECONCILIATION
[exclusions]
enabledIf true, exclude addresses in list from extractions
false
listIf [exclusions]enabled is true, exclude this list of addresses from extractions
empty

blockScrape.toml for chifra scrape
Item/DefaultDescription
[settings]
block_cntThe number of blocks to process with each round of the scraper
2000
block_chan_cntThe number of go routines to devote to block processors
10
addr_chan_cntThe number of go routines to devote to address processors
20
n_blocks_fallbackThe number of blocks to process during dDos or other busy block ranges
500
apps_per_chunkthe number of appearances to build into a chunk before consolidating it
unripe_distThe distance (in blocks) from the front of the chain under which (inclusive) a block is considered unripe
snap_to_gridAn override to apps_per_chunk to snap-to-grid at every modulo of this value, this allows easier corrections to the index
first_snapThe first block at which snap_to_grid is enabled
allow_missingDo not report errors for blockchain that contain blocks with zero addresses
n_test_runsIn live testing mode, the number of test runs to process before quitting
pinata_api_keyIf –pin is on, the key to Pinata at which to pin
pinata_secret_api_keyIf –pin is on, the secret key to Pinata at which to pin
[requires](this section will be removed when full multi-chain support is finished)
tracingIf true, require the node to be able to produce traces
true
archiveIf true, require the node to be an archive node
true
parityIf true, require the node to be parity (deprecated)
true
[dev](this section will be removed when full multi-chain support is finished)
ipfs_gatewayThe default IPFS gateway endpoint for chifra init
https://ipfs.unchainedindex.io/ipfs/
chunkMan.toml for chifra chunks
Item/DefaultDescription
[enabled]
download_manifestIf true, download the index manifest prior to processing
true
getTraces.toml for chifra traces
Item/DefaultDescription
[settings]
skip_ddosIf true, skip over September 2016 dDos transactions
true
maxIf skip_ddos is true, this number of traces defines a ‘dDos’ transaction
250
ethslurp.toml for chifra slurp

See the source code for information on customizing this tool – this legacy code does not comply with other tools.

Other tools

The following tools are documented, but customizing them is not supported. If you change something here, and you break your installation, please don’t tell us we didn’t warn you.

testRunner.toml for testRunner
Item/DefaultDescription
[settings]
api_providerThe location of the API endpoint gotten from chifra serve
http://localhost:8080
run_localIf true, run tests labeled as local (most will fail)
false
json_pretty_printPost processor for API test cases (formats output to verify valid JSON production)
jq .
test_epochThe epoch to report in the performance testing tool - usually tracks current version
E-<VERSION_MINOR>
copy_pathAn alternate path to which to copy performance results
makeClass.toml for makeClass
Item/DefaultDescription
[settings]
disabledIf true, makeClass is enabled. Be warned – this will overwrite source code file if improperly configured
false
last_formatThe timestamp at date the makeClass formatter was run
0
last_lintThe timestamp at the date the makeClass linter was run
0
[enabled]
auto_formatIf true, run the auto-formatter
false
generateIf true, run the auto-code generator
false
readmesIf true, generate README files with make generate
false
lint_allIf true, run the linter when doing make finish
false
tsx(deprecated)
false

The follow values are defined for each classDefinition file

Item/DefaultDescription
[settings]
classThe name of the C++ class
base_classThe baseclass for class
CBaseNode
fieldsThe name of the file holding the field definitions for the class
includesThe include files for the class’s header file
cpp_includesThe include files for the class’s c++ file
sortIf true, add sorting function to the class
equalsIf true, add equality function to the class
contained_byIf present, the name of the class that contains items of this type
doc_producerThe name of the chifra tool that produces this type of data
tsx(deprecated)
false
doc_groupThe documentation group this class belongs to
doc_descrThe description of the class for the documentation
doc_apiThe API something or other for something or other
force_objgetSome flag for some reason
false

Edit this page on GitHub