Skip to content

RPC Node Configurations

These nodes expose endpoints that enable reading from & writing to a chain. These nodes track the blockchain history without participating in network consensus. The RPC endpoint enables you to send queries to the node to read from contracts or submit transactions, whereas the websocket (WS) endpoint enables you to subscribe to a websocket to receive a data stream of the transactions being sent on the network.

How to run an RPC node

Configuring the node as an RPC and/or WS node is straightforward, but will be slightly different from setups for RPC / WS endpoints on both Cosmos and Ethereum if you're familiar with those.

Configuration Options

WARNING

Berachain only supports the default configuration currently. The below options will be customizable in the future.

RPC Configuration Options

  • Port
    • Default: 8545
  • Supported namespaces
    • Default: eth, web3, net, txpool, and debug

WS Configuration Options

  • Port
    • Default: 8546

As a developer, why should I run an RPC node?

Running an RPC node is a great way to create a more performant application and provide a better user experience. Remember that RPC nodes can be used at a few different points throughout your application, most notably:

  • When users send transactions through your dapp
  • When your website queries information from the chain
  • When running any off-chain service as part of your dapp

Public RPC endpoints are great for bootstrapping your application, but have rate limits and handle many requests from all the users on the network. By using your own private RPC node, you can ensure that your transactions are executed as quickly as possible. This includes querying the chain for data to display on your frontend.

Even if you don't want to run your own RPC node, it's worth evaluating different node providers to see if they can meet your needs.