Logo
New RPC users get 35% off their first monthView the offer
Chainstack
Chainstack6 min read

Chainstack gRPC: What It Is and How to Use It

Chainstack gRPC is a high-performance interface for blockchain nodes, commonly used with Solana for streaming account and program data. This guide explains what it is, when to use it, and how to connect.

TL;DR

Chainstack gRPC is a remote procedure call interface that lets applications communicate with blockchain nodes using Protocol Buffers over HTTP/2. It is most relevant for Solana, where gRPC is used for real-time streaming of account, slot, and transaction data. This guide covers what Chainstack gRPC is, how it compares to JSON-RPC, and how to connect to a Chainstack gRPC endpoint.

What Is Chainstack gRPC?

Chainstack gRPC is a node access interface offered by Chainstack, a managed blockchain infrastructure provider. gRPC (Google Remote Procedure Call) is a framework that uses Protocol Buffers and HTTP/2 to enable efficient, low-latency communication between clients and servers. In the context of blockchain nodes, gRPC is an alternative or complement to the more common JSON-RPC interface.

For most EVM networks, JSON-RPC remains the standard. However, for Solana, gRPC has become an important interface for developers who need real-time data streams, such as account updates, slot notifications, and transaction events. Chainstack provides gRPC endpoints for Solana and may support gRPC on other networks depending on the node client and configuration.

Because Chainstack's offerings can change, always check the Chainstack documentation or console for the latest supported networks and gRPC availability.

  • gRPC uses HTTP/2 and Protocol Buffers for efficient binary communication.
  • Commonly used with Solana for streaming account and program data.
  • Chainstack offers gRPC endpoints as part of its managed node services.
  • Availability may vary by network and plan.

Chainstack gRPC vs JSON-RPC

JSON-RPC is the most widely used interface for blockchain nodes. It is text-based, human-readable, and supported by nearly every tool and library. gRPC, by contrast, is binary, uses HTTP/2, and is designed for high-performance, low-latency communication. This makes gRPC particularly useful for applications that need to process large volumes of real-time data.

On Solana, JSON-RPC is used for request-response interactions like fetching account info or sending transactions. gRPC is used for streaming data, such as subscribing to account changes or receiving slot updates. Some developers use both interfaces together: JSON-RPC for queries and gRPC for streams.

Chainstack provides both JSON-RPC and gRPC endpoints for supported networks, allowing developers to choose the right interface for each use case.

  • JSON-RPC: text-based, request-response, broad tooling support.
  • gRPC: binary, HTTP/2, streaming-friendly, lower overhead.
  • Solana developers often use gRPC for real-time data and JSON-RPC for queries.
  • Chainstack offers both interface types on supported networks.

How to Connect to a Chainstack gRPC Endpoint

To connect to a Chainstack gRPC endpoint, you first need a Chainstack account and a deployed node that supports gRPC. After deploying a node, the Chainstack console provides the endpoint URL and any required authentication details. The exact format may vary, but a typical gRPC endpoint looks like this:

You will also need a gRPC client library for your programming language. For Solana, the @solana/web3.js library does not use gRPC directly; instead, you may use the Solana gRPC client libraries or the Geyser plugin interface. Chainstack may provide specific instructions for connecting to its gRPC endpoints, so refer to the Chainstack documentation for the most accurate setup steps.

Authentication is often handled via an API key or token. Keep your credentials secure and avoid exposing them in client-side code.

  • Deploy a node on Chainstack that supports gRPC.
  • Retrieve the gRPC endpoint URL and credentials from the Chainstack console.
  • Use a compatible gRPC client library for your language.
  • Follow Chainstack documentation for network-specific connection details.
grpc.chainstack.com:443

Common Use Cases for Chainstack gRPC

gRPC is particularly valuable for applications that require real-time data from the blockchain. On Solana, this includes trading bots, analytics platforms, and monitoring tools that need to react quickly to on-chain events.

Because gRPC supports streaming, it can reduce the need for polling and lower latency compared to repeated JSON-RPC calls. This can be important for high-frequency applications or those processing large amounts of data.

Chainstack's gRPC endpoints are designed to integrate with these workflows, though performance will depend on your specific plan, network conditions, and implementation.

  • Real-time account and program monitoring on Solana.
  • Streaming slot and transaction data for analytics.
  • Low-latency event handling for trading or automation.
  • Reducing polling overhead in data-intensive applications.

Things to Consider Before Using Chainstack gRPC

Before adopting gRPC, consider whether your application truly needs streaming or low-latency binary communication. If you only need occasional queries, JSON-RPC may be simpler and better supported by existing tools.

gRPC requires more setup than JSON-RPC. You need a compatible client, and you may need to handle Protocol Buffers definitions. For Solana, the ecosystem around gRPC is growing but may not be as mature as JSON-RPC tooling.

Chainstack's gRPC availability, pricing, and limits are subject to change. Always verify current details directly with Chainstack. If you are comparing providers, OnFinality also offers RPC services, but its gRPC support may differ; evaluate based on your specific network and interface requirements.

  • gRPC is not necessary for simple request-response use cases.
  • Setup complexity is higher than JSON-RPC.
  • Tooling and community support vary by network.
  • Check Chainstack for current gRPC support and limits.

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started