RPC Nodes Explained Like I’m 9yo
RPC nodes enable dApps and users to interact with a blockchain and is an essential part of web3 activities we engage in. But what exactly is an RPC node?
What are RPC nodes?
RPC stands for "Remote Procedure Call." It's not actually an RPC node itself, but a protocol that runs on an RPC node. Since protocols and programs need a computer to run, you can think of an RPC node as a type of computer.
Decentralized applications can't work on their own and need data from a blockchain to complete requests. To make this easier to understand, let's use an analogy. Imagine you're at a restaurant and you want to order a meal. You know the food is in the kitchen, but you don't speak the same language as the chef. This is where a waiter comes in to help. The waiter can take your order and carry it to the chef, who can then make your meal if he has all the necessary ingredients. In this analogy, you are the user, the kitchen and chef are the blockchain, and the waiter is the RPC node. The waiter can understand your request and translate it for the chef. The waiter also knows if the chef has all the ingredients needed to make your meal, just like an RPC node stores and serves the latest blockchain state.
To make this more familiar, let's say you want to mint an NFT. You click the "mint" button and send a request to the blockchain. An RPC node can then translate your request (web2) so it can be understood on the blockchain (web3). If the requirements are met (such as having enough NFTs left to mint), the transaction will go through.
Types of RPC nodes
No RPC node comes without an RPC endpoint, and both terms can be used interchangeably, but it’s important to clarify what an RPC endpoint is when speaking about types of nodes.
An RPC endpoint is the network location where a program sends its RPC requests. It’s like a node address, a URL where blockchain data can be sent to. RPC endpoints are categorized as public, private, and alternative.
Public RPC endpoints refer to nodes that anyone can connect to for free. Every blockchain offers public RPC nodes, and they can perfectly serve basic needs, such as swapping tokens. However, public RPC endpoints can get congested during times of higher activity. Anyone who has tried to mint an NFT from a hyped collection has likely experienced public RPC node congestion.
Private RPC endpoints are meant to address the specific needs of a dApp. For example, if you wish to increase your chances of minting a collection that thousands of other users are also interested in, you can use a private RPC node. Private RPC nodes are likely to be paid.
Alternative RPC nodes serve the role of backup endpoints and can help maintain a smooth dApp experience in cases of downtime. If a primary RPC endpoint fails, it will result in a failure of all transactions, and alternative RPC nodes help to avoid that.
Final remarks
RPC nodes should not be confused with validator nodes, as they are fundamentally different. Validator nodes serve as the backbone of a proof-of-stake blockchain, as they are responsible for verifying, voting on, and maintaining a record of transactions. Anyone running a validator node can receive rewards, regardless of whether the token of the ecosystem goes up or down. On the other hand, an RPC node runs the same software as a validator node, but it does not participate in the consensus process.