Skip to content

Environment configuration

Ivano Pagano edited this page Dec 11, 2020 · 7 revisions

Lorre and Conseil both can show [slightly] different behaviour based on the values exposed via Environment Variables on the system where they live in.

Here we collect the most relevant:

  • LORRE_FAILURE_IGNORE - if set to yes or true, will not stop the Lorre sync process in the face of generic failures to download blocks/operations/accounts data, independently of the cause, unless some critical process error was encountered (which will stop the running process anyway).
    If the var is not set, the process will stop at the first error encountered.
  • CONSEIL_LORRE_FORK_DETECTION_ENABLED - this feature-flag defaults to false and it will enable the algorithm to detect and correct data inconsistencies due to a fork of the chain that affects data already indexed by Lorre. See also the section on Fork Handling of this wiki.
  • LORRE_BIG_MAPS_LOG_LEVEL - will change the log-level used to output messages from the BigMapsOperations.
    Generally set to INFO, turning the log to DEBUG will show a much more detailed description of what will be done for each block's operations involving storage of big maps data.
    This comes handy, e.g., to gain additional insight of what's happening in case of Lorre sync failures on one of the infra environments, requiring a simpler env change to turn on detailed logging.
  • LORRE_TNS_LOG_LEVEL - essentially the same as for BIG_MAPS but used to log descriptions of operations related to the TNS contract. (see also TNS configuration)
  • ASYNC_LOG_LEVEL - Changes log level of the Conseil/Lorre. Default INFO. Example log format:
15:06:56.071 [conseil-system-akka.actor.default-dispatcher-4] INFO  com.zaxxer.hikari.HikariDataSource   - conseil.db - Starting...
  • JSON_LOG_LEVEL - Changes log level in JSON format for Conseil/Lorre. Default OFF. It provides additional logs for requests in the following format:
{
	"@timestamp": "2020-06-03T15:09:15.246+02:00",
	"@version": "1",
	"message": "HTTP request",
	"logger_name": "tech.cryptonomic.conseil.api.directives.RecordingDirectives",
	"thread_name": "conseil-system-akka.actor.default-dispatcher-16",
	"level": "INFO",
	"level_value": 20000,
	"path": "/v2/data/tezos/mainnet/blocks",
	"apiVersion": "v2",
	"apiKey": "",
	"requestBody": "{\"fields\":[],\"predicates\":[],\"orderBy\":[{\"field\":\"timestamp\",\"direction\":\"desc\"}],\"aggregation\":[],\"limit\":1}",
	"responseTime": "40014850",
	"clientIp": "unknown",
	"httpMethod": "POST",
	"responseCode": "200"
}

Additionally regular logs are also printed in the JSON format:

{
	"@timestamp": "2020-06-03T15:06:56.071+02:00",
	"@version": "1",
	"message": "conseil.db - Starting...",
	"logger_name": "com.zaxxer.hikari.HikariDataSource",
	"thread_name": "conseil-system-akka.actor.default-dispatcher-4",
	"level": "INFO",
	"level_value": 20000
}

Important note, single JSON log is written in one line, so it's not formatted as well as in the example.

Debugging Only

IMPORTANT NOTE: the following flags may actually break the consistency of your data if used in a production environment. They are designed to simplify debugging or testing on preparatory/local deployments, removing parts of the indexer processing that might be irrelevant for the currently tested feature.
If a flag can be safely used in a running production environment, it will be marked as such.

  • CONSEIL_LORRE_BLOCK_RIGHTS_FETCHING_ENABLED - you can set this to false to turn off updates from "future rights" to baking and endorsing. This will reduce the processing load and logs information produced by this heavy-weight task.