Logo
RPC Assistant

Solana Devnet RPC Endpoint: Chain Settings, Faucet, and Setup

摘要

Solana Devnet is a test network for developers to deploy and test programs before mainnet. This page covers the public devnet RPC endpoint, chain settings, faucet for devnet SOL, common RPC methods, and how to choose a reliable provider for consistent testing.

Solana Devnet RPC Decision Checklist

Before using a devnet RPC endpoint, review these criteria to avoid common issues:

CriterionWhat to CheckWhy It Matters
Rate limitsShared public endpoints have per-IP limits; check documentation or consider private endpointsPrevent throttling during testing or program deployment
WebSocket supportConfirm the endpoint offers wss:// for subscription methods (e.g., onProgramAccountChange)Needed for real-time monitoring and event-driven dApps
Faucet availabilityEnsure the network has a working faucet for devnet SOLWithout test tokens you cannot pay for transaction fees or deploy programs
Archive data depthSome endpoints only keep recent state; archive endpoints provide historical dataRequired for debugging past transactions and building block explorers
Uptime and reliabilityPublic endpoints may go offline or degrade; check provider SLAsIntermittent failures waste developer time and break CI/CD pipelines

What Is Solana Devnet?

Solana Devnet (developer network) is a test cluster that simulates the mainnet environment. It uses the same validator software, program deployment process, and runtime as mainnet, but runs on test SOL that carries no real value. Developers use devnet to:

  • Deploy and iterate on Solana programs (smart contracts)
  • Test client integrations and transaction flow
  • Validate program performance under simulated network conditions
  • Run CI/CD pipelines without risking real funds

The official public devnet endpoint operated by Solana Labs is https://api.devnet.solana.com. However, this shared endpoint has significant rate limits and is not recommended for heavy testing or production applications. Many developers switch to a private RPC provider for more consistent throughput.

Solana Devnet Endpoint and Chain Settings

SettingValue
Network nameSolana Devnet
RPC URLhttps://api.devnet.solana.com (public)
WebSocket URLwss://api.devnet.solana.com (public)
Chain ID901 (note: some explorers use 2305 for customs; confirm with your tool)
Native currencyDevnet SOL (test token, no real value)
Block time~400ms
Faucethttps://faucet.solana.com/ (use wallet address)

To verify you're connected, run a curl request:

curl -X POST https://api.devnet.solana.com -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getVersion"
}'

Expected response:

{
  "jsonrpc": "2.0",
  "result": {
    "feature-set": 432857830,
    "solana-core": "2.2.7"
  },
  "id": 1
}

Getting Devnet SOL from the Faucet

To cover transaction fees and rent on devnet, you need devnet SOL. Use the official Solana faucet:

  1. Visit https://faucet.solana.com/
  2. Enter your devnet wallet address (e.g., from Solana CLI or Phantom)
  3. Click "Request SOL"

The faucet typically dispenses 1–2 devnet SOL per request, enough for moderate testing. If you need more, run the request multiple times or use a private faucet.

Alternatively, use the CLI:

solana airdrop 1 <YOUR_ADDRESS> --url https://api.devnet.solana.com

Common RPC Methods for Devnet

Solana's JSON-RPC API offers methods for reading state, sending transactions, and subscribing to events. Here are the most frequently used on devnet:

Get Account Balance

curl https://api.devnet.solana.com -X POST -H "Content-Type: application/json" -d '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBalance",
  "params": ["<WALLET_ADDRESS>"]
}'

Request Airdrop (devnet only)

curl https://api.devnet.solana.com -X POST -H "Content-Type: application/json" -d '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "requestAirdrop",
  "params": ["<WALLET_ADDRESS>", 1000000000]  // 1 SOL in lamports
}'

Send Transaction

// Using @solana/web3.js
import { Connection, clusterApiUrl } from "@solana/web3.js";

const connection = new Connection("https://api.devnet.solana.com");
// or use a private endpoint
// const connection = new Connection("https://devnet.solana.rpc.onfinality.io");

async function sendTx() {
  const tx = /* build transaction */;
  const signature = await connection.sendTransaction(tx);
  console.log("Transaction sent:", signature);
}

Debugging Tips for Devnet

  • Use getSignatureStatuses to check if a transaction confirmed.
  • Simulate first with simulateTransaction before sending to catch errors offline.
  • Monitor logs with onLogs subscription to track program output.
  • Check block explorers like Solscan (devnet) to visualise transactions.

Common devnet errors:

  • "Account not found" – The faucet hasn't funded it yet, or you're querying a non-existent account.
  • "Blockhash not found" – The recent blockhash expired; fetch a fresh one before sending.
  • "Transaction simulation failed" – Check program ID, account data, or rent exemption.

Public vs Private Devnet RPC Endpoints

Using the public endpoint (api.devnet.solana.com) is convenient but has limitations:

AspectPublic EndpointPrivate Endpoint
Rate limit~100 req/10sHigher or custom tiers
ReliabilityShared, can be unstableDedicated nodes, better uptime
WebSocketSupportedSupported, often more stable
Archive dataLimitedFull archive available
CostFreeUsage-based or subscription

For active development, CI/CD pipelines, or teams testing concurrently, consider a dedicated devnet RPC provider. OnFinality offers Solana devnet endpoints with higher rate limits and consistent uptime — see our Solana Devnet network page and RPC pricing for details.

Choosing a Devnet RPC Provider

When evaluating providers for Solana devnet, ask:

  • Does the endpoint support Websocket subscriptions?
  • What are the rate limits per API key?
  • Is there a free tier or trial?
  • Can you upgrade to a dedicated node if needed?
  • Does the provider offer archive data?
  • Is there 24/7 support or a status page?

Review our guide on how to choose an RPC provider for a broader checklist that applies to test networks.

Frequently Asked Questions

Q: What is the Solana devnet RPC URL? A: The public URL is https://api.devnet.solana.com. Private providers may offer custom endpoints like https://devnet.solana.rpc.onfinality.io.

Q: How do I add Solana devnet to my wallet? A: In Phantom or Solflare, switch to Developer Mode and select "Devnet" from the network dropdown. For manual addition, use the RPC URL and chain ID 901.

Q: Can I use the same program ID on devnet and mainnet? A: Yes, program IDs are deterministic. Deploy the same program code and the ID will match across clusters.

Q: Why do my transactions fail on devnet? A: Common reasons: insufficient devnet SOL, outdated blockhash, or incorrect account state. Use simulateTransaction to debug.

Q: Is devnet SOL real money? A: No. Devnet SOL is a test token and has no monetary value.

Key Takeaways

  • Solana Devnet is essential for testing programs and client integrations before mainnet deployment.
  • The public endpoint works for light use, but heavy testing benefits from a private RPC provider with higher limits and better reliability.
  • Always fund your devnet wallet via the faucet and use the correct chain ID (901).
  • Debug with simulation, signature statuses, and block explorers.
  • For production-grade devnet access, evaluate providers like OnFinality that offer dedicated nodes and archive data.

Ready to start building? Check our supported networks for Solana devnet endpoints and find a plan that fits your workflow on our pricing page.

RPC 知识库

相关 RPC 内容

Network Rpc

How to Connect to Pichiu Network RPC for Oracle Data

Pichiu Network provides decentralized oracle services on Kusama. This article explains how developers can integrate with Pichiu using RPC endpoints, c...

Network Rpc

什么是Pichiu网络以及如何通过RPC连接?

# 什么是Pichiu网络以及如何通过RPC连接? Pichiu网络是一个专注于去中心化预言机服务的区块链项目,使智能合约能够安全地与链下数据交互。它基于Substrate构建,为数据馈送和跨链通信提供了强大的基础设施。对于在Pichiu上构建的开发者来说,可靠的RPC端点对于查询链上数据和提交交易...

Network Rpc

关于 Gnosis RPC 端点,我需要了解什么?

# 关于 Gnosis RPC 端点,我需要了解什么? Gnosis RPC 端点之所以重要,是因为 Web3 应用依赖稳定的端点访问来进行读取、交易、仪表盘和后端工作流。正确的设置应匹配你的工作负载,支持你所需的网络和测试网,使限制可见,并在共享 RPC 不再足够时提供扩展路径。 对于 Gnosi...

Testnet Rpc

How do I set up a BNB testnet endpoint and debug my dApp?

BNB Testnet (chain ID 97) is an EVM-compatible test network for BNB Smart Chain. Developers use it to deploy and test smart contracts, dApps, and inte...

Troubleshooting

'authentication failed: encrypted http response nonce mismatch' 是什么意思?如何修复?

'authentication failed: encrypted http response nonce mismatch' 错误是 TLS 重放保护失败。当加密 HTTP 响应中的 nonce 值与客户端期望的值不匹配时会发生此错误。最常见的原因是并发 HTTP/2 请求共享 TLS 会话 no...

Network Rpc

How do I find and use a Polygon RPC endpoint for development?

Polygon RPC endpoints allow developers to interact with the Polygon blockchain without running their own nodes. This article covers mainnet and testne...

永远不用担心基础设施

OnFinality 消除了 DevOps 的繁重工作,让您能够更聪明、更快地构建。

开始