Glossary · Blockchain development

RPC (Remote Procedure Call)

Published 23 May 2025 · Updated 21 Oct 2026 · 14 min read

RPC (remote procedure call) is a model for calling a function on another computer across a network. In blockchain applications, wallets, dApps, and backends use it to communicate with blockchain full nodes, which verify transactions and blocks. These programs read chain data or submit signed transactions. Smart contracts do not make these calls.

  • Ethereum wallets and apps usually talk to nodes through JSON-RPC 2.0 over HTTPS or WebSocket.
  • Reading chain data costs no gas, while sending relays a transaction the wallet has already signed.
  • An RPC endpoint sees your IP and queried addresses, making access a trust and privacy decision.

How a remote procedure call works

Birrell and Nelson described this model in February 1984. The idea had already been discussed since at least 1976. A local call enters a stub, which passes work across a network to server code. The result travels back through the same layers. Network failures create uncertainty that local syntax cannot hide. Their paper explains that a failed call may have run once or not at all. Concrete protocols implement the model, including ONC RPC, JSON-RPC 2.0, and gRPC.

Number 1

Call through a stub

Application code makes an RPC call through a stub. The stub packages arguments for a server instead of running the procedure locally. The server-stub calls the real procedure.

Number 2

Encode the request

A JSON-RPC 2.0 request contains jsonrpc, method, an id, and optional params. The jsonrpc value is "2.0". gRPC instead uses protocol buffers. JSON-RPC itself does not require a particular transport.

Number 3

Send the request

An Ethereum node receives calls over HTTP, WebSocket, or IPC. gRPC runs over HTTP/2. A batch array groups several JSON-RPC requests, but transport does not remove failure risks.

Number 4

Read the response

A JSON-RPC response matches the id and contains result or error, never both. Error code -32601 means "Method not found". A notification has no id and receives no reply.

The Ethereum JSON-RPC API

Ethereum execution clients expose a standard JSON-RPC API, documented in the execution-apis repository using OpenRPC. The eth_ methods handle chain reads, contract calls, and transaction submission. Common RPC calls include eth_getBalance, eth_call, eth_getLogs, and eth_sendRawTransaction. The specification also covers net_, debug_, and txpool_. The trace_ namespace belongs to clients such as Reth and Erigon, not this standard. The June 2026 specification adds eth_capabilities to describe the history a node can serve.

Figure 1 · Recorded requests to Ethereum mainnetExplore an Ethereum RPC requestPick one of ten requests to inspect its JSON-RPC payload, shortened response, elapsed time, size, and explanation.
Method

Run totalSupply() on the USDC contract without sending a transaction.

RequestPOST ethereum-rpc.publicnode.com
{  "jsonrpc": "2.0",  "id": 1,  "method": "eth_call",  "params": [    {      "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",      "data": "0x18160ddd"    },    "0x1906d9f"  ]}
Response67 ms · 102 bytes
{  "jsonrpc": "2.0",  "id": 1,  "result": "0x00000000000000000000000000000000000000000000000000ab06ec868a33a0"}
What it meansFunction0x18160ddd is the selector of totalSupply()Result48,139,833,956.77 USDC, 6 decimalsCostNo fee. Nothing is written to the chain

The eth_call method evaluates contract code without sending a transaction. The eth_estimateGas method estimates gas, and the measured 1 wei transfer needs 21,000 gas.

The page team sent these requests to public endpoints from one browser in Europe on 21 October 2026. Responses are shortened.

A block tag selects the state to read. The latest block may be reorganized out. A finalized block cannot be reorganized except by manual intervention coordinated by the community. Other tags include safe, pending, and earliest. A block hash identifies a block through EIP-1898. A Geth full node retains the latest 128 block states, according to documentation checked on 21 October 2026. An archive node preserves historical state that a pruned node no longer serves. Keeping old blocks alone does not establish historical state availability.

The eth_subscribe method uses WebSocket or IPC, not plain HTTP. Logs removed after a reorganization carry removed: true. The Engine API connects execution and consensus clients on port 8551 with JWT authentication and is not a user API. The Beacon API uses REST over HTTP and needs additional protection before public exposure. At the wallet layer, EIP-1193 defines request() and events such as chainChanged. Under EIP-3085, a wallet signs only with the chain ID submitted when adding the network, never one from eth_chainId.

RPC on other blockchains

An RPC node exposes a chain-specific interface with its own methods, transports, and authorization rules. A familiar RPC URL does not imply that Ethereum tooling works elsewhere. The table separates the interface from connection details and read semantics. Canton uses a participant-specific view rather than a public interface for the entire ledger.

ChainAPIPort and accessWorth knowing
EthereumAPIThe execution API uses JSON-RPC 2.0 requests and responses encoded as JSONPort and accessMost clients serve HTTP on localhost port 8545, with Geth WebSocket on 8546Worth knowingA block tag selects latest, safe, finalized, pending, or earliest state
BitcoinAPIBitcoin Core supports JSON-RPC 2.0 since version 28.0, released in October 2024Port and accessbitcoind enables RPC by default on port 8332 with cookie authenticationWorth knowingThe authenticated interface has no encryption and should not face the public Internet
SolanaAPIThe Solana interface uses JSON-RPC over HTTP and supports subscriptions over WebSocketPort and accessPublic endpoints are available, with request limits enforced per client IP addressWorth knowingMany reads accept processed, confirmed, or finalized commitment, typically defaulting to finalized
CantonAPIThe Canton Ledger API offers gRPC and JSON interfaces, not a ledger-wide public JSON-RPC interfacePort and accessJWT authentication connects a client to its own Canton participant nodeWorth knowingEach participant node holds only the contracts that its parties can see

Node providers and public endpoints

A node provider runs distributed node clients so application teams do not maintain RPC infrastructure themselves. Ethereum documentation describes this as centralizing the product's infrastructure. Billing units also differ. In the plan snapshot checked on 21 October 2026, Infura uses credits, Alchemy uses compute units, and Chainstack uses request units. These labels are not interchangeable measures of work. Infura counts eth_call as 80 credits and eth_getLogs as 255 credits in that snapshot.

Figure 2 · Six free endpoints, same requestsCompare six public RPC providersChoose a request to compare six providers, inspect exact replies or errors, and see status tags with three answer counts.
Request

eth_getBalance for one address at block 1,048,576, from 23 February 2016.

PublicNodeethereum-rpc.publicnode.comLimitedError -32602Archive requests require a personal token. Get one at: https://www.allnodes.com/publicnode
1RPC1rpc.io/ethLimitedError -32603state at block #1048577 is pruned
MEV Blockerrpc.mevblocker.ioAnswered1,500,060.69 ETHAnswered in 82 ms
Flashbots Protectrpc.flashbots.netLimitedError -32603state at block #1048577 is pruned
dRPCeth.drpc.orgAnswered1,500,060.69 ETHAnswered in 179 ms
Cloudflarecloudflare-eth.comErrorError -32603Internal error
Answered2 of 6Returned a result
Limited or refused3A plan limit, pruned history, or a method that is switched off
Error or no answer1A server error, or no reply the browser could read

MEV Blocker and dRPC return the February 2016 balance. PublicNode asks for a token, two services report pruned state, and Cloudflare returns an internal error.

The page team tested free endpoints without API keys from one browser in Europe on 21 October 2026. Results change often.

A rate limit is only one restriction. In plans checked on 21 October 2026, Alchemy allows 10 blocks per free eth_getLogs query, while QuickNode's trial allows five. Archive node access, trace methods, and WebSocket access can also be excluded. Public RPC endpoints are shared infrastructure behind load balancers. A shared URL can return different software or capabilities between calls. This snapshot describes observed behavior, not a lasting service promise.

What an RPC operator can see

A request exposes more than a method name. The eth_getBalance method names an address, while eth_call carries a contract and calldata that can identify a token holder. The eth_getLogs method exposes contracts and topics. The eth_sendRawTransaction method delivers the full signed transaction before others see it. The RPC operator also receives the caller's IP address. It can log requests, enforce limits, block service, or return false data. EIP-3085 tells wallets to warn users about this exposure.

Figure 3 · Where your data goesCompare visibility across access routesSelect a route to follow three path cards and compare five visibility and protection rows, each with a short status tag.
Route
Wallet iconWallet or dAppSigns locally and sends JSON-RPC requests
JSON-RPC iconRPC providerAn endpoint without private transaction routing
Network iconPublic networkNodes gossip the transaction to the mempool
Your IP addressSeenEvery request carries it. MetaMask tells users that any RPC will receive their IP address and wallet.
Addresses you look upSeenBalance and token reads name the address. Consensys said in 2022 that Infura does not store addresses for MetaMask read requests.
Your transaction before it landsPublicThe provider passes it to the public mempool, where bots watch for trades to front-run.
Wrong answersPossibleA plain answer cannot be checked. MetaMask warns that malicious providers may lie about the state of the chain.
Single point of failureSharedWhen a default provider fails, every wallet that relies on it fails too, as in November 2020 and April 2022.

A public provider receives request data and the caller's IP address. Visibility is not the same as retention, which depends on policy.

This comparison uses provider privacy policies and documentation checked on 21 October 2026, rather than independent traffic measurements.

MetaMask uses the Infura provider by default, according to documentation checked on 21 October 2026. Its network settings allow a different RPC URL. In December 2022, Consensys said it did not store wallet addresses for read requests. For writes, it collected wallet and IP information without storing them together. Consensys said it was working on narrowing retention to seven days. Its statement also warned that self-hosting a node could make accounts easier to associate with an IP address.

Bots watch the public mempool for front-running and sandwich opportunities. MEV protection addresses maximal extractable value risks by changing transaction routing. Documentation checked on 21 October 2026 describes private routes in Flashbots Protect and MEV Blocker. Flashbots says Protect does not track IP addresses. A Chainlist notice for MEV Blocker says it stores no IP data. Neither claim is independently verified. Private routing also does not prove displayed balances. In April 2024, SlowMist described a spoofed RPC scam that showed a deposit that never happened.

Outages and failures at RPC endpoints

A valid response can still describe the wrong chain or an old head. Access failures can also originate outside the blockchain itself. These incidents separate protocol availability from the infrastructure that applications reach through an RPC endpoint. They include software faults, mistaken restrictions, and regional service failures.

  1. November 2020

    Old clients follow minority chain

    Infura nodes running old Geth versions hit a consensus bug and followed a minority chain. Its post-mortem covers about seven hours and 15 minutes of disruption.

  2. March 2022

    Access restrictions block unintended users

    Infura mistakenly blocked Venezuelan users while applying sanctions rules for Donetsk and Luhansk. MetaMask noted that users could change their default endpoint.

  3. April 2022

    Service fault interrupts wallet access

    An Infura service fault stopped MetaMask from working for most users. Service returned the same day, but the cause was not disclosed.

  4. October 2025

    Cloud outage produces zero balances

    An AWS us-east-1 outage lasted about 14.5 hours. Reports described zero MetaMask balances when Infura could not retrieve data, while the blockchain kept producing blocks.

  5. September 2026

    Block number stalls in one region

    Alchemy reported a stalled block number in its US East region for about 18 minutes. A stalled head can return valid but old data with no error, so freshness needs its own check.

Checking answers instead of trusting them

RPC availability checks and correctness checks solve different problems. Failover can restore a connection without proving an answer, while cryptographic checks need trusted reference data. The approaches below range from independent validation to agreement between node providers. Each changes the trust boundary. Only your own node keeps read queries away from third parties.

Run your own node

Your node verifies transactions and blocks against consensus rules. That independence requires disk, bandwidth, and upkeep, with recent state and historical state imposing different storage needs.

Use a light client

A blockchain light client checks signed headers. Helios verifies data from an upstream RPC node. Ethereum documentation checked on 21 October 2026 does not consider these clients production-ready.

Check Merkle proofs

The eth_getProof method returns Merkle proofs for an account and its storage. An application checks the value against a trusted block header's state root, rather than accepting a response from a node.

Compare several providers

viem's fallback transport tries another provider after failure, while ethers v6 can require quorum. The wallet development cost guide explains why teams often add a second provider after an incident.

Building reliable RPC access

Reliable access starts with the application's data needs, not just a connection URL. We plan reads, transaction submission, and historical queries as separate backend requirements. That makes it possible to define what happens when a request is slow, rejected, or stale. RPC setup belongs in the same plan as indexers, APIs, event listeners, databases, monitoring, and DevOps.

PixelPlex case icon

We set up RPC and indexing through our Web3 development service. We built and run the CC View API for Canton data over REST and WebSocket. Our Canton wallet development connects wallet backends to participant nodes through the Ledger API, with synchronizers keeping those nodes in sync across environments.

  1. Provider and failover planning

    We define which providers serve each request and how fallback works. More than one endpoint needs explicit routing and failure handling. Fallback behavior belongs in the product specification.
  2. History and log access

    We map historical state and event queries before implementation. Archive access and log range caps determine what the application can retrieve. Pruned history needs a defined error path.
  3. Caching and indexing

    We plan caching alongside indexers, event listeners, and database design. This separates the application's data model from individual RPC calls and defines where indexed data lives.
  4. Monitoring and error handling

    We monitor head lag, RPC errors, and missing history. A successful response still needs freshness checks, while rejected requests need visible handling. Limit errors also need classification.
  5. Keys and access boundaries

    We separate public application access from authenticated internal interfaces. Endpoint exposure, access credentials, and signed transaction handling belong in the backend security design. Signing remains distinct from submission.

Plan RPC access around your application's needs

We can discuss your chain, data requirements, and failure cases, then outline the backend work those choices involve.

Discuss RPC requirements

RPC FAQ

What does RPC mean in crypto?

In crypto, RPC lets wallets and applications read data from a blockchain node and submit signed transactions. The term describes a calling model, not a particular chain. An accepted submission is not necessarily a confirmed transaction. For example, Solana's sendTransaction documentation warns that success does not guarantee processing or confirmation.

What is an RPC endpoint or RPC URL?

It is the address where software sends calls to a service that handles blockchain requests. That address alone does not describe every available method. When HTTP is enabled, Geth exposes the eth, net, and web3 namespaces by default. A response with JSON-RPC error code -32602 means "Invalid params", rather than a missing connection.

How do RPC and JSON-RPC differ?

RPC means remote procedure call, the model that JSON-RPC implements through JSON messages. JSON-RPC is one of several protocols that implement RPC. Sun published its RPC specification as RFC 1050 in April 1988, and JSON-RPC 1.0 dates to 2005. Version 2.0 dates to 2010 and was updated in 2013. Google open-sourced gRPC in February 2015, building on its internal Stubby system.

Is a free public RPC safe to use?

A free RPC service can restrict access, expose request data, or return incorrect information. A free public endpoint is fine for testing and light reads. Production apps need limits, privacy terms, and reliable fallback. Documentation checked on 21 October 2026 gives Solana's public limit: 100 requests per 10 seconds per IP. These services return HTTP 429 when rate limited and are not intended for production.

What is an archive node used for?

It serves historical state for balance or contract queries that a pruned node may no longer answer. Since July 2025, all Ethereum execution clients support partial history expiry under EIP-4444. Pruned clients can discard pre-Merge blocks, saving 300 to 500 GB. Error 4444 means "Pruned history unavailable" in the Ethereum specification checked on 21 October 2026.

How can I change RPC in MetaMask?

In MetaMask's network settings, edit a network's RPC URL or add a custom network. The chain ID must match the network. The new provider will see your wallet's IP address and queried addresses. EIP-3085 therefore tells wallets to warn users about this exposure.

What does a private or MEV-protected RPC do?

It routes transactions away from the public mempool to reduce exposure to front-running and sandwich bots. In documentation checked on 21 October 2026, Flashbots Protect retries for 25 blocks and includes transactions only if they do not revert. MEV Blocker says 0.1% of transactions might become public through reorganizations, so privacy is not absolute.
Sources (35)

Get updates about blockchain, technologies and our company

We will process the personal data you provide in accordance with our Privacy policy. You can unsubscribe or change your preferences at any time by clicking the link in any email.

Follow us on social networks and don't miss the latest tech news

  • facebook
  • X
  • linkedin
  • instagram
Stay tuned and add value to your feed