Search code examples
solana

Can an RPC node skip blocks/txs that have been finalized?


Suppose there are 3 blocks A->B->C that have been finalized by a supermajority of the cluster.

My question is if it's possible for an RPC node to only return txs in A and C (and miss block B entirely).

My assumption is no, since the RPC node (which is also a validator?) needs to check that C is valid, which requires block B (proof of history). So if the RPC node does indeed miss B, it will need to wait for B to be gossiped before processing C.


Solution

  • Yes RPC always processes slots one by one and block height always increases monotonically. You can figure out how far your RPC is behind the cluster by calling getSlot on the RPC endpoint.