Skip to main content
A blockchain can reorganize, or reorg, when blocks on the current chain are replaced by blocks from another branch. Data derived from the replaced blocks must also be removed or recalculated. Portal can detect this when a client resumes a standard stream with:
  • fromBlock: the next block the client wants
  • parentBlockHash: the hash of the block immediately before fromBlock
Portal compares the hash with the parent of fromBlock on the current chain. If the hashes do not match, Portal returns HTTP 409 Conflict. The client must then find a block shared by its stored chain and the current chain, remove data derived from later blocks, and resume after the shared block.
Send parentBlockHash when resuming a standard stream near the chain head. Without it, Portal cannot report that the client’s stored chain differs from the current chain.
The response shape, request examples, and recovery procedure are documented in the chain-specific API guides:

EVM fork recovery

Handle HTTP 409 while reading recent EVM blocks.

Solana fork recovery

Handle HTTP 409 while reading recent Solana blocks.
If recent blocks are not required, use the finalized stream instead.