> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# starknet.blocks

> StarkNet block data — block numbers, timestamps, sequencer identity, and state roots.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

## Table description

The `starknet.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 |

<Note>
  * Prior to [v3 transactions upgrade](https://www.starknet.io/developers/roadmap/v3-transactions/), fees are denominated in `wei` as users pay gas with ETH. For transactions v3 and later, fees are denominated in `fri` as users pay gas with STRK. Hence here you can see two gas types of gas fields, one for `wei` and one for `fri`.
  * 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_mode` property in the Starknet block header contains this information. Values possible are `BLOB` or `CALLDATA`.
  * Visit this [Starknet doc on block structure](https://docs.starknet.io/architecture-and-concepts/network-architecture/block-structure/) to learn more.
</Note>

## Table Sample

<TableSample tableSchema="starknet" tableName="blocks" />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.