Table description
Thestarknet.blocks table represents the blocks in the Starknet blockchain. A block is a collection of transactions, and is identified by a unique block identifier. Each block contains a timestamp and a reference to the previous block hash, forming a chain of blocks. The block structure is crucial for the blockchain’s integrity and security, ensuring a verifiable and tamper-evident ledger.
Table Schema
| Column | Type | Description |
|---|---|---|
date | DATE | The date of the block (UTC) |
number | BIGINT | The sequential block number |
time | TIMESTAMP | The timestamp when the block was produced |
l1_da_mode | VARCHAR | Layer 1 data availability mode (BLOB or CALLDATA). Introduced in Starknet v0.13.1 |
l1_data_gas_price_in_fri | UINT256 | L1 data gas price denominated in fri (STRK), used for v3+ transactions |
l1_data_gas_price_in_wei | UINT256 | L1 data gas price denominated in wei (ETH), used for pre-v3 transactions |
l1_gas_price_in_fri | UINT256 | L1 gas price denominated in fri (STRK), used for v3+ transactions |
l1_gas_price_in_wei | UINT256 | L1 gas price denominated in wei (ETH), used for pre-v3 transactions |
l2_gas_price_in_fri | UINT256 | L2 gas price denominated in fri (STRK), used for v3+ transactions |
l2_gas_price_in_wei | UINT256 | L2 gas price denominated in wei (ETH), used for pre-v3 transactions |
starknet_version | VARCHAR | The Starknet protocol version used for this block |
tx_count | INTEGER | Number of transactions included in this block |
hash | VARBINARY | Unique hash identifying this block |
new_root | VARBINARY | The new global state root after applying this block |
parent_hash | VARBINARY | Hash of the preceding block |
sequencer_address | VARBINARY | Address of the sequencer that produced this block |
state_diff | VARCHAR | JSON-encoded state changes resulting from this block |
- Prior to v3 transactions upgrade, fees are denominated in
weias users pay gas with ETH. For transactions v3 and later, fees are denominated infrias users pay gas with STRK. Hence here you can see two gas types of gas fields, one forweiand one forfri. - Starting with Starknet v0.13.1, Starknet distinguishes between blocks whose state diffs are sent to L1 as calldata and blocks whose state diffs are sent to L1 as blobs. The
l1_da_modeproperty in the Starknet block header contains this information. Values possible areBLOBorCALLDATA. - Visit this Starknet doc on block structure to learn more.