All articles
solanatestnetdevnetsurfpooltestinglocal-devbuilders

Solana testnet vs devnet vs Surfpool: what you can and can’t do

Builder map of Solana’s test environments: public testnet, public devnet, and local Surfpool (mainnet-fork). What each is for, what works, what breaks, and when to use which.

devrels.xyz/a/204short link

Solana test environments: builders keep mixing up testnet, devnet, and local tools like Surfpool. Same runtime family, totally different jobs. This piece is the what you can and can’t do map — not another “three clusters” intro alone (see the companion clusters + faucet guide).

Three different machines

At a glance
TestnetDevnetSurfpool (local)
What it isPublic cluster for core/validator soakPublic cluster for app developersLocal drop-in for solana-test-validator with mainnet fork + cheatcodes
Who it is forAnza/core, validators, release stressAlmost every dApp teamIntegration tests, mainnet-shaped local sims
RPC (typical)https://api.testnet.solana.comhttps://api.devnet.solana.comhttp://localhost:8899
TokensNot real; faucet existsNot real; faucet + Circle devnet USDCSynthetic; set any balance via cheatcodes
Mainnet stateNoNo (separate genesis / programs)Yes — clone accounts/programs JIT from mainnet
StabilityCan lag/break/reset more oftenMore stable for apps; still can resetYour laptop; you control resets

Official cluster roles (Anza): application developers should target Devnet; Testnet is where core contributors stress new releases and validator behavior. Surfpool lives in the Solana Foundation org (solana-foundation/surfpool) as the modern local path when plain solana-test-validator is not enough.

What you CAN do

Capabilities by environment
TaskTestnetDevnetSurfpool
Deploy a program with Anchor / native / PinocchioYesYes (default)Yes
Share a public RPC URL with a teammate or QAYesYesNo (unless you tunnel it)
Airdrop SOL from a public faucetYesYes (e.g. devnetfaucet.org)N/A — mint local SOL / any token
Get test USDC without deploying a mintLimited / DIYYes (Circle devnet faucet)Yes — set ATA balances via cheatcodes
Call real mainnet program IDs with mainnet account dataNoNoYes (fork/clone)
Time-travel, force balances, reset chain stateNoNoYes (surfnet cheatcodes)
Stress a new validator / Agave releaseYes (primary job)SecondaryNo (not a public stake network)
Run CI without external RPC dependencyFragilePossible but flaky/rate-limitedYes
Wallet UX testing (Phantom/Solflare cluster switch)YesYesYes (custom RPC → localhost)

What you CAN’T do (or shouldn’t)

Hard limits and anti-patterns
Don’t expect…TestnetDevnetSurfpool
Real economic security / real SOL valueCan’tCan’tCan’t
Balances or PDAs to transfer across clustersCan’tCan’tLocal only — never equals mainnet custody
“Test my consumer app” as the primary missionWrong tool (validators/core first)Right toolRight for deep integration, not shared beta users
Stable long-lived public state foreverResets / churnCan resetYou wipe it anytime
Mainnet Jupiter/Raydium liquidity without forksCan’tCan’t (different deployments)Can clone; still not live mainnet orderflow
Production secrets / mainnet keys in the environmentDon’tDon’tDon’t — local ≠ permission to use prod keys
Replace audits or mainnet canariesCan’tCan’tCan’t

Testnet — can / can’t in practice

Can: point a validator or release candidate at a live public network that often runs newer software than mainnet/devnet; exercise gossip, catchup, and performance under load; use a faucet for non-real SOL if you must send txs.

Can’t / shouldn’t: treat it as your product QA environment. APIs, NFT stacks, and “the program everyone deploys” are not guaranteed to match mainnet the way builders assume. If your bug is “does my Anchor program instruction work with wallet X,” you wanted devnet or Surfpool.

bash
solana config set --url https://api.testnet.solana.com
solana airdrop 2   # if faucet allows; not for app ship cycles

Devnet — can / can’t in practice

Can: deploy programs, mint tokens, wire wallets, share explorer links, run staging backends against a public cluster, grab free SOL and (via Circle) free devnet USDC. Same ed25519 addresses as mainnet — different account data.

Can’t: read mainnet oracle prices, mainnet pool vaults, or mainnet NFT collections as if they were local. Program IDs you care about on mainnet may differ or be absent. Public RPC rate limits and congestion are real. Ledger resets are rare-ish but not impossible — don’t store irreplaceable state only on devnet.

bash
solana config set --url https://api.devnet.solana.com
# SOL: public faucets (e.g. devnetfaucet.org)
# USDC: faucet.circle.com (devnet mint ≠ mainnet mint)

Surfpool — can / can’t in practice

Surfpool is a local mainnet-aware simulator: drop-in for many workflows that used solana-test-validator, with just-in-time mainnet account fetch, RPC cheatcodes, optional studio/TUI, and IaC hooks. Details and install: Surfpool deep-dive · v1.4 notes · surfpool.run.

Can: clone mainnet accounts and programs; set SOL/token balances; time-travel / reset; run integration tests against “real” program layouts without spending mainnet SOL; keep CI offline once warmed.

Can’t: create real mainnet effects; reproduce live MEV/Jito tips and congested blockspace perfectly; replace multi-user public staging; guarantee every mainnet dependency is cloneable without work (some sysvars/services still need stubs). Teammates don’t see your localhost unless you expose it.

bash
curl -sL https://run.surfpool.run/ | bash
surfpool start
# RPC http://localhost:8899
# Cheatcodes e.g. surfnet_setAccount / surfnet_setTokenBalance / surfnet_timeTravel

Decision guide

Choose the environment from the question
If you need…Use
A shared staging URL for wallets and PMsDevnet
Mainnet program layouts / vaults without mainnet keysSurfpool
Deterministic unit/integration tests in CISurfpool (or LiteSVM for pure unit — LiteSVM)
Validator client / release soakTestnet
Production users and real settlementMainnet only

Common footguns

  • “I’ll test on testnet” — on Solana that phrase usually means the wrong public cluster for apps.
  • Wrong explorer cluster — tx signature “not found” because Phantom was on mainnet and CLI on devnet.
  • Assuming devnet USDC mint = mainnet USDC — different mints; hardcode the right one per cluster.
  • Surfpool success ≠ mainnet readiness — still need mainnet canaries, monitoring, and real fee markets.
  • Shipping with testnet RPC in prod config — silent rejects; always pin cluster in env, not vibes.

Resources

Bottom line

Testnet = public soak for the network itself. Devnet = public playground for your app. Surfpool = private mainnet-shaped lab with cheatcodes. Can deploy and send fake value on all three; can’t get real settlement or true mainnet risk anywhere but mainnet. Match the environment to the question you’re asking — most “testnet” tickets from app teams should have been devnet or Surfpool.

Keep reading

Get new articles in your inbox

Technical deep-dives on Solana tooling, infrastructure, and ecosystem. No noise.

Solana testnet vs devnet vs Surfpool: what you can and can’t do | devrels.xyz