How do I change my RPC? -
It's possible that some RPC requests sent to unstable blockchain nodes may fail or time out. An RPC is your way to connect to the network; your choice of route to access the blockchain. If you are experiencing slow operation of your default RPC provider, then it is recommended to try changing the RPC.
To change your RPC you can search Chainlist for the public RPC endpoints for all EVM networks. Socket is not responsible for the RPC provider you choose, so ensure you trust the provider. It's also worth noting that some public RPCs collect your confidential data.
How can I create my own RPC endpoint? -
Since the public node provider has rate limits and doesn't allocate dedicated resources to each user, sometimes it can become congested during periods of heavy traffic
The best way to move during network congestion may be to use a private RPC endpoint. A private RPC endpoint is an individual, unique URL that only the owner can use to submit transactions to the public mempool.
There are lots of PPC providers for each network. You can visit https://github.com/arddluma/awesome-list-rpc-nodes-providers to check if the RPC provider supports your desired network and then refer to the official documentation.
In this article, we will show you how to create your own RPC endpoint. You can follow these steps to create your own RPC endpoint for any chain, however, we're creating one for Optimism as an example.
Guide to Setting Up Your Own RPC for Optimism
Step 1: Sign up with Alchemy
To get started, you'll need to have an Alchemy account. Visit the Alchemy website and click on “Sign Up” or log into your existing account.
You will be asked to enter your name, email address, and create a password. After that, verify your email address by clicking the link sent to your inbox.
Step 2: Create an App & Get Your Endpoint
Once you have registered, you will be taken to your personal dashboard. Hover your mouse over "Apps" and select "Create app".
Enter any random name in the "NAME" field and select the Optimism in the "CHAIN" field.
Then click on "View Key" to retrieve the HTTP endpoint. Copy this URL to use in the next step. This is the key to your personal RPC that is unique to you.
Step 3: Add a new network to your wallet
To connect your private RPC endpoint to your wallet, you'll need to add a new network. We will use Metamask as an example. Open Metamask and click on your account. Then go to Settings → Network → Add a network → Add a network manually. You will be taken to a page requesting details like Network Name, RPC URL, Chain ID and Currency Symbol. The Blockchain Explorer field is optional and can be left blank.
Call it something like "Alchemy - Optimism", and enter the HTTP link from Step 2 for the New RPC URL. Then, you'll need to enter the Chain ID (10), Currency Symbol (ETH), and Block Explorer URL (https://optimistic.etherscan.io). Upon successful addition of the network, you need to switch to Optimism (Alchemy), to use your own private RPC endpoint.
Woohoo! You have successfully set up your own private RPC for Optimism. With a private endpoint, you'll be able to bypass the public RPC and increase your productivity!
Happy bridging and have fun 🚀
Need more help with a specific transaction? Let us know via Discord or by submitting a ticket and we'll be happy to help!
Guide created with love by Caramel [OC] ❤