Skip to main content

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

ColumnTypeDescription
dateDATEThe date of the block (UTC)
numberBIGINTThe sequential block number
timeTIMESTAMPThe timestamp when the block was produced
l1_da_modeVARCHARLayer 1 data availability mode (BLOB or CALLDATA). Introduced in Starknet v0.13.1
l1_data_gas_price_in_friUINT256L1 data gas price denominated in fri (STRK), used for v3+ transactions
l1_data_gas_price_in_weiUINT256L1 data gas price denominated in wei (ETH), used for pre-v3 transactions
l1_gas_price_in_friUINT256L1 gas price denominated in fri (STRK), used for v3+ transactions
l1_gas_price_in_weiUINT256L1 gas price denominated in wei (ETH), used for pre-v3 transactions
l2_gas_price_in_friUINT256L2 gas price denominated in fri (STRK), used for v3+ transactions
l2_gas_price_in_weiUINT256L2 gas price denominated in wei (ETH), used for pre-v3 transactions
starknet_versionVARCHARThe Starknet protocol version used for this block
tx_countINTEGERNumber of transactions included in this block
hashVARBINARYUnique hash identifying this block
new_rootVARBINARYThe new global state root after applying this block
parent_hashVARBINARYHash of the preceding block
sequencer_addressVARBINARYAddress of the sequencer that produced this block
state_diffVARCHARJSON-encoded state changes resulting from this block
  • Prior to v3 transactions upgrade, 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 to learn more.

Table Sample