🎞️ShredStream

ShredStream delivers the lowest latency shreds from leaders on Solana, optimizing performance for trading, validation, and RPC operations.

What Is ShredStream?

ShredStream ensures minimal latency for receiving shreds to any RPC or validator on the network, saving hundreds of milliseconds during trading on Solana. It also provides a redundant shred path for servers in remote locations.

Who Is ShredStream For?

  • Traders

  • Validators

  • RPC servers and Validators with no/low stake

  • Node operators in regions with sub-optimal internet connectivity to the rest of the cluster

What are Shreds?

Shreds are fractions of blocks produced by a block producer on Solana, similar to individual frames in a video stream. Shreds are continuously emitted as a validator produces blocks, creating a block stream. Other nodes receive and replay these shreds on-the-fly, meaning the state is always changing on Solana compared to Ethereum, where state pauses intra-slot.

Shreds are distributed in a tree-like manner to the network. The number of hops a shred takes to reach a server is influenced by a stake-weighted shuffle. High-stake servers are usually 0 or 1 hops away, while RPC servers are likely 1 or 2 hops away.

Low-stake RPC servers may experience multiple hops for shreds to reach their server, resulting in higher latency for receiving shreds, replaying them, and receiving notifications from Geyser and websockets. Having access to the newest state can provide significant advantages for high-frequency trading.

Performance Improvements

Speedup for Slot Completion (Avg):

  • Amsterdam: 46ms

  • Frankfurt: 45ms

  • New York: 28ms

  • Tokyo: 25ms

Bandwidth:

ShredStream requires 4MiB/s or 32Mbit/s per stream. Streaming from multiple regions is supported.

How Does It Work?

Jito operates multiple Block Engines worldwide that receive shreds directly or retransmitted from leaders running Jito-Solana. These block engines verify shreds before distributing them to servers globally, ensuring the highest quality and lowest latency shreds from Solana validators.

How Do I Sign Up?

Access to ShredStream is free during beta testing. Complete this sign-up form to get set up within 48 hours. You will receive an email once the setup is complete. The form allows you to opt in for ShredStream, RPC services, and bundle submission whitelisting. For questions, join our Discord.

Running ShredStream

Overview:

The proxy client connects to the Jito Block Engine and authenticates using the provided keypair. It sends a heartbeat to keep shreds flowing. Received shreds are distributed to all DEST_IP_PORTS. We recommend running a proxy instance for each region where you have validators or RPCs.

Preparation

  1. Get your Solana pubic key approved

  2. Ensure your firewall is open.

  3. Find your TVU port

    • Run get_tvu_port.sh to find your port

    • Example on machine with solana validator: export LEDGER_DIR=MY_LEDGER_DIR; bash -c "$(curl -fsSL https://raw.githubusercontent.com/jito-labs/shredstream-proxy/master/scripts/get_tvu_port.sh)"

    • Example on remote machine (port may differ): export HOST=http://1.2.3.4:8899; bash -c "$(curl -fsSL https://raw.githubusercontent.com/jito-labs/shredstream-proxy/master/scripts/get_tvu_port.sh)"

  4. Run via docker or natively and set the following parameters

    • BLOCK_ENGINE_URL: set to the closest region to your validator/RPC node

    • DESIRED_REGIONS: set to regions you want to receive shreds from. Same regions as for Block Engine

    • DEST_IP_PORTS: IP:Port combinations to receive shreds on

    • Note: these examples will receive shreds from amsterdam and ny, and directly connect to ny region

Running via Docker

View logs with docker logs -f jito-shredstream-proxy

Host Networking (Recommended)

This exposes all ports, bypassing Docker NAT.

docker run -d \
--name jito-shredstream-proxy \
--rm \
--env RUST_LOG=info \
--env BLOCK_ENGINE_URL=https://ny.mainnet.block-engine.jito.wtf \
--env AUTH_KEYPAIR=my_keypair.json \
--env DESIRED_REGIONS=amsterdam,ny \
--env DEST_IP_PORTS=127.0.0.1:8001,10.0.0.1:8001 \
--network host \
-v $(pwd)/my_keypair.json:/app/my_keypair.json \
jitolabs/jito-shredstream-proxy shredstream

Bridge Networking

Use bridge networking in environments where Docker host networking is unavailable. This setup requires manual exposure of each destination. For shred listeners running locally on the Docker host, use Docker's bridge IP (typically 172.17.0.1). For non-local endpoints, use their regular IP addresses. Note that Docker's bridge IP can vary, so confirm it by running:ip -brief address show dev docker0.

docker run -d \
--name jito-shredstream-proxy \
--rm \
--env RUST_LOG=info \
--env BLOCK_ENGINE_URL=https://ny.mainnet.block-engine.jito.wtf \
--env AUTH_KEYPAIR=my_keypair.json \
--env DESIRED_REGIONS=amsterdam,ny \
--env SRC_BIND_PORT=20000 \
--env DEST_IP_PORTS=172.17.0.1:8001,10.0.0.1:8001 \
--network bridge \
-p 20000:20000/udp \
-v $(pwd)/my_keypair.json:/app/my_keypair.json \
jitolabs/jito-shredstream-proxy shredstream

Running Natively

git clone https://github.com/jito-labs/shredstream-proxy.git --recurse-submodules

RUST_LOG=info cargo run --release --bin jito-shredstream-proxy -- shredstream \
    --block-engine-url https://ny.mainnet.block-engine.jito.wtf \
    --auth-keypair my_keypair.json \
    --desired-regions amsterdam,ny \
    --dest-ip-ports 127.0.0.1:8001,10.0.0.1:8001

Firewall Configuration

If you use a firewall, allow access to the following IPs:

Amsterdam

  • 74.118.140.240

  • 202.8.8.174

Frankfurt

  • 145.40.93.84

  • 145.40.93.41

New York

  • 141.98.216.96

  • 64.130.48.56

Tokyo

  • 202.8.9.160

  • 202.8.9.19

Checking Shredstream is running properly

Ensure Shredstream is running correctly by configuring the SOLANA_METRICS_CONFIG in your RPC setup. Refer to Solana Clusters Documentation for details.

To verify, query the number of packets received before and after configuring Shredstream using:

SELECT shred_count FROM "shred_fetch" WHERE time > now() - 1h

A significant increase in shred count indicates that the jito-shredstream-proxy is operational.

Last updated