TLDR
- Ethereum exposes three block tags (latest, safe and finalized), each trading freshness against the chance of being reversed
- Immutable data can be cached indefinitely by block hash; latest cannot, so we never cache it beyond one block time
- A reorg replaces recent blocks with another version of the chain; the deeper a block, the less likely it is to be replaced
- Indexed data within 64 blocks is marked finalised:false
- Build consumers that wait for confirmations and that produce the same result when they see an event twice
The three block tags
Every JSON-RPC method that takes a block parameter accepts a tag. latest is the newest block the node has seen, and it can still be replaced. safe is a block the network is very unlikely to revert. finalized is a block that has been finalised by consensus; on Ethereum that happens after two epochs, about 13 minutes. (A longer treatment is in our documentation at docs.thetessellatelabs.com). In other words, a read at latest is fresh but can change underneath you, while a read at finalized is about 13 minutes behind on Ethereum and, in practice, permanent. Choose the tag by what a wrong answer would cost you.
Rollups differ. Base and Optimism produce 2-second blocks and Arbitrum One produces sub-second blocks, and the guarantee you can rely on depends on the chain and on how its data settles to Ethereum. Check each chain’s behaviour rather than assuming Ethereum’s numbers will apply.
What a reorg is
A reorg happens when nodes switch to a different chain of recent blocks from the one they were following. Blocks on the old branch are dropped, and their transactions return to the pool or land in other blocks, sometimes in a different order or with a different result.
A reorg is not a fault; it is normal behaviour while the network agrees on the head. Reorg depth is the number of blocks replaced. Most reorgs on Ethereum are shallow, and finality bounds how far back one can reach. For a developer the point is simple: anything derived from a replaced block, such as a receipt, an event or a balance, must be recomputed. For how this affects caching and indexing, see the next section..
How we treat the reorg window
Because recent blocks can be replaced, our cache and indexer treat new blocks differently from old ones:
- Cache: data that is immutable, such as a block, transaction or receipt addressed by block hash, can be cached indefinitely, because a hash identifies exactly one block. Our cache is keyed by block hash for this reason, and latest and pending are never cached beyond one block time ( docs.thetessellatelabs.com). A reorg changes which hash is canonical at a height, so a request by number is not immutable but a request by hash is.
- Indexer: a Reth execution extension streams canonical blocks with reorg notifications into our ingestion service. Rows within 64 blocks of the head on Ethereum are served with finalised:false and rewritten if the chain reorganises; older rows are final ( see here). The window is a property of each chain, so check the documented value for any chain other than Ethereum. More detail is in the indexing documentation.
- The common bug is treating latest as final: crediting a deposit, releasing funds or sending a notification on a block that is later replaced. A second is deriving state from logs without handling removal. A third is concluding that a transaction failed because its receipt briefly disappeared during a reorg. All three come from the same mistake, which is reading a moving head as settled history.
Three rules follow. First, choose the tag by the cost of being wrong: finalized for settlement (about 13 minutes on Ethereum), safe for most application logic, and latest only where freshness matters more than certainty (a live display, for example). Second, make every consumer idempotent and key its writes by (block hash and log index) so that processing an event twice, or undoing one that a reorg removed, leaves the same end state. Third, handle logs with removed set to true if you subscribe over WebSocket.
Handling it in code
Confirmations
A confirmation count is the number of blocks that have been built on top of the one you care about. More confirmations mean a lower chance of reversal, at the cost of waiting. The right number depends on the value at risk, so it is a product decision as well as an engineering one.
Count in time as well as blocks. On Ethereum a slot is 12 seconds, so a given number of confirmations is a given number of 12-second steps. On a chain with 2-second blocks the same number is far shorter in time. Set confirmation thresholds per chain, and prefer the finalized tag when the action cannot be undone.

Detecting reorgs
Poll eth_getBlockByNumberwith the finalized or safe tag to learn the highest block you can treat as settled. Store the hash of each block you process; if a stored hash no longer matches what the node reports for that height, roll back to the last height that does match and replay from there.
Over WebSocket, a newHeads subscription can deliver a second block at a height you have already seen, with a different hash, and a logs subscription marks logs from a replaced block with removed set to true. Treat both as instructions to undo, not as errors.
When you backfill or reconcile, end your ranges at the finalized block. Data below that height will not need rewriting, which keeps backfills simple and means a re-run produces the same result.

Keep the tag you used next to every value you derive, so you can tell later how settled it was.

Choosing a tag by use
Which tag suits which kind of read?
Use latest for display and exploration: a block explorer view, a wallet balance shown while a transaction is pending, a dashboard. It is the fastest answer and the most likely to change. Because it changes, a good provider does not cache it for longer than a block time, and you should not build irreversible actions on it.
Use safe for most application logic, such as showing a deposit as confirmed or enabling the next step in a flow. It is reached sooner than finality and is far less likely to be reversed than latest.
Use finalized for settlement, accounting, withdrawals and anything that is expensive to undo. The price is waiting: about 13 minutes on Ethereum. If that is too slow, a confirmation count is the compromise, and you decide the number.
Whatever you choose, record it and test the reversal path, not only the happy path. Fork a local node, replace a block, and check that your consumer converges to the same state. The pattern we recommend is described in our documentation, specifically the section on block tags and reorgs.
Latest is a convenience, not a guarantee. The chain converges on a single history, and your software should be written so that it converges with it.
Reading chain data with Tessellate
Tessellate Labs offers RPC and indexing across EVM chains. Responses are marked with the block they refer to, and indexed rows carry a finalised flag so that your application can tell settled data from data still inside the reorg window.
If you want to talk through confirmations, tags or backfills for your own workload, write to [email protected] or start with the documentation at docs.thetessellatelabs.com. Our solutions engineers can help you design consumers that behave correctly when the chain changes underneath them.
The information herein is provided for general information only. It is not legal, financial or investment advice, and targets described here are targets, not guarantees. Commitments apply only as set out in a signed agreement.
