DEV Community

Zhuoxin Sun
Zhuoxin Sun

Posted on • Originally published at onfinality.io

SORA Network RPC Endpoints: Chain Settings, Faucet, and Debugging

SORA Network Decision Checklist

Before integrating with SORA network RPC endpoints, consider these five factors:

Criterion What to check Why it matters
Network version Are you targeting SORA v2 (Polkadot parachain) or SORA v3 (Nexus / Hyperledger Iroha 3)? APIs and endpoints differ between versions; v3 is the current focus.
Throughput requirements Estimate daily request volume: < 1M requests? Use public endpoints. Higher? Consider dedicated infrastructure. Public endpoints may throttle; dedicated nodes offer consistent performance.
Data access needs Do you need full history or archive data? Archive nodes require more resources and are best served by dedicated or archive-tier endpoints.
Websocket support Does your dApp require real-time subscriptions (e.g., for Polkaswap order books)? Ensure the provider supports WSS and has low-latency connections.
Testnet availability Do you plan to test on the Taira testnet before mainnet deployment? Testnet endpoints help avoid costly mainnet mistakes and enable safe experimentation.

Once you've evaluated these criteria, you can choose the right RPC setup for your SORA application.

Understanding SORA Network

SORA is a decentralized, non-debt-based monetary system designed to enable economic stability and interoperability. Built on Substrate, it initially operated as a Polkadot parachain (SORA v2) and has now evolved into SORA Nexus (v3), a Hyperledger Iroha 3-powered network. The native token is XOR, and the network features a built-in decentralized exchange called Polkaswap.

Developers interact with SORA through its RPC endpoints, which support standard Substrate JSON-RPC methods plus custom calls for the DEX and staking pallets. Understanding the chain configuration is the first step.

SORA Network Chain Settings

For version 3 (Nexus), the chain ID and endpoints have changed. Below are the essential parameters for mainnet and testnet:

Parameter SORA Mainnet SORA Taira Testnet
Chain ID 0x521 0x521
RPC endpoint https://rpc.sora.org or https://sora.rpc.onfinality.io https://taira.rpc.onfinality.io
WebSocket endpoint wss://ws.sora.org or wss://sora.rpc.onfinality.io wss://taira.rpc.onfinality.io
Explorer sorametrics.org taira.sorametrics.org
Native token XOR (SORA) tXOR (testnet)
Decimal places 18 18
Block time ~6 seconds ~6 seconds

Note: If you are using SORA v2 (Polkadot parachain), the chain ID and endpoints are different. Always check the latest documentation on sora.org or your RPC provider's network page.

For production applications, using a dedicated or private RPC endpoint is recommended to avoid rate limits and ensure uptime. OnFinality offers dedicated SORA nodes with customizable configurations.

Public vs. Dedicated RPC Endpoints

Public Endpoints

  • Free and open: Anyone can use public endpoints like https://rpc.sora.org.
  • Rate limited: Public nodes typically impose request limits (e.g., 100 req/s) and may throttle during high usage.
  • No SLA: There are no guarantees on uptime or performance.
  • Limited archive data: Archive requests may be restricted or unavailable.

Dedicated Endpoints

  • Private and performant: Dedicated nodes give you exclusive access to compute resources.
  • Higher limits: Custom rate limits, often unlimited within plan.
  • SLA-backed: Providers like OnFinality offer uptime guarantees (see pricing for details).
  • Archive and trace support: Full historical data and debug methods available for production debugging.
  • WebSocket stability: Reliable for real-time dApps.

For high-frequency trading bots, Polkaswap order monitoring, or large-scale analytics, a dedicated node is the appropriate choice.

Connecting to SORA: Code Examples

Using curl to query RPC

# Get the latest block number
curl -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"chain_getHeader","params":[],"id":1}' \
  https://sora.rpc.onfinality.io
Enter fullscreen mode Exit fullscreen mode

Using ether.js-like library (PolkadotJS for Substrate)

const { ApiPromise, WsProvider } = require('@polkadot/api');

async function connect() {
  const wsProvider = new WsProvider('wss://sora.rpc.onfinality.io');
  const api = await ApiPromise.create({ provider: wsProvider });

  // Get chain info
  const [chain, nodeName, nodeVersion] = await Promise.all([
    api.rpc.system.chain(),
    api.rpc.system.name(),
    api.rpc.system.version()
  ]);
  console.log(`Connected to ${chain} using ${nodeName} v${nodeVersion}`);

  // Get account balance (example)
  const alice = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
  const { data: balance } = await api.query.system.account(alice);
  console.log(`Balance: ${balance.free}`);
}

connect().catch(console.error);
Enter fullscreen mode Exit fullscreen mode

Faucet for SORA Testnet (Taira)

To get testnet tokens (tXOR) for development, use the official Taira faucet:

  • Faucet URL: https://taira-faucet.sora.org (or check the SORA Discord)
  • Requirements: You'll need a Substrate-compatible address (starting with 5).
  • Rate: Typically limited to one request per day.

If the faucet is unavailable, you can request tokens in the SORA community channels or use a partner faucet.

Common RPC Errors and Debugging

Error Cause Solution
-32000: Server error Node overload or invalid request Retry with backoff; check method and params.
-32602: Invalid params Wrong number or format of parameters Verify the method signature; ensure hex values are properly formatted.
-32601: Method not found Typo in method name or unsupported method Double-check the RPC method (case-sensitive).
Rate limit exceeded Too many requests to public endpoint Switch to a dedicated node or add delays between calls.
WebSocket disconnected Unstable connection or idle timeout Reconnect with a keepalive ping; use a provider with stable WSS.

Frequently Asked Questions

Is SORA an EVM-compatible chain?

No, SORA is based on Substrate and uses Polkadot's JSON-RPC interface. It is not EVM-compatible. You need to use Polkadot.js or Substrate-specific SDKs.

What is the difference between SORA v2 and v3?

SORA v2 ran as a Polkadot parachain. SORA v3 (Nexus) is a standalone Hyperledger Iroha 3 network. Endpoints and APIs differ. Always verify which version your dApp targets.

Can I run my own SORA node?

Yes, the SORA node software is open-source. However, running a node requires significant infrastructure and maintenance. For most projects, using a managed RPC service like OnFinality is more efficient.

How do I check if my RPC connection is working?

Use the system_health method. A healthy node returns "isSyncing": false and "peers": >= 25.

Are there free RPC endpoints for production?

Public endpoints are free but rate-limited. For production apps with moderate traffic, consider a free tier from a provider or a pay-as-you-go plan to avoid disruptions.

Key Takeaways

  • SORA is a Substrate-based blockchain monetary system, now on v3 (Nexus) with Hyperledger Iroha 3.
  • Use the correct network ID and endpoints for mainnet versus Taira testnet.
  • Public RPC endpoints are suitable for testing; dedicated nodes provide reliability for production.
  • Always test on testnet first using the faucet and upgrade to dedicated infrastructure when scaling.
  • For detailed network information and pricing, visit the SORA network page and RPC pricing page.

Related resources

Originally published at OnFinality.

Top comments (0)