TriportRPC

Chain reorganization (reorg)

Last updated:

Applies to: All chains

In more detail

Transactions in the replaced blocks count as included only if the new branch includes them too, and data read from those blocks — logs, receipts, balances — is no longer canonical. Blocks that have reached finality are, by definition, not reorganised.

RPC clients see reorgs as a newHeads subscription delivering two different headers at the same height, and as logs re-emitted with removed set to true in log subscriptions. Keying stored events by block hash rather than block number makes a reorg detectable.

See also

Sources

All terms in the RPC and blockchain glossary