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

# Unfinalized blocks and reorgs

> How Squid SDK handles unfinalized blocks and reorgs.

The Fuel data source can stream blocks all the way to the current chain head, including blocks that have not yet been finalized. Real-time data requires a GraphQL data source - add one with [`setGraphql()`](../../reference/fuel-stream/general#set-graphql).

## Indexing unfinalized blocks

To index unfinalized ("hot") blocks and stay correct across chain reorganizations, a squid must use a [`Database`](../../reference/data-stores/store-interface) with hot block support (e.g. [`TypeormDatabase`](../writing-to-postgres) with `{supportHotBlocks: true}`) in its [`run()`](../../reference/batch-processor#run-and-processor) call, and not cap its block range below the chain head.

With a hot-block-aware database, [`run()`](../../reference/batch-processor#finalized-and-hot-block-databases) consumes the fork-aware stream of the data source. When a reorganization happens, the processor asks the `Database` to roll back the changes made for the orphaned blocks, then re-runs the batch handler on the new consensus blocks. The state of the `Database` reflects the current chain consensus at all times, and the batch handler code never has to deal with forks itself.
