What is RPC


The Remote Procedure Call (RPC) is a technique for software communication. It enables one computer program to call procedures to execute on another computer without knowing the details of the remote computer. RPC is a kind of API (Application Programming Interface).

For example, you bought a rice cooker. RPC allows you to remotely control the cooker through an app on your phone so that you can start the cooker and cook rice when you are outside.

RPC is a request-response protocol. The caller sends the request to execute a procedure with specified parameters on the remote computer. Then, the executor executes it and sends the result back to the caller.

In Web2, RPC can be used for remote file access, remote software task management, remote monitoring program control, remote error logging, etc.

In terms of Blockchain, RPC is a way for nodes to communicate with each other or with Virtual Machine. Specifically, each node can send instructions to other nodes or query data from them in the blockchain network through RPC API (like a gate for interaction).

What is Virtual Machine? What is EVM? Please refer to the content “What is EVM”?

For decentralized apps (DApps), to interact with blockchains (such as reading and writing data to the network or executing smart contracts), they must first connect to a node and then communicate with the network. How can the DApps connect to the nodes? Again, through RPC API.

Nodes as Service (RPC Service Provider)

There are two options for DApp developers to connect with nodes. First, run a node by itself and connect the nodes to interact with the blockchain network. Second, cooperate with other nodes, especially node service providers, to use their nodes. The former way could be time-consuming as it is not easy to deploy and run a blockchain node. However, using a node service is actually centralizing the infrastructure aspect of the product. Therefore, the operation of the DApp will depend on the stable operation of the server, which may bring some centralization risks.

Infura is a blockchain-related tools and infrastructure provider. It is centralized and was acquired by Consensys in 2019.

Node service is one of the main products of Infura. It provides node service for Ethereum, Polygon, Optimism, Arbitrum, Avalanche, Near, etc.

MetaMask, the biggest crypto hot wallet, is using Infura's node service to access blockchains as well. So when using MetaMask, you are actually using the infrastructure service supplied by Infura. (Notably that MetaMask is also a part of Consensys.)

You might also be interested in the following information:


What else do you want to learn?

Use TokenInsight App All Crypto Insights Are In Your Hands