Resumen
gRPC negotiates per-message compression between the client and the server. The client advertises the algorithms it accepts, and the server compresses responses with one of them.
Quicknode supports gzip and zstd on Solana gRPC.
On port 443, Solana gRPC meters the compressed size of response data when the client negotiates compression. Enabling compression therefore reduces metered usage.
Supported Algorithms
| Language | Client library | gzip | zstd |
|---|---|---|---|
| Óxido | yellowstone-grpc-client | Supported | Supported |
| Ir | google.golang.org/grpc | Built in | Requires github.com/mostynb/go-grpc-compression/zstd |
| TypeScript | @triton-one/yellowstone-grpc | Supported | Supported |
| Python | grpcio | Supported | Not supported by grpcio |
zstd typically achieves a higher compression ratio than gzip on Solana block data.
Enabling Compression
- Óxido
- Ir
- TypeScript
Python
use yellowstone_grpc_client::{ClientTlsConfig, GeyserGrpcClient};
// For HTTP Provider URL: https://example-guide-demo.solana-mainnet.quiknode.pro/123456789/
let endpoint = "https://example-guide-demo.solana-mainnet.quiknode.pro:443";
let token = "123456789";
let client = GeyserGrpcClient::build_from_shared(endpoint.to_string())?
.x_token(Some(token.to_string()))?
.tls_config(ClientTlsConfig::new().with_native_roots())?
.accept_compressed(tonic::codec::CompressionEncoding::Gzip)
// .accept_compressed(tonic::codec::CompressionEncoding::Zstd)
.connect()
.await?;
The tonic gzip y zstd features are enabled transitively by the default tonic-compression feature of yellowstone-grpc-proto, so no extra feature flags are required in your Cargo.toml.
import (
_ "google.golang.org/grpc/encoding/gzip"
// For zstd, import the third-party compressor instead:
// _ "github.com/mostynb/go-grpc-compression/zstd"
)
Importing a compressor registers it, so the client advertises it in grpc-accept-encoding and the server compresses responses. gzip ships with google.golang.org/grpc. zstd requires the third-party github.com/mostynb/go-grpc-compression/zstd compressor.
import Client from '@triton-one/yellowstone-grpc';
// For HTTP Provider URL: https://example-guide-demo.solana-mainnet.quiknode.pro/123456789/
const ENDPOINT = 'https://example-guide-demo.solana-mainnet.quiknode.pro:443';
const TOKEN = '123456789';
const client = new Client(ENDPOINT, TOKEN, {
grpcDefaultCompressionAlgorithm: 0, // 0 = gzip, 1 = zstd
});
await client.connect();
These examples target the @triton-one/yellowstone-grpc TypeScript client (v7.0.1 or later).
channel = grpc.secure_channel(
endpoint,
credentials=combined_creds,
compression=grpc.Compression.Gzip,
)
grpcio supports Gzip y Deflate only. zstd is not available in the Python client.
Metered Data Pricing
Solana gRPC is metered on the volume of data delivered. From October 1, 2026, metered usage is 15 credits per 0.1 MB.
Port 443 meters compressed response data when the client negotiates compression. Port 10000 is legacy and meters uncompressed response data.