quorum-sdk
Official Rust SDK for Quorum — high-performance routing intelligence and direct TPU transaction execution for Solana.
Overview
quorum-sdk replaces blind single-RPC transaction submission with real-time Solana cluster topology awareness, direct QUIC TPU multi-leader fanout, and dynamic priority fee optimization.
Standard Flow: [Client] ──────► [Single RPC Node] ──(Blind Submission)──► [Leader TPU]
With Quorum: [Client] ──────► [Quorum Intelligence Engine]
├─► [Path 1] Direct QUIC Leader TPU Fanout (119ms)
├─► [Path 2] Staked RPC Fallback Forwarding
└─► Dynamic Priority Fee Optimization
Features
- Zero-Knowledge Key Isolation: The SDK never requests, handles, or stores private keys. Transactions are signed locally with standard Solana SDK primitives; only the signed wire payload is submitted.
- Dual-Path Execution: Simultaneously broadcasts over direct QUIC TPU sockets to upcoming leader slots and parallel staked RPC fallbacks to prevent packet-drop landing failures under heavy congestion.
- Real-Time Cluster Intelligence: Powered by continuous gossip sweeps measuring live latency across 130+ Solana validator nodes to route around congested or dead nodes.
- Dynamic Priority Fee Injection: Fetch real-time fee recommendations based on live congestion metrics and automatically prepend
ComputeBudgetinstructions. - 4 Execution Objectives: Tailored routes for latency (
Fastest), landing rate (HighestLanding), cost (LowestFee), or MEV safety (MevProtected). - Memory-Safe & Secure:
#![deny(unsafe_code)]enforced crate-wide. Memory-safe TLS (rustls) with automatic sanitization of IP addresses and credentials across all diagnostic streams. - Universal Transaction Support: Seamlessly supports legacy
Transaction, versionedVersionedTransaction(v0), base64 strings, and raw wire byte slices.
Installation
Add quorum-sdk to your Cargo.toml:
[]
= "0.1.0"
Optional Features
websocket: Enables real-time streaming strategy feeds.
[]
= { = "0.1.0", = ["websocket"] }
Quick Start
Execute a Signed Transaction (3 Lines)
use ;
use ;
async
Execution Objectives
| Objective | Routing Behavior | Ideal Use Case |
|---|---|---|
Objective::Fastest |
Lowest-latency direct TPU QUIC route (~119ms - 121ms) |
High-frequency trading, arbitrage |
Objective::HighestLanding |
Multi-leader fanout with concurrent staked RPC fallback | Liquidations, NFT mints, limit orders |
Objective::LowestFee |
Cost-optimized route balancing fee and landing probability | Batch transfers, scheduled jobs |
Objective::MevProtected |
Routes via non-sandwiching leaders (Jito bundles on mainnet) | Large DEX swaps, AMM trades |
Client Configuration
use Duration;
use QuorumClient;
// 1. Zero-configuration (Managed Gateway)
let client = default;
// 2. From environment variables (QUORUM_API_URL, QUORUM_API_KEY)
let client = from_env?;
// 3. Custom node configuration
let client = builder
.endpoint
.timeout
.max_retries
.api_key // Optional API key header
.build?;
Environment Variables
| Variable | Description | Default |
|---|---|---|
QUORUM_API_URL |
Base endpoint URL for your Quorum node | Managed gateway |
QUORUM_API_KEY |
Optional API authentication key | None |
API Reference
// Submit a signed Transaction, VersionedTransaction, raw bytes, or base64 string
let result = client.execute.await?;
// Submit pre-encoded base64 wire transaction
let result = client.execute_encoded.await?;
// Get current recommended fee for an objective (in micro-lamports)
let fee = client.get_recommended_fee.await?;
// Get optimal routing strategy and scored leader TPUs
let strategy = client.get_strategy.await?;
// Query all tracked validators and composite health scores
let validators = client.get_validators.await?;
// Query real-time cluster congestion signals
let congestion = client.get_congestion.await?;
// Liveness check
let health = client.health.await?;
Security Model
- Local Signing Only: All transactions must be fully signed before passing to the SDK. Private keys are never accepted, transmitted, or parsed.
- Telemetry & Log Sanitization: All error messages, debug formatters, and telemetry automatically mask IP addresses (
[REDACTED_IP]), database connection strings ([REDACTED_CONNECTION_STRING]), and authentication tokens. - Zero Unsafe Code: Enforced via
#![deny(unsafe_code)]. - Memory-Safe TLS: Built exclusively on
rustls.
Examples
Run any of the included runnable examples:
# Live Solana transfer with dynamic priority fee and latency breakdown
# Anchor client integration pattern
# Cluster health and validator scores inspector
# Real-time strategy listener
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE)
at your option.