BlockchainAI Architecture13 min readUpdated

Blockchain Networks: Mainnet, Testnet, RPC

By Mudassir Khan — Agentic AI Consultant & AI Systems Architect, Islamabad, Pakistan

Cover illustration for: Blockchain Networks: Mainnet, Testnet, RPC

Section 01 · What a Network Is

The environment where transactions actually happen

A blockchain network is more than just a protocol specification. It is a running instance of that protocol with a specific history, a specific validator set, and a specific Chain ID.

Quick answer

What is a blockchain network, exactly? A blockchain network is a distributed system of nodes that collectively maintain a shared ledger, validate new transactions, and enforce the protocol rules of that specific chain. When you send a transaction, it does not go to 'the Ethereum protocol' in the abstract — it goes to the specific network instance you are connected to: mainnet, Sepolia testnet, or any other deployed instance of the Ethereum protocol. Each network has an independent transaction history, independent balances, and independent validators.

This distinction matters more than it initially seems. The protocol — the set of rules that define how Ethereum works — is software. The network is that software running on thousands of computers right now, with a shared history going back to the genesis block. The Ethereum mainnet's history starts in July 2015. Sepolia testnet started fresh at a different time, with different genesis parameters, and its transaction history is completely independent of mainnet.

You can think of a blockchain network as an instance of a database. Two Postgres databases running on different servers with the same schema but different data are not interchangeable — they hold different records. Similarly, an ETH balance on Ethereum mainnet and a testnet ETH balance on Sepolia are not the same asset in any sense. One has real value backed by real economic activity. The other is a developer resource with no market.

Understanding that networks are distinct environments prevents a specific and financially painful category of mistake: sending real assets to a testnet address or confusing network IDs when configuring a wallet or application.

Section 02 · Mainnet and Testnet

Production vs sandbox: when to use each

Ethereum Mainnet — Chain ID 1

The production Ethereum network. Every transaction involves real ETH with real market value. Smart contracts deployed here are public, permanent, and face real adversaries looking for vulnerabilities. Gas fees are paid in real ETH and fluctuate with network demand. The mainnet blockchain was launched on July 30, 2015 and has run continuously since then, accumulating the full history of every Ethereum transaction ever confirmed.

Sepolia Testnet — Chain ID 11155111

Ethereum's primary developer testnet as of 2023 onwards (replacing the deprecated Goerli and Ropsten testnets). Sepolia runs the same protocol as mainnet — the same EVM, the same opcode set, the same transaction format — but its ETH has no market value and is freely available from faucets. Deploy contracts here before mainnet. Test your UI interactions here. Simulate attacks and edge cases here. Sepolia uses Proof of Stake like mainnet and supports the full post-Merge feature set.

Solana Mainnet Beta

Solana's production network. Real SOL, real transactions, real DeFi protocols and NFT markets. The 'Beta' label in the name is historical — the network is fully production ready but the name has stuck. Validators on Solana mainnet must meet hardware requirements that exceed a typical consumer machine: high core count CPU, 768 GB RAM recommended, fast NVMe, and high bandwidth connectivity.

Solana Devnet

Solana's primary developer testnet. Free SOL available via the 'solana airdrop' CLI command or web faucets. The Devnet runs the same software as mainnet but is reset periodically, which means contract deployments and transaction history do not persist indefinitely the way mainnet does. Use Devnet for initial development and Testnet (Solana's pre-production environment) for final integration testing before mainnet deployment.

The operating principle is simple: never put real money at risk during development and testing. Every professional blockchain developer has a habit of triple-checking which network their wallet is connected to before sending any transaction. The network indicator in MetaMask (the dropdown at the top) and in Phantom (visible in settings) shows your current network. Make checking it muscle memory.

Sending real ETH to a testnet address is not the same as losing it

A common fear: 'I accidentally sent ETH to a Sepolia address'. This is not how it works. You cannot send mainnet ETH to a testnet address directly — mainnet transactions only exist on mainnet. What you CAN do is send mainnet ETH while thinking you are on testnet because you did not check your network setting. That ETH goes to the mainnet address you specified. If you own that address (same private key, different network), you still control the ETH. If you sent to someone else's address, it is gone.

Section 03 · Chain IDs

Chain IDs: the network identifier embedded in every transaction

Chain IDs look like a minor technical detail. They are actually a core safety mechanism.

When you sign a transaction, your wallet's private key does not just sign the transaction data — it signs the transaction data combined with the Chain ID of the network you are on. This means a signature produced on Ethereum mainnet (Chain ID 1) is cryptographically different from the same transaction signed on Polygon (Chain ID 137), even if every other field is identical.

Before EIP-155 introduced replay protection in 2016, this was not the case. A transaction signed on the Ethereum mainnet was also valid on the Ethereum Classic network (which split off during the DAO hack response). Attackers exploited this to replay mainnet transactions on the other chain and vice versa. EIP-155 fixed this by embedding the Chain ID in the signing hash. Now a transaction signed for one network is mathematically invalid on any other network.

Common Chain IDs

Ethereum Mainnet: 1. Ethereum Sepolia Testnet: 11155111. BNB Chain (formerly BSC): 56. Polygon PoS: 137. Arbitrum One: 42161. Optimism Mainnet: 10. Base: 8453. Avalanche C-Chain: 43114. Fantom Opera: 250. A complete list is maintained at chainlist.org — it is the standard reference when configuring MetaMask for a new network.

Why Chain IDs matter when adding networks

When you add a custom network to MetaMask, you specify the Chain ID along with the RPC URL. If you enter the wrong Chain ID, signed transactions will be rejected by the network because the embedded Chain ID in the signature does not match. Always verify the Chain ID from an official source (the project's documentation or chainlist.org) rather than an unverified forum post — phishing attacks sometimes distribute fake RPC configurations with legitimate looking Chain IDs pointing to malicious nodes.

Table showing major blockchain networks with their Chain IDs: Ethereum 1, Sepolia 11155111, BNB Chain 56, Polygon 137, Arbitrum 42161, Optimism 10, Base 8453.
Chain IDs are the numeric identifiers that distinguish every EVM compatible network. Chainlist.org maintains the authoritative list with verified RPC endpoints for each.

Section 04 · RPC Nodes

How wallets and applications talk to blockchains

You do not need to run a full node to use a blockchain. RPC nodes are the standard connection layer that makes wallets and applications possible without each user operating their own infrastructure.

RPC stands for Remote Procedure Call. An RPC endpoint is a URL that accepts structured requests and returns structured responses, allowing a client application to execute functions on a remote server. In the blockchain context, an RPC endpoint is a full node that has processed the entire blockchain history, maintains the current state, and exposes an API that applications can query.

When MetaMask shows your ETH balance, it is calling the eth_getBalance method on an Ethereum RPC endpoint. When you send a transaction, MetaMask calls eth_sendRawTransaction. When a DeFi application reads the current price from a smart contract, it calls eth_call. All the visible functionality of blockchain applications is built on these RPC calls happening in the background.

Querying account balances

The eth_getBalance call takes an Ethereum address and a block number (or 'latest') and returns the ETH balance at that address. This is what every wallet uses to show your balance. For token balances (ERC-20 tokens), the wallet calls the balanceOf function on each token contract via eth_call.

Broadcasting transactions

eth_sendRawTransaction takes a signed transaction as a hex string and broadcasts it to the network. The RPC node validates the signature, checks that the nonce is correct, and forwards the transaction to the mempool. From there, validators pick it up and include it in a block. This is the final step every time you confirm a transaction in MetaMask or Phantom.

Reading contract state

eth_call simulates a contract function call without creating an actual transaction. It reads contract state or computes a return value without spending gas or modifying the blockchain. This is how DeFi applications display current prices, how NFT marketplaces show collection data, and how any application reads from a smart contract without the user signing anything.

Subscribing to events

eth_subscribe (via WebSocket connections) lets applications receive real time notifications when specific events occur — a new block is mined, a specific contract emits an event, a transaction to a specific address is confirmed. This is the foundation of live price feeds, transaction monitoring dashboards, and any application that needs to react to on-chain events as they happen.

Section 05 · RPC Providers

Public vs private RPC: which to use when

Public RPC endpoints are freely available, require no registration, and allow anyone to connect. Ethereum's public RPC (mainnet) is available at https://cloudflare-eth.com and similar URLs. Solana's public RPC is at https://api.mainnet-beta.solana.com.

The problem with public RPCs is reliability and rate limiting. Public endpoints are shared among all users. When traffic spikes — during NFT mints, token launches, market volatility — public RPCs become overwhelmed and start returning errors. For your personal wallet, this is an occasional inconvenience. For a production application with paying users, it is unacceptable.

Alchemy

Alchemy is the most widely used RPC provider in production blockchain applications. It supports Ethereum, Polygon, Arbitrum, Optimism, Base, Solana, and other chains. The free tier provides 300 million compute units per month — enough for development and moderate production traffic. Alchemy's dashboard shows real time request analytics, error logs, and latency metrics. Their enhanced APIs add capabilities beyond the standard RPC — transaction simulation, NFT APIs, event indexing.

Infura

Infura (owned by ConsenSys) is one of the original Ethereum RPC providers and MetaMask's default connection before users add their own. It supports Ethereum, Polygon, Arbitrum, Optimism, and IPFS. The free tier is sufficient for development. Infura experienced a notable outage in 2022 that caused MetaMask to be unavailable for many users — a reminder that even established providers have single points of failure.

QuickNode

QuickNode focuses on performance and latency. It supports over 60 blockchain networks including Solana, Ethereum, and many EVM chains. QuickNode is often cited for lower latency than Alchemy and Infura, which matters for applications where transaction speed is competitive (MEV bots, high frequency DeFi). The free tier is more limited than Alchemy but the paid tiers are competitive in price.

For personal development and learning: use public RPCs or the Alchemy free tier. For any production application: use a private RPC provider with SLA guarantees. The cost of downtime from a rate-limited public RPC will exceed the cost of a paid RPC tier within the first significant traffic spike.

Section 06 · MetaMask Setup

How to add a custom network to MetaMask

MetaMask comes preconfigured for Ethereum mainnet and common testnets. Adding any other EVM network takes about two minutes.

Get the network details

Before adding a network, you need five pieces of information: the network name (for display), the RPC URL (the endpoint), the Chain ID (the numeric identifier), the currency symbol (e.g., ETH, MATIC, BNB), and the block explorer URL (optional but useful). The most reliable source for these is chainlist.org — select the network you want, click 'Add to MetaMask', and ChainList auto fills everything. For testnets, the project's official documentation is the safest source.

Open MetaMask's network settings

Click the network selector dropdown at the top of MetaMask (it shows your current network name). At the bottom of the list, click 'Add network'. MetaMask offers two paths: 'Add a network manually' or selecting from a curated list of popular networks. For well known networks like Polygon or Arbitrum, the curated list works fine. For custom or less common networks, use the manual path.

Enter the network details

For a manual add: enter the Network Name, the RPC URL, the Chain ID, and the Currency Symbol. The block explorer URL is optional but enables MetaMask to link directly to your transactions on the network's explorer. For example, adding Polygon mainnet requires: Network Name = Polygon Mainnet, RPC URL = https://polygon-rpc.com (or your Alchemy/Infura URL), Chain ID = 137, Currency Symbol = MATIC, Block Explorer = https://polygonscan.com.

Verify and switch

Click Save. MetaMask will switch to the new network and show your balance on that chain. Your MetaMask address is the same on every EVM chain — the same private key controls the same address prefix across all of them. Your balances differ because each chain has its own ledger of who owns what. To switch back to Ethereum, just select it from the dropdown.

Verify RPC URLs before using them

A malicious RPC server can show you false balance information and manipulate what you see — but it cannot steal your funds or forge your signature. The real risk is a fake RPC URL in a phishing site that looks like a legitimate network addition prompt. Always get RPC URLs from official sources: chainlist.org, the project's official documentation, or Alchemy/Infura/QuickNode dashboards. Never copy RPC URLs from random forum posts or Discord messages.

Section 07 · FAQ

Frequently asked questions

What happens if I send a transaction to the wrong network?

If you send a transaction while connected to the wrong network, the transaction goes through on that network — not the one you intended. For example, if you send USDC on Polygon thinking you are on Ethereum, the transaction succeeds on Polygon and your USDC balance decreases on Polygon. Your Ethereum USDC is untouched. To access the Polygon USDC, connect MetaMask to Polygon (Chain ID 137). The funds are not lost, just on a different network. This is recoverable. Sending to a wrong address on the right network is the unrecoverable scenario.

How do I know which RPC URL MetaMask is using?

In MetaMask, go to Settings, then Networks, and click on any network to see its current RPC URL. You can also change it here — for example, to replace MetaMask's default Infura endpoint with your personal Alchemy endpoint for better reliability. Changing the RPC URL does not affect your keys or balances — it only changes which node your wallet queries and broadcasts through.

Can I run my own Ethereum node?

Yes, and it is worth doing for serious production applications. Running an Ethereum full node requires roughly 2 to 3 TB of storage for the current state (as of 2026), 16 GB or more RAM, and a reliable internet connection. Ethereum's execution clients (Geth, Nethermind, Besu) and consensus clients (Lighthouse, Prysm, Teku) are all open source. A full node provides maximum reliability and privacy — you are not dependent on any third party provider and no provider can see your queries. Running a validator requires additionally staking 32 ETH.

What is the difference between an RPC node and a validator node?

A validator node participates in consensus — it proposes and attests blocks and earns staking rewards. On Ethereum, this requires 32 ETH staked. An RPC node (also called a full node or archive node) stores blockchain history and answers queries but does not participate in block production. It can be run by anyone without staking requirements. Most blockchain users and most applications interact with RPC nodes, not validators, for their day-to-day operations.

Do Layer 2 networks have their own Chain IDs?

Yes. Every network that is EVM compatible has its own Chain ID, including all Layer 2 networks. Arbitrum One has Chain ID 42161. Optimism has Chain ID 10. Base (Coinbase's Layer 2) has Chain ID 8453. zkSync Era has Chain ID 324. The same replay protection that prevents Ethereum mainnet transactions from being replayed on Polygon also prevents them from being replayed on any Layer 2.

What is an archive node and when do I need one?

A standard full node stores current state and recent history but prunes older state to save storage. An archive node stores the complete historical state of every address at every block height. Archive nodes are needed when your application needs to query historical state — for example, finding the token balance of an address at a block six months ago, or replaying historical contract interactions. Archive nodes require significantly more storage (tens of terabytes for Ethereum) and Alchemy, Infura, and QuickNode all offer archive node access on paid plans.

Written by Mudassir Khan

Agentic AI consultant and AI systems architect based in Islamabad, Pakistan. CEO of Cube A Cloud. 38+ agentic AI launches delivered for global founders and CTOs.

View agentic AI consulting serviceSee ChainTrust case study

Related service

Agentic AI Consulting

See scope & pricing →

Related case study

ChainTrust Compliance Engine

Read case study →

More on this topic

Need an AI systems architect?

Book a 30-minute architecture call. I will sketch the high-level design for your use case and give you an honest view of the trade-offs.

Book a strategy call →