Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/hypertekorg/hyperstack/llms.txt

Use this file to discover all available pages before exploring further.

The HyperStack server is a high-performance WebSocket server designed to stream blockchain data transformations to connected clients in real-time. It processes Solana blockchain events, transforms them through a custom VM, and delivers entity updates over WebSocket connections.

Architecture

The server consists of several key components:

Interpreter/VM

Executes bytecode to transform blockchain data into entities

Projector

Publishes entity mutations to WebSocket clients

WebSocket Server

Manages client connections and subscriptions

Runtime

Orchestrates all components and manages lifecycle

Key Features

Real-time Streaming

The server supports three streaming modes:
  • State - Watch a single entity by key (latest value only)
  • List - Subscribe to collections of entities
  • Append - Stream append-only data

High Performance

  • Bytecode Execution - Pre-compiled transformations run in a custom VM
  • LRU Caching - State tables, lookups, and resolvers all use LRU eviction
  • Concurrent Processing - Built on Tokio async runtime
  • Compression - Optional gzip compression for large payloads

Reliability

  • Health Monitoring - Track stream status and connectivity
  • Automatic Reconnection - Exponential backoff for gRPC streams
  • Graceful Shutdown - Handles SIGINT/SIGTERM signals

Observability

  • Structured Logging - JSON logs with tracing spans
  • OpenTelemetry - Optional OTLP metrics and traces (enable otel feature)
  • Health Endpoints - HTTP health checks for liveness/readiness

Data Flow

  1. Yellowstone gRPC - Streams blockchain data (accounts, transactions, instructions)
  2. Vixen Parser - Deserializes protobuf messages into events
  3. VM/Interpreter - Transforms events into entity mutations via bytecode
  4. Projector - Routes mutations to appropriate buses and caches
  5. Entity Cache - Stores current state for snapshot delivery
  6. WebSocket Clients - Receive real-time updates

Getting Started

Create a basic server:
use hyperstack_server::{Server, Spec};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    Server::builder()
        .spec(my_spec())
        .websocket()
        .bind("[::]:8877".parse()?)
        .health_monitoring()
        .start()
        .await
}
See the Configuration guide for detailed setup options.

Next Steps

Architecture

Deep dive into the server architecture

Configuration

Configure server components

Deployment

Deploy to production

Monitoring

Set up observability

Build docs developers (and LLMs) love