-
Notifications
You must be signed in to change notification settings - Fork 949
Description
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
- Call
getSlot({ commitment: "finalized" })→ returns slot N - Immediately call
getBlock(N, { commitment: "finalized" })→ Error: "Block not available for slot N" - 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.