Skip to content

getBlock returns "Block not available for slot" error for a slot returned by getSlot with finalized commitment #10134

@pengin7384

Description

@pengin7384

Problem

When I call getSlot({ commitment: "finalized" }) and immediately call getBlock with the returned slot number and commitment: "finalized", I intermittently get "Block not available for slot XXX" error. Retrying after a short delay succeeds.

Steps to Reproduce

  1. Call getSlot({ commitment: "finalized" }) → returns slot N
  2. Immediately call getBlock(N, { commitment: "finalized" }) → Error: "Block not available for slot N"
  3. Wait and retry getBlock(N, { commitment: "finalized" }) → succeeds

Expected Behavior

If a slot is returned as finalized by getSlot, calling getBlock with the same commitment level is expected to return a successful response immediately. This is how other blockchain RPC APIs work (Ethereum, Bitcoin, etc.).

Environment

  • Agave: v3.0.14
  • Setup: Operating 6+ Solana RPC nodes providing RPC services
  • Frequency: Intermittent, occurs irregularly across different nodes

Impact

This issue is causing problems in our production RPC service. The error occurs unpredictably across our node fleet, making it difficult to provide reliable service to our users. Users experience intermittent failures when querying finalized blocks, requiring retry logic and adding latency.

Request

  • Is there a configuration flag or parameter to prevent this behavior?
  • Are there any recommended workarounds or best practices for production deployments?
  • Are there plans to address this inconsistency in future releases?

Any guidance on how to mitigate this issue in a production environment would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions