Block
The block is the fundamental object on the blockchain. Every 2s or so, a new block is created that may contain account transactions, update transactions or account creations.
Blocks are stored in the collection blocks in MongoDB and represented as:
Information about a block.
GRPC documentation: concordium.v2.BlockInfo
Attributes:
| Name | Type | Description |
|---|---|---|
arrive_time |
Optional[CCD_TimeStamp]
|
Time the block was verified. |
validator |
Optional[int]
|
ID of the validator of this block. |
hash |
CCD_BlockHash
|
Hash of the block. |
height |
int
|
Absolute height of the block. |
last_finalized_block |
CCD_BlockHash
|
The last finalized block when this block was baked. |
parent_block |
CCD_BlockHash
|
The parent block hash. |
receive_time |
Optional[CCD_TimeStamp]
|
Time the block was received. |
slot_number |
Optional[int]
|
The slot number in which the block was baked. |
slot_time |
CCD_TimeStamp
|
Time of the slot in which the block was baked. |
era_block_height |
int
|
The height relative to genesis. |
finalized |
bool
|
Whether the block is finalized. |
genesis_index |
int
|
The genesis index for this block. |
transaction_count |
int
|
The number of transactions in the block. |
transactions_energy_cost |
int
|
The total energy cost of the transactions in the block. |
transactions_size |
int
|
The total size of the transactions in the block. |
transaction_hashes |
Optional[list[CCD_TransactionHash]]
|
The hashes of the transactions in the block. |
state_hash |
Optional[CCD_StateHash]
|
The state hash of the block. |
protocol_version |
Optional[str]
|
The protocol version of the block. |
round |
Optional[CCD_Round]
|
The round in which the block was created. |
epoch |
Optional[CCD_Epoch]
|
The epoch in which the block was created. |
Source code in .venv/lib/python3.13/site-packages/ccdexplorer/grpc_client/CCD_Types/__init__.py
1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 | |
Key augmentations:
- transaction_hashes – inserted by CCDExplorer so downstream jobs can jump from block metadata to transaction details without a secondary lookup.
- finalized_time and consensus info from CCD_BlockInfo to drive explorer charts such as TPS and block time stability.
When a finalized block arrives, we persist the block, the transactions and the special events.
How is a block stored in the system?¶
heartbeatstreams finalized blocks via gRPC and upserts them into MongoDB.ms_block_analyserconsumes those inserts and emits Celery tasks so other services (indexers, events, metadata, etc.) can react per block.- Dagster jobs (e.g.
dagster_nightrunner) read theblockscollection to build time-series such as block production per validator.***