System Overview
Core Components
Geyser Plugin Interface
The Geyser plugin interface is Solana’s official mechanism for validators to stream data to external systems. Yellowstone gRPC implements this interface to receive real-time updates directly from the validator. The Geyser interface provides callbacks for:update_account- Called when an account is modifiednotify_transaction- Called when a transaction is processednotify_entry- Called when an entry is added to a blocknotify_block_metadata- Called when block metadata is availablenotify_slot_status- Called when slot status changes
Plugin Configuration
The plugin is loaded by the Solana validator at startup using a configuration file:config.json):
address- gRPC server bind addresstls_config- Optional TLS certificate and key pathscompression- Enable gzip or zstd compressionchannel_capacity- Internal buffer size for streamingmax_decoding_message_size- Maximum message size (important for large blocks)
Block Reconstruction
One of Yellowstone gRPC’s key features is block reconstruction. The Geyser interface provides individual updates (accounts, transactions, entries) but not complete blocks. Yellowstone reconstructs full blocks by:- Collecting Updates - Gathering all account updates, transactions, and entries for a slot
- Ordering - Ensuring updates are in the correct order based on write version
- Assembling - Combining updates into a complete block structure
- Validation - Verifying block completeness and consistency
Data Flow
1. Update Reception
When the Solana validator processes data, it calls Yellowstone’s Geyser plugin callbacks:2. Filtering
Before sending updates to clients, Yellowstone applies subscription filters. This happens server-side to minimize bandwidth and client processing. Filter types:Account Filters
Account Filters
Filter accounts by:
- Pubkey - Specific account addresses
- Owner - Program that owns the account
- Data size - Account data length
- Memcmp - Memory comparison at specific offsets
- Lamports - Account balance comparisons (eq, ne, lt, gt)
- Token account state - Valid SPL token accounts only
Transaction Filters
Transaction Filters
Filter transactions by:
- Vote - Include/exclude vote transactions
- Failed - Include/exclude failed transactions
- Signature - Specific transaction signature
- Account include - Transactions using any of these accounts
- Account exclude - Transactions NOT using these accounts
- Account required - Transactions using ALL of these accounts
Slot Filters
Slot Filters
Filter slot updates by:
- Commitment level - Only receive slots at specific commitment
- Interslot updates - Receive all slot status changes
Block Filters
Block Filters
Filter blocks by:
- Account include - Blocks with transactions touching these accounts
- Include transactions - Include full transaction data
- Include accounts - Include account update data
- Include entries - Include entry data
3. Streaming Protocol
Yellowstone uses bidirectional gRPC streaming over HTTP/2:- Client → Server: Subscription requests, filter updates, ping responses
- Server → Client: Account updates, transactions, slots, blocks, pings
- Low latency - Updates stream as they occur
- Backpressure - Client controls flow rate
- Multiplexing - Multiple streams over one connection
- Compression - gzip/zstd support for bandwidth efficiency
4. Commitment Levels
Yellowstone respects Solana’s commitment levels:| Level | Description | Speed | Finality |
|---|---|---|---|
| Processed | Received by validator | Fastest | Lowest |
| Confirmed | Supermajority vote | Medium | Medium |
| Finalized | 32+ confirmed blocks | Slowest | Highest |
Performance Characteristics
Throughput
Yellowstone gRPC is designed for high-throughput environments:- Parallel processing - Configurable worker threads for encoding
- Zero-copy - Efficient memory handling for large messages
- Compression - Reduces bandwidth by 60-80% with zstd
- Batching - Internal batching for network efficiency
Resource Usage
Yellowstone runs inside the validator process and shares resources:
- CPU: Additional encoding and filtering overhead (typically 5-10%)
- Memory: Buffering for clients (configure
channel_capacity) - Network: Outbound bandwidth for all connected clients
Metrics and Monitoring
Yellowstone exposes Prometheus metrics at the configured endpoint:invalid_full_blocks_total- Failed block reconstructionsgrpc_active_connections- Current client connectionsgrpc_messages_sent_total- Total messages streamedgrpc_bytes_sent_total- Total bytes transmitted
Protocol Buffers Schema
Yellowstone uses Protocol Buffers (protobuf) for efficient serialization. The main service definition:yellowstone-grpc-proto/proto/geyser.proto
Security Considerations
Authentication
Yellowstone supports token-based authentication via thex-token header:
TLS/SSL
For production deployments, enable TLS:Rate Limiting
Configure filter limits to prevent resource exhaustion:Comparison with Other Approaches
vs JSON RPC
| Feature | Yellowstone gRPC | JSON RPC |
|---|---|---|
| Protocol | HTTP/2 + Protobuf | HTTP/1.1 + JSON |
| Streaming | Native bidirectional | Polling required |
| Latency | Real-time (milliseconds) | Polling interval |
| Bandwidth | Compressed, efficient | Verbose JSON |
| Filtering | Server-side | Client-side |
vs WebSocket
| Feature | Yellowstone gRPC | WebSocket |
|---|---|---|
| Protocol | Typed (protobuf) | Untyped (JSON) |
| Code generation | Built-in | Manual |
| Compression | gzip, zstd | Manual |
| Flow control | Built-in backpressure | Manual |
| Error handling | Strongly typed | String messages |
Advanced Features
Accounts Data Slicing
Reduce bandwidth by requesting only part of account data:Historical Replay
Subscribe from a specific slot:Dynamic Resubscription
Update your subscription without reconnecting:Next Steps
Quickstart
Start streaming Solana data in minutes
Filters Guide
Master advanced filtering techniques
API Reference
Complete API documentation
GitHub
View source code and contribute