gRPC Streaming

Information regarding gRPC streaming.

What is GRPC?

Yellowstone Dragon's Mouth GRPC streaming is a specialized service we offer, designed to provide ultra-fast data transmission for Solana RPC clients. This service utilizes the gRPC protocol, which is known for its high performance and efficiency in network communication.

Key Benefits:

Speed: GRPC is built on HTTP/2, allowing for a more efficient use of network resources, faster data exchanges, and lower latency compared to traditional HTTP/JSON APIs. This is crucial for applications requiring the fastest reaction times, such as trading platforms and gaming interfaces.

Streaming Capabilities: Unlike REST, which requires a new connection for each request, GRPC maintains a continuous stream of data. This means that updates can be sent as soon as they are available, without waiting for the client to send a new request. This is especially advantageous for "sniping" transactions on the blockchain, where getting information first can make all the difference.

Misconceptions: This is NOT the same thing as gRPC over WebSockets. This is something relatively new that a lot of popular bots are adding. We do not offer this as it is exclusive to Helius and Triton nodes.

Why should I use GRPC?

gRPC offers huge advantages over traditional web protocols used for subscribing to Solana updates such as WebSockets. It you want to receive updates on the Solana blockchain in the absolute fastest manner, then gRPC is for you.

I have personally used it to develop a Solana new token sniper proof-of-concept program in order to get first buys on many newly launched tokens. Many high frequency Solana trading bots need access to a lot of information in order to make educated assessments on whether it should perform a specific trade. This could be a simple as a sniper bot checking to see if certain price threshold has been met in order to initiate a sell transaction and profit off a token. gRPC will get you that information faster and more reliably allowing your bot to take action earlier off this stream data.

Example Scenario

Why Do My Transactions Sometimes Take So Long To Land?

When many traders target the same token (such as when liquidity first gets added), transaction times can slow down significantly. This happens primarily because of write-locks on accounts:

Account Locks: During a transaction, the accounts associated with the token (e.g., token’s account, sender’s, receiver’s) are locked for writing. This prevents other transactions from accessing these accounts simultaneously, ensuring data integrity.

Sequential Processing: Because accounts can only be written to by one transaction at a time, any other transactions targeting the same accounts must wait. This queuing results in slower processing times during periods of high trading volume.

Network Strain: In addition to locking delays, high volumes of transactions can also strain the network, further impacting the speed at which transactions are processed.

How Does GRPC Streaming Help? GRPC streaming helps by enabling faster transaction submission. This means you can get your transaction into the queue sooner, potentially ahead of others, especially when sniping new tokens. The quick submission can be crucial for executing transactions before account locks become a bottleneck.

We have a PoC program to demonstrate this in our GitHub organization here

Last updated