Quick decision guide: public RPC vs. dedicated node
Before you copy an endpoint into your config, decide what the traffic will look like. A Base public RPC is fine for:
- Wallet integrations where users make occasional requests.
- Prototypes, hackathon projects, and internal tools.
- Read-only queries like checking balances or token prices.
It is not a good fit for:
- High-traffic dApps with thousands of daily users.
- Applications that need consistent low latency.
- Services that require archive data or trace methods.
If your app is still in development, start with a public endpoint. When you approach production, evaluate a managed RPC provider or a dedicated node. OnFinality offers both shared and dedicated options for Base, and you can compare plans on the RPC pricing page.
What is a Base public RPC?
Base is an Ethereum Layer 2 network built on the OP Stack. Like any EVM chain, it exposes a JSON-RPC API that lets clients read blockchain state, estimate gas, and submit transactions. A public RPC is a free endpoint operated by a third party—anyone can use it without an API key.
For example, the official Base public endpoint is https://mainnet.base.org. Many other providers, including OnFinality, also offer public endpoints. OnFinality's Base endpoint is https://base.api.onfinality.io/public.
Public RPCs are convenient, but they are shared infrastructure. Providers rate-limit requests to keep the service fair, and performance can vary under load. For production apps, you usually want a private endpoint with higher limits and better reliability.
Base chain settings at a glance
When you add Base to a wallet or configure a dApp, you need the correct network parameters. Here are the key settings for Base mainnet:
| Parameter | Value |
|---|---|
| Network Name | Base |
| RPC URL | https://base.api.onfinality.io/public |
| Chain ID | 8453 |
| Currency Symbol | ETH |
| Block Explorer | https://basescan.org |
For the Base Sepolia testnet, use chain ID 84532 and the endpoint https://base-sepolia.api.onfinality.io/public. You can find more details on the Base network page and the Base Sepolia page.
How to connect to a Base public RPC
You can use a public RPC with any Ethereum-compatible library. Here's an example using ethers.js:
const { ethers } = require("ethers");
const provider = new ethers.JsonRpcProvider("https://base.api.onfinality.io/public");
async function getBlockNumber() {
const blockNumber = await provider.getBlockNumber();
console.log("Current block number:", blockNumber);
}
getBlockNumber();
You can also make raw JSON-RPC calls with curl:
curl https://base.api.onfinality.io/public \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
If you're adding Base to MetaMask, use the chain settings from the table above. The public endpoint works for most wallets, but for heavy use you'll want a dedicated endpoint.
Public RPC limits and failure modes
Public RPCs are shared, so they come with limitations. Common issues include:
- Rate limiting: Too many requests per second can trigger HTTP 429 responses.
- Timeouts: Slow responses under load can cause your app to hang.
- Inconsistent data: Some public endpoints may be behind on block height.
- Missing methods: Archive or trace methods are often unavailable.
If you see errors like rate limit exceeded or request timeout, your app may be outgrowing the public endpoint. At that point, consider a managed provider with higher limits or a dedicated node.
When to move to a dedicated Base RPC
A dedicated node gives you a private endpoint with no shared rate limits. You get more consistent performance and can access archive data if needed. OnFinality provides dedicated nodes for Base, and you can spin one up from the dedicated node page.
Signs you need a dedicated node:
- Your app has a growing user base and you see rate limit errors.
- You need low-latency responses for trading or real-time features.
- You require historical state access for analytics or indexing.
Dedicated nodes cost more, but they remove the unpredictability of public RPCs. For production apps, the investment is usually worth it.
Comparing public RPC providers for Base
There are many public RPC providers for Base. Here's a quick comparison of what to look for:
| Provider | Endpoint Type | Rate Limits | Archive Data | WebSocket Support |
|---|---|---|---|---|
| OnFinality | Public & dedicated | Varies by plan | Available on dedicated | Yes |
| PublicNode | Public | Yes | Available | Yes |
| 1RPC | Public | Yes | No | Yes |
| Alchemy | Public & private | Yes | Available | Yes |
When evaluating providers, check:
- Uptime and reliability: Look for providers with a track record of stability.
- Throughput limits: Free tiers often have low request caps.
- Data retention: Archive data is essential for some applications.
- Support: Do you get access to human support when things break?
OnFinality offers transparent pricing and a free tier for public endpoints. You can see the full list of supported networks on the networks page.
Troubleshooting common Base RPC errors
Here are common errors you might encounter and how to fix them:
-
eth_chainIdreturns wrong value: Make sure you're using chain ID 8453 for mainnet and 84532 for Sepolia. -
nonce too low: This usually means you're reusing a nonce. Check your transaction builder. -
insufficient funds: Ensure the wallet has enough ETH for gas. -
rate limit exceeded: Slow down your requests or upgrade to a private endpoint.
If you're building on Base Sepolia, you can get test ETH from a faucet. Check the Base Sepolia page for details.
Key Takeaways
- A Base public RPC is a free, shared endpoint for interacting with the Base network.
- Use public RPCs for development, testing, and low-traffic apps.
- Public RPCs have rate limits and may lack archive data.
- For production, consider a dedicated node or a managed RPC provider like OnFinality.
- Always verify chain settings (chain ID, RPC URL) to avoid connection issues.
Frequently Asked Questions
Is the Base public RPC free?
Yes, public RPCs are free to use, but they come with rate limits and no guarantees.
What is the Base chain ID?
The Base mainnet chain ID is 8453. Base Sepolia uses 84532.
Can I use a public RPC for production?
It's possible for low-traffic apps, but not recommended. Public RPCs can throttle or fail under load.
Does OnFinality offer a Base public RPC?
Yes, OnFinality provides a public endpoint at https://base.api.onfinality.io/public. You can also get a dedicated node for higher performance.
How do I get test ETH on Base Sepolia?
Use a faucet listed on the Base Sepolia network page. You'll need test ETH to deploy and test contracts.
What is the difference between a public RPC and a dedicated node?
A public RPC is shared among many users, while a dedicated node is exclusively for your use. Dedicated nodes offer better performance and reliability.
Related resources
Originally published at OnFinality.
Top comments (0)