Yellowstone gRPC
If you're a customer of Solana dedicated node or cluster, you have an access to Yellowstone gRPC endpoint already. This endpoint is mostly used to subscribe for events which are going on Solana network, such as transactions, votes, new blocks, program executions, etc.
It is the best option to receive transaction data as fast as possible. Compared to traditional WebSocket subscriptions, gRPC has minimal latency and maximum throughput.
How to test Yellowstone gRPC endpoint
Install grpcurl software onto your machine.
Download Yellowstone gRPC proto files geyser.proto, solana-storage.proto (gRPC protocol needs to know methods and how to interact with them)
Place these files to the folder from where you want to invoke
grpcurl
command.Grab your endpoint (i.e.
sol-yellowstone-customer.rpcfast.net
) and your token, which you have received when you ordered the node.From terminal, launch the command to show the current slot number of the node.
X_TOKEN="YOUR-TOKEN" YELLOWSTONE_ENDPOINT="YOUR-YELLOWSTONE-GRPC-ENDPOINT" grpcurl \ -proto geyser.proto \ -H "x-token: ${X_TOKEN}" \ ${YELLOWSTONE_ENDPOINT} geyser.Geyser/GetSlot
To test subcription to events, let's take a look at an example of subscribing to transactions on Pump.fun with "processed" commitment level:
X_TOKEN="YOUR-TOKEN" YELLOWSTONE_ENDPOINT="YOUR-YELLOWSTONE-GRPC-ENDPOINT" grpcurl \ -proto geyser.proto \ -H "x-token: ${X_TOKEN}" \ -d '{ "transactions": { "pumpfun": { "account_include": ["6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"] } }, "commitment": 0 }' \ "${YELLOWSTONE_ENDPOINT}" geyser.Geyser/Subscribe
For further usage with your applications, please refer to examples, written in Go, Rust and Node: https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/golang https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/rust https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/typescript
Also please refer to official documentation for advanced usage: https://docs.triton.one/project-yellowstone/dragons-mouth-grpc-subscriptions
Last updated