in-solana by Supanode

Block not available for slot

The RPC node does not have the block data for the requested slot. The slot either was not produced, was skipped, or has been pruned from this node’s storage.

Common causes

  1. Slot was skipped. The leader for this slot did not produce a block. Skipped slots have no block data.
  2. Block pruned. Non-archive RPC nodes keep only the last ~2 days of block data (roughly 400,000 slots). Older blocks are purged.
  3. Node still syncing. The node has not yet processed this slot.
  4. Slot is in the future. The requested slot has not been reached yet.

How to fix

  1. Check if the slot was skipped. Use getBlocks to list confirmed slots in a range. Skipped slots will not appear in the result.
  2. Use an archive node. For historical block data beyond the ~2 day retention window, use an archive-capable RPC provider.
  3. Verify slot range. Use getSlot to confirm the current slot, and do not request slots beyond it.
Error codeMeaning
-32004Block not available — slot may be skipped or pruned
-32007Slot was skipped — confirmed no block exists
-32009Slot not in long-term storage — node pruned it

FAQ

How many slots does a standard RPC node keep? Standard (non-archive) nodes retain approximately the last 2 epochs (~400,000 slots, roughly 2 days) of block data.

How do I tell if a slot was skipped vs. pruned? Use getBlocks with a range around the target slot. If the slot does not appear in confirmed blocks, it was skipped. If it appears but getBlock returns -32004 or -32009, the data was pruned.

Can I get pruned block data? Only from an archive node that retains full history. Standard nodes purge old data automatically.

Error text variants

  • Block not available for slot
  • Block not available for slot X
  • -32004

Updated: