Jito Shredstream gRPC

Benefits

All RPC Fast dedicated Solana nodes by design receive extra shreds from Jito Shredstream to boost node performance.

However if you're a trader or need to receive transaction data earlier than your competitors, simple subscription to Yellowstone gRPC endpoint to retrieve transactions data in real time might not be sufficient for you – Solana RPC node still needs to insert shreds, process and validate them, before sending them via Yellowstone gRPC subscription. To overcome this behavior, you can subscribe directly to Jito's Shredstream using its gRPC interface.

So, using direct gRPC subscription to Jito Shredstream endpoint, you will

  • receive transactions ~2 minutes earlier on average, compared to Yellowstone gRPC

  • receive even more transactions, including failed and votes

  • avoid time-consuming replay of transactions by RPC node

What's inside Solana shred?

Shred is an essential component of Solana architecture. A shred is a fragment of a Solana block. Instead of transmitting entire blocks, Solana breaks them down into smaller pieces called shreds, which are easier to send and recover over the network.

Each shred contains unordered transactions data, slot number, it's index inside the slot.

For more info about the format of Solana entry, please refer to documentation https://docs.rs/solana-entry/latest/solana_entry/entry/struct.Entry.html

How to create a direct subscription to Jito Shredstream?

  1. If you already have a Solana dedicated node, you can use following endpoint for gRPC subscription: sol-shredstream-CUSTOMER.rpcfast.net:443

  2. To decode gRPC stream, you need protobuf files. You can get them here: https://github.com/jito-labs/mev-protos

  3. Install grpcurl software onto your machine.

  4. Launch grpcurl command from the directory where protobuf files has been downloaded:

    grpcurl \
      -proto shredstream.proto \
      -H 'x-token: YOUR_AUTH_TOKEN' \
      sol-shredstream-CUSTOMER.rpcfast.net:443 \
      shredstream.ShredstreamProxy/SubscribeEntries
  5. You will start to receive encoded Solana entries.

How to decode Solana shreds into human-readable format?

  1. Run the following command inside repository to download code example

    git submodule init && git submodule update --recursive --remote --force
  2. Navigate to jito-shredstream-proxy/examples directory.

  3. Install Rust language tools onto your machine.

  4. Set environment variables

    export SHREDSTREAM_GRPC_URL=https://sol-shredstream-CUSTOMER.rpcfast.net
    export SHREDSTREAM_AUTH_TOKEN=YOUR-AUTH-TOKEN
  5. Launch code example

    cargo run --example deshred
  6. You will receive decoded transactions for each slot.

  7. If you want to integrate this to your application code or workflow, please use deshred.rs as an example.

Pricing

Jito Shredstream gRPC endpoint is bundled as a free add-on to our RPC Fast Solana dedicated node offering.

Last updated