Skip to content

About

Yellowstone Geyser gRPC endpoint benchmarking tool (fork of hmstudio-labs/geyserbench)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

GeyserBench

A Yellowstone Geyser gRPC endpoint benchmarking tool.

Overview

GeyserBench is a performance testing tool that connects to multiple Solana gRPC endpoints simultaneously and measures their speed and reliability in detecting transactions.

Features

  • Connect to multiple gRPC endpoints simultaneously
  • Measure endpoint performance metrics:
    • First detection rate
    • Average delay
    • Median and 95th percentile latency
  • Simple summary output for quick comparison
  • Detailed metrics for in-depth analysis

Installation

Build from source

Prerequisites: Rust, plus cmake, a C++ compiler and OpenSSL headers (Linux: apt install cmake g++ libssl-dev pkg-config; Mac: brew install cmake). Unless PROTOC points to an existing protoc, the first build compiles protobuf from source and takes a few minutes.

git clone https://github.com/alchemyplatform/geyserbench.git
cd geyserbench
cargo build --release

The binary is written to target/release/geyserbench.

Configuration

GeyserBench reads config.toml from the directory it runs in and creates a default one if none exists. Edit this file to customize your benchmark:

[config]
transactions = 1000
account = "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
commitment = "processed"

[[endpoint]]
name = "Alchemy"
url = "https://solana-mainnet.g.alchemy.com"
x_token = "YOUR_ALCHEMY_API_KEY"
kind = "yellowstone"

[[endpoint]]
name = "Triton"
url = "https://YOUR_ENDPOINT.mainnet.rpcpool.com"
x_token = "YOUR_TOKEN_HERE"
kind = "yellowstone"

[[endpoint]]
name = "Helius"
url = "https://laserstream-mainnet-ewr.helius-rpc.com"
x_token = "YOUR_HELIUS_API_KEY"
kind = "yellowstone"

[[endpoint]]
name = "QuickNode"
url = "https://YOUR_ENDPOINT.solana-mainnet.quiknode.pro:10000"
x_token = "YOUR_TOKEN_HERE"
kind = "yellowstone"

Configuration Options

  • transactions: Number of transactions to measure
  • account: Account address to monitor for transactions
  • commitment: Transaction commitment level (processed, confirmed, finalized)
  • endpoint: Array of gRPC endpoint configurations:
    • name: Name for the endpoint
    • url: gRPC endpoint URL
    • x_token: Authentication token (if required)
    • kind: Geyser provider type (yellowstone for Yellowstone gRPC endpoints)

Usage

  1. Edit config.toml in the repository root with your endpoint details

  2. Run the benchmark from the repository root:

    ./target/release/geyserbench

Output

GeyserBench provides both simplified and detailed output:

Simple Summary

Finished tests results
endpoint 1: Win rate 85.23%, avg delay 0.00ms (fastest)
endpoint 2: Win rate 10.45%, avg delay 42.31ms
endpoint 3: Win rate 4.32%, avg delay 78.56ms

Detailed Metrics

Detailed tests results
----------------------------------

Fastest Endpoint: endpoint 1
  First detections: 82 out of 97 valid transactions (84.54%)
  
Delays relative to fastest endpoint:
endpoint 2:
  Average delay: 42.31 ms
  Median delay: 38.75 ms
  95th percentile: 62.18 ms
  Min/Max delay: 12.45/89.32 ms
  Valid transactions: 97

Alchemy gRPC latency example

examples/latency.rs opens a single Yellowstone gRPC stream and reports how many milliseconds above the fastest delivery your p50, p90 and p99 messages arrive. It is a steadiness measure, not total end-to-end latency.

It has the same prerequisites as Build from source.

export ALCHEMY_API_KEY=your-alchemy-api-key
cargo run --release --example latency

Optional settings: ACCOUNT (program or account to watch; default is the Pump.fun AMM program pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA), N (transactions to collect, default 20000), URL (default https://solana-mainnet.g.alchemy.com). Run it from a datacenter near where you serve users.

About

Yellowstone Geyser gRPC endpoint benchmarking tool (fork of hmstudio-labs/geyserbench)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages