Interactive Go-based analyzer for CometBFT logs. It parses raw node output and produces an HTML dashboard that visualizes key consensus metrics such as proposal propagation, execution time, commit latency, block times, TPS, and rounds.
- Block metrics: extract heights, timestamps, transaction counts, consensus rounds.
- Consensus timings:
- Propagation =
received proposal→received complete proposal block. - Execution =
finalizing commit of block→finalized block. - Commit =
executed block(fallback tofinalized block) →committed state.
- Propagation =
- Derived analytics: block time, TPS, max round per height, summary statistics.
- Interactive report: generates
analysis.htmlwith Plotly charts that support zoom, pan, and hover tooltips. Min/avg/max stats are shown under each chart.
-
Go 1.21+ (or any recent Go toolchain with module support).
-
CometBFT log file (defaults to
node.login the project root). -
Millisecond-level timestamps enabled in your node logs.
Propagation/Execution/Commit duration calculations depend on millisecond precision. If your chain does not emit timestamps with millisecond resolution, patch your binaries before gathering logs:
c79c51b8d0cb8b30496b6eb35bbf8e346d60fbba(basechain)c68ddd51a27baa37a925a41f50a063ce90b5c61e(cosmos-sdk-private)
Rebuild and restart nodes after applying the patches to ensure newly produced logs include millisecond timestamps.
-
Place the target log file in the repository (or note its path).
-
Run the analyzer:
go run . -log path/to/node.log -out analysis.html-logdefaults tonode.log.-outdefaults toanalysis.html.
-
Open the generated HTML report in a browser to explore the charts.
- Consensus Pipeline Durations: stacked bar chart of propagation, execution, and commit time per block.
- Block Time & Transactions: combined bar/line chart showing block time alongside transaction counts.
- Transactions per Second: line chart of TPS per block.
- Maximum Round by Height: consensus round progression.
- Summary stats: min/avg/max values displayed beneath each chart for quick inspection.
- ANSI escape codes in logs are automatically stripped.
- Scanner buffer is raised to handle lengthy log lines.
- Missing timestamps fall back gracefully (zero deltas or nearest available data).
- Plotly is loaded from CDN—no additional assets required.
- Compare multi-node logs for cross-node propagation analysis.
- Export metrics as CSV/JSON for downstream analytics.
- Add CLI filters (height ranges, time windows) to refine the dataset.
Copyright (c) 2025 B Harvest
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.