We all know how MetaMask and other web3 wallets work, right? You just download the extension or app, set up a wallet and add some ETH, and you’re off to the blockchain-based races. It’s just that easy, right? Well, sorta. But if part of the reason you’re here is that you’re interested in pseudonymous financial transactions, owning and controlling your data, and otherwise vibing with the web3 ethos, I have some news for you. If you care about pseudonymity and protecting your personal data, you’re going to need to up your blockchain infrastructure game. You’re going to need to learn about RPCs.
An RPC is a Remote Procedure Call, which is what we call the communication protocol used by things like wallets and dApps to interact with a blockchain network. All blockchains use an RPC, and many blockchains have multiple RPCs from which folks can connect to the blockchain. One way to think about an RPC is it is a way for you to access the blockchain as if you were running your own blockchain node.
Among other things, RPCs are used to:
Query the blockchain for information about transactions, addresses, and blocks.
Send transactions to the network.
Manage accounts, keys, and wallet functionality.
Retrieve smart contract data and interact with smart contracts.
Remember, at their core blockchains are just networked computers. An RPC endpoint is the actual URL you use to get plugged into the network. For example, the default RPC endpoint in MetaMask connects you to the blockchain through Infura, which is the blockchain infrastructure company owned by the same folks as MetaMask.
See New RPC URL? That’s the default RCP endpoint for Ethereum Mainnet when using MetaMask. But don’t worry, if you’re not comfortable routing all of your information through the world’s largest crypto conglomerate, ConsenSys, there are many other options.
This above list is from chainlist.org, your new bestie when it comes to RPC endpoints.
As you may have guessed, not all RPC endpoints are the same. Some endpoints are run by companies large and small that gobble up your internet data while helping you connect to the blockchain. For example, when you use the default Ethereum Mainnet RPC endpoint in MetaMask, did you know that Infura is also correlating your IP address with your wallet address? All this work to maintain pseudonymity, and you’re outed by your RPC endpoint.
Chainlist is a website that lists RPC endpoints for all EVM networks (there are dozens, hundreds?). Below you’ll see a screenshot of the major networks, such as Mainnet, Polygon, Arbitrum, Optimism, and Binance Smart Chain.
There are number of reasons why blockchain networks have so many endpoints - partly it’s redundancy, partly it’s because different infrastructure providers encourage their users to use their RPC endpoints, but it’s also because the type of RPC endpoints vary wildly, including whether they are public or private and whether they collect personally identifying information or not.
A public RPC enables anyone to access the blockchain through a particular URL for free - the Infura example above is a public RPC endpoint. Point your wallet at that URL and it’s essentially the node through which you’ll interact with the blockchain. While having public blockchain access points is necessary, public RPC endpoints are sometimes slow and unreliable. Like busy highways, they can get congested when demand is high and are not always the best ways to travel on, to paraphrase an old term, the blockchain superhighway. And of course public access points may bring the worst of web2 to web3 - privacy-breaking data gathering by for-profit corporations.
By contrast, a private RPC is not available for just anyone to use, and it provides a user with a direct, private connection to a node provider. The private RPC URL is unique to its owner, and enables only that person to interact with the blockchain through that endpoint. Imagine all MetaMask users trying to use the same Infura endpoint during a Major Crypto Event and just watching the transaction, waiting for it to confirm. Private RPCs avoid this congestion, allowing users to interact with the blockchain more quickly. Alchemy, a blockchain infrastructure provider, has an awesome tutorial on how to set up a private RPC. I highly recommend you check it out.
There are a few important things to consider when choosing an RPC endpoint. Not everyone is going to create a custom, private RPC endpoint. Most of us are just going to use what’s easy, what’s given to us. At the very least, however, it’s worth getting away from data-sucking RPCs like Infura, and use an RPC that doesn’t collect your personal information as you play in web3. Fortunately, there are easy alternatives to for-profit infrastructure providers.
Recall that long list of Ethereum Mainnet RPCs above, the top of which I’ve copied below. Notice the privacy column? That’s the key.
When you hover on the entries in the privacy column, you’ll get some great info. As with driving, green means go and red means stop, while yellow means use caution. The messages you get when you hover above a stop, go, and caution symbol are not universal. Take this example from https/ethereum.publicnode.com - check out what it stores or tracks:
You see that this RPC endpoint doesn’t store or track user data except what will be on chain, doesn’t map IP addresses to wallet addresses, and doesn’t use sketchy 3rd party tracking software.
Similarly, for 1rpc.io/eth:
This is great, go green! Contrast this with the Cloudfare RPC endpoint, which does all the sketchy web2 stuff you wouldn’t expect in web3:
Another:
With the yellow caution symbol, those are RPCs that temporarily collect data. Still stay away:
Many RPCs know you, and that’s just the problem. Just as with public connections to the internet, public connections to the blockchain (still the internet!) can expose you and your data in ways you never imagined. So follow this RPC Hierarchy to keep your data safe and your blockchain connection secure:
Get a private RPC endpoint through folks like Alchemy, or better yet, spin up a node (you don’t need to be a validator, so no need for ETH) and use that to access the blockchain.
Use a public RPC that doesn’t scoop up your data:
Only use public, non-privacy protecting RPCs if you absolutely must.
These technical differences may seem minor to most folks. But we came to web3 to maintain our pseudonymity, to own our data, and to escape the walled gardens of web2. The way we connect to the blockchain plays a huge role in how well our actions ultimately align with our values. Take the time to get a new RPC today!
Hiro Kennelly is a writer, editor, and coordinator at BanklessDAO, an Associate at Bankless Consulting, and is still a DAOpunk.