gRPC Docs
gRPC 101 for streaming low-latency Solana updates.
Last updated
Was this helpful?
gRPC 101 for streaming low-latency Solana updates.
Last updated
Was this helpful?
A geyser plugin on Solana allows you to push real-time updates from a Solana RPC node to an external source. Yellowstone gRPC is one such high-performance Solana Geyser plugin that allows you to stream real-time blockchain data via gRPC interfaces. This powerful tool enables developers to:
Monitor on-chain activities: Track token mints, program interactions, and state changes.
Stream account states: Efficiently retrieve account information.
Stream transactions: Monitor transactions with minimal latency.
Indexers: Build indexing pipelines
In short, this can be used to build applications that can respond quickly to changes on the blockchain.
We have developed multiple sample code covering top use cases for gRPC. They run out of the box, are in multiple languages (Typescript, Rust and python) and help you get started quickly. You can explore them here
Shyft
Shyft
Shyft
You can also join for support and more resources.
There are two ways to authenticate your server or connection when connecting to Shyft’s gRPC network:
Using X-Token:
After purchasing the gRPC service on Shyft, you can find your x-token in the gRPC section of your Shyft dashboard. This token is used to establish a gRPC connection through the Yellowstone client. The advantage of this method is that it doesn’t require IP whitelisting.
By Whitelisting Your IP:
We recommend using token for authentication. Use IP whitelisting only when you cant use token authentication.
In certain scenarios, like when setting up bots, you may need to connect directly to the gRPC network via the gRPC URL without x-token. In such cases, you’ll need to whitelist your server’s IP address (the one used to receive streamed data). Once the IP is whitelisted, you can connect directly using the URL without needing an x-token. IP whitelisting can be easily managed through the gRPC section of the dashboard.
Real-time updates in Solana’s Yellowstone gRPC plugins rely on Subscription streams. These streams let you receive updates like account changes, transactions, new blocks, or slot updates directly to your backend. To keep things focused and avoid unnecessary data, a subscription request lets you specify different kind of filters. using these filters you can specify exactly what type of updates you need.
Subscribe requests on gRPC look somewhat like this.
Most of the request parameters here are self-explanatory, working exactly with what they are named,
accounts
: You can subscribe to specific accounts (e.g., SOL-USDC OpenBook) by specifying this parameter and receive updates based on commitment levels (processed, confirmed, finalized).
accountDataSlice
: This field helps you to filter your gRPC stream, so that you receive only the relevant portion of streamed data. For example you are streaming accounts, for which the data size is 200bytes, but you only need 40 bytes after a certain offset. This field can help you filter those 40 bytes for every update in the stream.
transactions
& transactionsStatus
: You can receive updates on all transactions or filter them based on specific criteria (vote/failed transactions, including/excluding accounts). Programs can also be monitored using this.
slots
, blocks
&
blocksMeta
: Stay informed about new blocks and slots being produced on the blockchain.
commitment
: This specifies the commit level for any update, either processed
, confirmed
or finalized
.
Another reason is that typescript sometimes is not able to keep up with gRPC speed. We suggest using Rust gRPC client for fastest processing. We have some sample codes in our and .
At anytime you can verify the current slot of all our regions .
You can also get this when you change your server and the connection was not gracefully shutdown. In those cases you can clear your previous connection through this link Add your token in the end, grpc region doesnt matter.
We have a public dashboard where you can see lag of all gRPC regions in our network. We compare it against Solana mainnet-beta. You can access it .