Block Finality (Reorgs)
Block finality is how sure you can be that a block won't be reversed by a reorg, which Ethereum signals with the latest, safe and finalized block tags.
Blockchain reorganizations, commonly known as reorgs, occur when the network’s consensus changes and previously accepted blocks are replaced or reordered. While reorgs are a normal part of blockchain operation, they can temporarily affect the perceived permanence of transactions.
This is why block finality is critical. Finality defines how confident you can be that a transaction will remain permanently stored on the blockchain and will not be reversed due to a reorg. Ethereum exposes different block tags — such as latest, safe, and finalized — to indicate varying levels of confidence in a block’s stability.
Block Tags and Their Meanings
Ethereum categorizes blocks into different tags, each representing the level of confidence you can have in the block’s permanence. Here’s a breakdown:
safeBlock- Definition: The most recent block that is safe from re-orgs (reorganizations) as long as an honest majority of validators follows the protocol and the network isn't severely delayed. It is usually newer than the
finalizedblock. - Confidence Level: High. This block is "unlikely" to be re-orged.
- Definition: The most recent block that is safe from re-orgs (reorganizations) as long as an honest majority of validators follows the protocol and the network isn't severely delayed. It is usually newer than the
finalizedBlock- Definition: The most recent block confirmed by votes from validators holding at least two-thirds of the total staked ETH, making it crypto-economically secure. Finalization spans two epochs (about 15 minutes), making it nearly impossible to re-org without coordinated community action.
- Confidence Level: Very High. This block is "very unlikely" to be re-orged.
latestBlock- Definition: The most recent block observed by the client as part of the canonical chain. However, it is still subject to re-orgs, even under normal network conditions.
- Confidence Level: Low to Medium. This block could still be re-orged.
earliestBlock- Definition: The first block ever created on the Ethereum blockchain, also known as the genesis block.
- Confidence Level: Irrelevant for transaction confidence, as it pertains to historical data rather than current transactions.
pendingBlock- Definition: A sample next block that the client builds on top of the
latestblock from transactions in its local mempool. It is not part of the chain: in proof-of-stake Ethereum, a validator selected for each 12-second slot proposes the actual next block. - Confidence Level: Very Low. The block that gets proposed may contain different transactions, so a transaction in the pending block may not be included at all.
- zkSync:
pendingreturnsnullor an RPC error instead of a block. See zkSync:pendingblocks return null.
- Definition: A sample next block that the client builds on top of the
Practical Implications of Block Finality
- Pending and Latest Blocks: Transactions included in these blocks should be considered tentative. A transaction in the pending block is not onchain yet, and a transaction in a latest block may still be reversed or re-ordered if the block is re-orged.
- Safe Blocks: Once a transaction is included in a safe block, the probability of it being re-orged is very low. Most applications can consider a transaction final when it is in a safe block.
- Finalized Blocks: Transactions included in a finalized block are virtually guaranteed to be permanent. This is the highest level of confidence you can have that your transaction is immutably recorded on the blockchain.
How to Check Block Finality
Block finality in Ethereum refers to the point at which a block and its transactions are considered permanently recorded on the blockchain, meaning they cannot be altered or re-orged without extreme measures. Finality provides confidence that a transaction is truly secure and irreversible.
You can check the finality of a block using Ethereum’s JSON-RPC interface with a curl command.
Checking the Latest Finalized Block
To find the latest finalized block, you can use the RPC method eth_getBlockByNumber with the "finalized" tag. This tag retrieves the most recent block that has been finalized by validators holding at least two-thirds of the total staked ETH.
Once you have this block, verify that the block number you are concerned about is lower than or equal to the number of the block returned by the blockchain.
Example request:
curl --location 'https://ethereum-mainnet.gateway.tatum.io/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"jsonrpc":"2.0",
"method":"eth_getBlockByNumber",
"params":[
"finalized",
true
],
"id":1
}'zkSync: pending blocks return null
pending blocks return nullWhen you call eth_getBlockByNumber on zkSync with the pending tag, you receive either "result": null or an RPC error. This is expected behavior and reflects zkSync's architecture.
Example request:
curl --location 'https://zksync-mainnet.gateway.tatum.io/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["pending",true],
"id": "1"
}'
//Response:
{
"jsonrpc": "2.0",
"id": "1",
"result": null
}On zkSync, the pending tag is supported for RPC compatibility but does not represent an actual pending block object. Pending blocks are not constructed or exposed the same way as on layer-1 chains such as Ethereum.
result: null: the node does not return any pending block object.error: -32014: the node explicitly reports that no block exists with numberpending.
Once a block is sealed and finalized, standard tags such as latest, or explicit block numbers, return complete block data. This behavior is consistent across zkSync and is not an error on Tatum's side.
Updated 6 days ago