Your Berachain RPC Guide
What RPC services are available on Berachain & Other Common RPC Questions
At Berachain, we often get a lot of questions regarding RPC services and what is offered. We’ll dive into different nuance of RPC services that developers can leverage with Berachain’s current V2 bArtio Testnet.
Is Berachain V1 Artio Still Active?
As of June 2024, Berachain V1 Artio has been deprecated in favour of Berachain V2 bArtio. If you’d like to read about the new architecture, check out the article written by Berchain’s CTO Dev Bear:
What Are Some Free RPC Providers?
For the main Berachain RPC, we recommend using https://bartio.rpc.berachain.com.
Berachain bArtio Networking Configuration:
Network:
Berachain bArtio
RPC URL:
https://bartio.rpc.berachain.com/
Chain ID:
80084
Currency Symbol:
BERA
Block Explorer URL:
https://bartio.beratrail.io/
There is also a growing list of free RPC providers being listed on ChainList, but please remember that these have not been endorsed by Berachain.
Additionally, QuickNode, Nirvana Labs, Alchemy all offer private RPC endpoints that come with generous free tiers.
What Are The Rate Limits On Public RPC Providers?
With https://bartio.rpc.berachain.com these are the current rate limits, but please note that these may be subject to change at any time.
Requests Per Second:
50
Requests Per Minute:
2000
Request Per Day:
100000
Does Berachain Offer Websocket Services (WSS)?
Berachain does offer WebSocket services through RPC providers like QuickNode, Nirvana Labs, and Alchemy. These are dedicated private endpoints and require users to sign up for each of these accounts.
Does Berachain Offer WSS Through The Public RPC?
At this time, Berachain does not offer public Websocket Services.
Do You Need Websocket Services?
Unless your team is doing high frequency trading or has tight time constraints (real-time updates) on ingesting chain data to the second, a common recommendation is to setup a polling strategy to retrieve the data.
Polling: involves the client making regular requests to the server at fixed intervals to check for updates.
Are debug
RPC Method Requests Available?
As debug
RPC methods are not always typical, Berachain’s public RPC does not offer this but can offer it through other RPC providers.
Nirvana Labs
Nirvana under their free tier does offer debug
.
Example Debug Request:
curl --location 'https://berachain.nirvanalabs.xyz/YOUR-NODE-NAME?apikey=YOUR-NIRVANA-API-KEY' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": [
"0xead913400b737358b6d6ad909fcc43b697c63ecd9895cc2fe4a41efd572bf12a"
],
"id": 86
}'
QuickNode
QuickNode offers trace
and debug
under their Scale or Build plans.
Other Options
The other option would be to run your own full node — more details below.
Do RPC Providers Offer Unprotected (non-EIP155 signed) Transactions?
This is an edge-case that is occasionally requested from builders, and is not something that the Berachain Public RPC and other RPC providers offer.
For this case, we recommend running a full node (with Geth, Reth, etc) allowing for unprotected transactions.
More details on how to run a node below.
Does Berachain RPCs Offer An NFT API Data Endpoints?
Currently, we don't have any offering for NFT RPC API endpoints or RPC methods with our current RPC providers. This may change in the future.
As an alternative, NFT API endpoints are currently offered through some other providers.
Routescan (Beratail Block Explorer)
Routescan as Berachain's main block explorer offers APIs to get specific wallet holdings, including NFTs.
Example Curl Request
curl --location 'https://api.routescan.io/v2/network/testnet/evm/80084/address/0xb7AE5De3e843a26Ca764605f6Bec916701f88556/erc721-holdings';
Reservoir
Reservoir is a one-stop place to get all things related to NFT data and trading.
It offers an endpoint to retrieve all NFTs related to a wallet address on Berachain V2 bArtio Testnet.
Example Curl Request
# BASE API URL: https://api-berachain-testnet.reservoir.tools/
curl --location 'https://api-berachain-testnet.reservoir.tools/users/0xWALLE_ADDRESS/tokens/v6' \
--header 'x-api-key: <YOUR-RESERVOIR-API-KEY>'
For more details on the endpoint, check out their docs on getUsersUserTokens.
Running A Node & Should I Run A Full Node?
Two of the major factors that go into running a node are knowledge of maintenance and/or costs.
Expertise Concerns
Berachain also has a simple guide to get started and understand how to run a full node. https://docs.berachain.com/nodes/quickstart.
If this is a bit beyond your expertise, with binary updates and maintaining your server, then we definitely recommend an RPC Provider like QuickNode, Alchemy, or Nirvana.
Cost Concerns
Cost may also be a concern when running your own full node, especially if it’s an archive node which requires more hard drive space.
The system requirements for running the BeaconKit consensus client and an execution client (such as Reth or Geth) are as follows for each (these specs times two):
OS: Linux / MacOS
CPU Architecture: AMD64 or ARM64 / ARM64 Darwin
CPU: 4 Physical Cores
RAM: 24GB
Storage: 500GB
Note: that the hard drive requirements may increase over time as the network grows.
To give context, an AWS c5ad.8xlarge
instance with 32vCPUs, 64gb RAM, and 2 x 600 NVMe SSD, in us-east-2
can cost about $486.18 USD
per month (see AWS Pricing Calculator).
On the other hand, if you have more knowledge on how to configure a dedicated server, you may be interested in looking at Hetzner as an option.
Still Want To Run a Full Node?
If the cost or expertise doesn’t concern you, then head over to the Berachain Docs Quickstart: Run A Node.
Can I Run A Validator Node?
Due to the high demand for Berachain V2 bArtio Testnet, we are no longer accepting applications for Testnet.
We welcome interested validators to run a node when Berachain Mainnet launches.
Are RPC Services Down?
If you’re seeing that blocks are not showing up on our Beratrail Block Explorer, it may be more related to the Block Explorer rather than the RPC.
If you can run the following cURL request and the block number changes, then the RPC service should be working.
curl --location 'https://bartio.rpc.berachain.com' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc":"2.0",
"method":"eth_blockNumber",
"params":[],
"id":84
}'
# [Expected Similar Output]:
# {
# "jsonrpc": "2.0",
# "id": 84,
# "result": "0x1ce748" // <----- THIS WILL CHANGE
# }
If you are not getting the following result, try using a VPN for a different region to rule out if it’s region outage.
How Do I Report An Error/Bug?
If you encounter an error with Berachain RPC services, the best way we can help is with reproducible steps, which can include:
- What region are you making your RPC requests from and have you tested it under a different region with a VPN?
- How many requests are you trying to make over what time span and is it within the public RPC endpoint limit (see above)?
- What does your HTTP request look like and is it consistently happening? (Ex: RPC method, params, url, api key, etc)
- Is it a debug or pre-EIP-155 request? (See above)
- What is the expected behaviour and the unexpected result (Ex: Error message, logs, etc)?
- How are you making the request? Is it cURL, an SDK, HTTP Client, backend service, frontend service, chrome extension, etc? Have you tried other methods of performing the request to rule out if it’s a specific SDK issue?
- If possible, can you share your contract code in a code snippet like GitHub Gist?
- Any screenshots are also appreciated, but please also paste any wallet or transaction hashes to make it easier to copy and reproduce.
Once you have most of this information, please feel free to send us a message in our Discord Server or Telegram group.
What’s Next?
Get some Testnet $BERA
tokens from the Berachain Faucet and start building
❤️ Don’t forget to show some love for this article 👏🏼.