RPC error -32016: Minimum context slot has not been reached

Last updated:

At a glance

Error details
PropertyValue
Applies toSolana JSON-RPC
Code-32016 (MIN_CONTEXT_SLOT_NOT_REACHED)
TriggerA request with config.minContextSlot
RetryableYes, shortly
Also on sendTransactionSets the minimum slot for preflight

Cause

minContextSlot is how a client says it needs state at least as new as something it already saw, such as the slot of a write. Behind a load-balanced provider, two calls can reach nodes at slightly different heights. Without the parameter, the second node would silently return older data. With it, you get -32016, which is the safer failure.

Solution

  1. Retry after a short delay; a few hundred milliseconds is usually enough for a node to catch up.
  2. Keep the parameter. Removing it swaps a clear error for a stale result.
  3. Cap the retries. If the node stays behind, surface the error instead of looping.

Example

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32016,
    "message": "Minimum context slot has not been reached"
  }
}

FAQ

Is this the same as node is behind?
No. -32005 means the node reports itself unhealthy. -32016 means it may be healthy but has not yet reached the slot you asked for.