A staging Solana that mirrors mainnet.
RustAG wraps LiteSVM with a lazy mainnet account mirror, so your tests run against real Pyth prices, real Raydium pools, and real token mints — with unlimited free airdrops and zero SOL spent.
- Cost to test
- $0
- Airdrops
- ∞
- JSON-RPC methods
- 21
- Oracle staleness
- <2s
RustAG is in early access. Phase 1 — the lazy mirror, dirty/clean tracking, unlimited airdrops, Solana-compatible RPC, persistence, CLI, SDK, and dashboard — is a working local MVP. Phases 2 & 3 ship in the same repo and are newer. You build from source; nothing is published to crates.io / npm yet.
Everything to ship against real mainnet state
Quickstart
From a built binary to a running mainnet-mirroring stagenet in about two minutes.
Core concepts
The lazy account mirror and the Clean → Dirty → Pinned state machine the whole product is built on.
CLI reference
Every rustag subcommand with exact flags — create, start, airdrop, override, schedule, attest.
SDK & API
@rustag/sdk, the REST contract, and the Solana JSON-RPC + WebSocket surface your tooling speaks.
Architecture
The four-layer request flow, the crate map, and the Phase 2 / Phase 3 feature set.
Trust & security
Threat model, verifiable attestation, service levels, and an honest list of early-access limits.
Clean until you touch it.
Every account carries a sync state. It is how RustAG replays mainnet on a local SVM with no block hash to fork from — and the single idea the whole product is built around.
Read core conceptsNever fetched. Pulled lazily from mainnet on first access.
A faithful mainnet copy. Background sync keeps oracles fresh.
Written by a local tx. Frozen from mainnet sync forever.
Set via override. Locked to exactly the value you chose.
Point your Connection at it and go
A stagenet exposes a Solana-compatible JSON-RPC on 127.0.0.1:8899, WebSocket on :8900, and a REST API on :9000. Swap one endpoint — Anchor, the Solana CLI, and @solana/web3.js just work.
# 1. Point the mirror at a mainnet RPC (a free Helius key is recommended)export RUSTAG_MAINNET_RPC="https://mainnet.helius-rpc.com/?api-key=YOUR_KEY" # 2. Create and start a persistent, mainnet-mirroring stagenetrustag create demorustag start demo --preload pyth raydium # 3. Point any Solana client at it — one line changesANCHOR_PROVIDER_URL=http://127.0.0.1:8899 anchor test