Using a Shared gRPC Endpoint for Backing Up a Dedicated Solana Node.
General gRPC Capability and Functional Background
- gRPC is more efficient than REST/JSON when handling high-concurrency queries (e.g., account status/history queries, transaction broadcasting).
- The standardized interface design of Protocol Buffers simplifies the maintenance of complex APIs in distributed systems.
- Efficient data serialization through Protocol Buffers reduces network communication overhead.
- Built on HTTP/2, gRPC supports multiplexing and compression, making it more efficient compared to REST.
Support areas
- supported networks:solana-mainnet
- supported methods:
- geyser.Geyser/Subscribe
- geyser.Geyser/Ping
- geyser.Geyser/GetLatestBlockhash
- geyser.Geyser/GetBlockHeight
- geyser.Geyser/GetSlot
- geyser.Geyser/IsBlockhashValid
- geyser.Geyser/GetVersion
Integration Method
- grpc endpoint:https://grpc.zan.top
- Metadata:
- x-token: dedicated node ak(Required)
- x-network: ecosystem network(Not required:default is solana-mainnet)
Integration Example Guide
- Subscribe
grpcurl -proto geyser.proto \ -d '{"slots": { "slots": { } }, "accounts": { "usdc": { "account": ["9wFFyRfZBsuAha4YcuxcXLKwMxJR43S7fPfQLusDBzvT"] } }, "transactions": {}, "blocks": {}, "blocks_meta": {}}' \ -H "x-token: xxxxxx" \ grpc.zan.top:443 \ geyser.Geyser/Subscribe
- Single request/response
grpcurl -proto geyser.proto \ -d '' \ -H "x-token: xxxxxx" \ grpc.zan.top:443 \ geyser.Geyser/GetLatestBlockhash
- Use Yellowstone-gRPC client to send request
download the client:git clone https://github.com/rpcpool/yellowstone-grpc.gitcd yellowstone-grpc/examples/rust cargo run --bin client -- -e "https://grpc.zan.top" \ --x-token "xxxxx" \ --commitment processed \ subscribe \ --slots
cargo run --bin client -- -e "https://grpc.zan.top" \ --x-token "xxxxxx" \ ping