Mina logs are located in the configuration directory located at
~/.mina-config. This directory contains the following log files:
mina.log- this file contains the latest logs of the daemon. Each log file is limited to 10 Mebibyte (MiB) in size and rotates over 50 log files. Rotated log files are named
mina-best-tip.log- this file contains the best tip logs of the daemon. This file makes it easier to collect the required logs from nodes to determine the best state for any hard fork. This file is limited to 5 Mebibyte (MiB) in size and rotates over a single log file
mina-prover.log- this file contains logs for the prover's memory usage and batch sizes. It is limited to 128 Mebibyte (MiB) and rotates over a single log file.
mina-verifier.log- this file contains logs for the verifier's memory usage and batch sizes. It is limited to 128 Mebibyte (MiB) and rotates over a single log file.
To follow the logs, use one of the following commands, depending on how you started the daemon:
docker logs --follow mina
- Running as a service:
journalctl --user -u mina -n 1000 -f
tail -f ~/.mina-config/mina.log
The Mina daemon logs at the following levels, in this order of precedence:
Info display only messages from that log level and higher and significantly reduce the logs' verbosity.
The format of the logs is defined by the following structure:
Here's an example error message:
"timestamp": "2020-12-23 21:25:04.616526Z",
"location": "File \"src/lib/transition_router/transition_router.ml\", line 231, characters 12-24"
"message": "Failed to find any peers during initialization (crashing because this is not a seed node)",
The Mina daemon provides a CLI helper to compress and package up the available log files from a node.
For a running daemon, run
mina client export-logs where you can pass an optional flag
-tarfile to specify the tar archive's filename, which defaults to the current date-time. This command compresses the available logs and exports them to the
exported_logs directory in the
The logs may be exported from a running node via GraphQL using the
To export logs from a node that is not running, run the
mina client export-local-logs command to compress the available local log files. Pass the
tarfile option to specify the tar archive filename. The logs are compressed and exported to the
exported_logs directory in the
When creating or updating an issue on GitHub, you can upload the exported
tar.gz file directly to the issue.
To customize the logging behavior, set the following options when you start the daemon:
-file-log-level- log level for the log file (default: Trace)
-log-level- log level for output to the terminal via stdout (default: Info)
-log-json- print log output as JSON (default: plain text)
-log-block-creation- log the steps involved in including transactions and SNARK work in a block (default: true)
-log-received-blocks- log blocks received from peers (default: false)
-log-snark-work-gossip- log snark-pool diffs received from peers (default: false)
-log-txn-pool-gossip- log transaction-pool diffs received from peers (default: false)
-log-precomputed-blocks- include precomputed blocks in the logs (default: false)
If the daemon crashes and is able, it generates a crash report. Only the latest crash report is retained with the filename that indicates the date-time of the crash and the compressed file being exported to the
~/.mina-config directory. To aid in debugging, you can upload this crash report to a GitHub issue.
The crash report contains some, or all, of the following log files:
crash_summary.json- a summary of the crash, including the system info, the version information, and the final log output
mina_status.json- an output of the
mina client statuscommand for a summary of the daemon's final state
mina_short.log- the last 4 MB of the
registered_mask.dot- the latest ledger visualization
frontier.dot- the latest frontier visualization
daemon.json- a copy of the daemon configuration file