Skip to main content
Slot and block monitoring gives you a window into Solana’s network consensus, block production timing, and overall health. With LaserStream you can track slot progression, block finalization, and network performance metrics in real-time using the helius-laserstream SDK.
Prerequisites: This guide assumes you’ve completed the LaserStream gRPC Quickstart and have an API key.

Monitoring Types

Track network consensus progressionMonitor slot advancement across commitment levels:
Slot data includes: slot number, parent slot, commitment status (processed / confirmed / finalized), and leader information.
Best for: Network health monitoring, slot timing analysis, consensus tracking.

Practical Examples

Example 1: Network Health Monitor

Track slot progression and identify network issues:

Example 2: Block Production Monitor

Track block production and transaction volume:

Example 3: Filtered Block Monitor

Monitor blocks containing specific program activity:

Data Structures

Each slot represents ~400ms of network time. The three commitment levels reflect progressively stronger guarantees: processed (initial), confirmed (supermajority voted), finalized (irreversible).
u64 fields (slot, parent) arrive as strings to preserve precision beyond Number.MAX_SAFE_INTEGER. Convert with Number(slot.slot) when you need arithmetic. status is a numeric enum — use CommitmentLevel[slot.status] for the human-readable name.
Numeric fields (slot, parentSlot, executedTransactionCount, entriesCount, the values inside blockHeight and blockTime) are emitted as strings because they are u64 in the underlying proto. Wrap them in Number(...) for arithmetic or comparisons.
Full blocks can be several MB with all transactions and accounts. The same u64-as-string convention applies — wrap numeric fields with Number(...) for arithmetic. Inside each transaction, meta.fee, meta.preBalances, meta.postBalances, etc. are also strings.

Performance Considerations

Slot Monitoring

Lightweight: very low bandwidth, minimal processing overhead. Good for monitoring dashboards.

Block Metadata

Balanced: moderate bandwidth, block-level insights without full data. Suitable for analytics.

Full Blocks

High volume: complete transaction data, requires robust processing. Always pair with filters.

Filtered Blocks

Optimized: use accountInclude, disable includeAccounts/includeEntries you don’t need.

Use Cases

Track network health and performance — slot timing, congestion, consensus.

Error Handling

Symptom: Gaps in slot progression.Causes: Network connectivity issues, validator downtime, client processing delays.Solutions: Track slot gaps and alert; implement catch-up logic via historical replay; monitor connection health.
Symptom: Too much block data.Solutions: Use block metadata instead of full blocks; apply account filters; disable unnecessary inclusions (entries, accounts); process asynchronously.
Symptom: Inconsistent slot timing.Analysis: Calculate moving averages; track deviations; monitor network health metrics; correlate with validator performance.

Best Practices

Production Guidelines:
  • Start with metadata — use block metadata before subscribing to full blocks
  • Apply filters — use accountInclude to drop irrelevant data
  • Monitor timing — track slot progression as a network-health canary
  • Handle gaps — combine with historical replay so missing slots are auto-backfilled on reconnect
  • Process async — don’t block stream processing with heavy computations
  • Match commitment to needprocessed for low-latency UIs, confirmed/finalized for state writes

Next Steps

Transaction Monitoring

Filter transactions by program, account, vote, or failure status.

Stream Pump AMM Data

Real-world example: monitor Pump AMM transactions.

Decoding Transaction Data

Parse the binary transactionUpdate payloads into readable Solana transactions.

Yellowstone protocol reference

The same workflow against the raw Yellowstone gRPC protocol.