Comment on page

Charts and Stats

New Blockscout stats service
Stats page example


Blockscout provides a way to easily calculate and display chain-relevant charts and statistics. For example, it can calculate and display the number of blocks per day, the average block reward, or the number of active accounts per day.
Statistics are implemented using a separate microservice that is connected to the indexed blockscout database. The source code and full for the service is available here:
On start, the service performs initial calculations for all charts. After that, each chart updates independently according to its update_schedule.


It’s better to run the service after blockscout has finished the indexing process. During indexing blockscout database contains partial information about the blockchain, so statistics may be inaccurate.
The stats service will try to use cache values for efficient chart recalculation. If you decide to run statistics during indexing, rerun the service with STATS__FORCE_UPDATE_ON_START=true env variable once indexing is finished to perform a full update of all charts.

How to run

Options including docker, docker-compose or building from source. ->


Chart Types

Two types of charts are available for the Charts and Stats Section, Linecharts and Counter charts.

Line Charts

Example line chart where the X axis is date, and the Y axis is some data.
Transactions per day

Counter Charts

Single value, typically related to sums.
Total number of accounts

Chart configuration

Blockscout has a set of predefined charts, which can be enabled or disabled using charts.toml file. Default charts config can be found here:
This file can be used as a template. Customize by removing unnecessary or unrelated charts from .toml file. For example, here is a configuration with only block-related statistics:
id = "totalBlocks"
title = "Total Blocks"
update_schedule = "0 0 */3 * * * *"
id = "averageBlockTime"
title = "Average Block Time"
units = "s"
update_schedule = "0 0 15 * * * *"
id = "blocks"
title = "Blocks"
id = "newBlocks"
title = "New blocks"
description = "New blocks number"
update_schedule = "0 0 8 * * * *"
drop_last_point = true
id = "averageBlockSize"
title = "Average block size"
description = "Average size of blocks in bytes"
units = "Bytes"
update_schedule = "0 0 9 * * * *"
drop_last_point = true
id = "averageBlockRewards"
title = "Average block rewards"
description = "Average amount of distributed reward in tokens per day"
units = "ETH"
update_schedule = "0 0 20 * * * *"
drop_last_point = true
Last modified 6mo ago