Stream slot progression events as the validator processes, confirms, and finalizes slots. Each slot emits multiple updates as it moves through the commitment pipeline: Processed, Confirmed, Finalized, and optionally Rooted. Dead slots (skipped by the leader) also emit an update with an error message.
Slot subscriptions provide the foundation for timing-sensitive applications. Use them to measure validator latency, track confirmation times, detect leader schedule gaps, and coordinate operations that depend on specific commitment levels.
Filter Parameters
Parameter
Type
Required
Description
filter_by_commitment
bool
No
If true, only emit updates at the subscription's commitment level. If false, emit all status transitions (Processed, Confirmed, Finalized).
interleave
bool
No
If true, interleave slot updates with other subscription types in order.
Update Payload
Field
Type
Description
slot
uint64
The slot number
parent
uint64
The parent slot number
status
CommitmentLevel
The new status: Processed (0), Confirmed (1), Finalized (2), or Rooted (3)
dead_error
string (nullable)
If the slot was dead (skipped), contains the error reason
Code Examples
Track All Slot Status Transitions (Node.js)
1stream.write({2accounts:{},3slots:{4allSlots:{5filter_by_commitment:false// Get all status transitions6}7},8transactions:{},9transactionsStatus:{},10blocks:{},11blocksMeta:{},12commitment:0,// Processed -- see all updates13entry:{},14accountsDataSlice:[],15ping:null16});1718stream.on('data',(update)=>{19if(update.slot){20const slot = update.slot;21const statusNames =['Processed','Confirmed','Finalized','Rooted'];22console.log('Slot '+ slot.slot+' -- '+ statusNames[slot.status]+' (parent: '+ slot.parent+')');23if(slot.dead_error){24console.log(' Dead slot:', slot.dead_error);25}26}27});