in-solana by Supanode

rootSubscribe — Solana WebSocket Method

rootSubscribe sends a notification every time the validator sets a new root slot. The root is the highest slot that has been finalized — it can never be rolled back.

Subscribe request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "rootSubscribe"
}

No parameters are required.

Notification format

{
  "jsonrpc": "2.0",
  "method": "rootNotification",
  "params": {
    "result": 123456789,
    "subscription": 42
  }
}

The result is the new root slot number.

Use cases

  • Track finality progress. The root advances as slots become finalized. Monitoring root progression shows how quickly the network is finalizing blocks.
  • Detect stalls. If the root stops advancing for an extended period, it may indicate network issues or a finality delay.
  • Trigger finalized-state reads. When the root advances past a slot containing your transaction, that transaction is finalized.

FAQ

How often do root notifications arrive? Approximately every 400ms (once per slot), as the root typically advances by one slot at a time. During normal operation, root progression lags behind the tip by ~32 slots.

What is the difference between root and finalized? They are effectively the same concept. The root slot is the latest finalized slot. The finalized commitment level in RPC queries refers to data at or below the current root.

Can the root go backwards? No. By definition, the root is the highest slot that the validator considers irreversible. It only advances forward.

Updated: