Skip to content
This documentation is in beta, and we’re looking for feedback. See how you can contribute 🌟

Self-hosted nodes

Overview

This page outlines the changes affecting existing and new node operators running their own JSON-RPC API services:

  • RPC API node software changes from Hyperledger Besu to Polygon Edge
  • JSON-RPC API call differences

System requirements

The system requirements for your node may vary from what was required for Hyperledger Besu. Please refer to the following which outlines the minimum and recommended specs for running the Polygon Edge node client:

ComponentMinimum RequirementRecommended
Processor4-core CPU8-core CPU
Memory8 GB RAM16 GB RAM
Storage200 GB SSD [1]1 TB SSD
NetworkHigh-speed internet connectionDedicated server with gigabit connection

[1] As of August 2023, Palm Mainnet currently requires 150 GB of storage, so the minimum storage requirement may need to be adjusted accordingly

JSON-RPC API changes

A full list of changes can be found here

Installation

  • Install Go at version 1.20 from https://go.dev/dl/ (1.21 is not currently compatible)
  • Clone the repo here https://github.com/gateway-fm/polygon-edge
  • Check out the branch palm-migration
  • At the root of the repo run make build
  • You now have a binary called polygon-edge at the root of the repo
  • Copy this file where you plan to run the node
  • Create a new empty directory that will serve as the data-dir for the node
  • Copy the genesis file for the relevant network to your data-dir and name it genesis.json.
  • Genesis files can be found in the repo in the root folder called genesis-XXXX.json

To prepare your environment for running the node you will need to ensure the following ports are configured. If you run other node software within the same subnet (e.g. to support other chains) you may need to update the default ports below so that your node has exclusive use of them.

  • 8545 - JSON RPC - can be left closed if you don’t intend on exposing the RPC

  • 9632 - GRPC (for intercommunication between the validators) - this will need to be open for validators although an IP whitelist configured at the firewall level is recommended

  • 30302 - devp2p port - needs to be open to join the old Besu network

  • 30301 - libp2p port - needs to be open to allow discovery on the libp2p network

  • 30401 - egress needed to communicate with the Besu node (better yet, have all egress available as this port could change)

Operating your node

Once you have followed the steps above in the installation section you can run the following to create keys for your node.

Terminal window
./polygon-edge polybft-secrets --insecure --data-dir="/path/to/your/datadir"

Now run the following to start the node. This will start up the server, join the devp2p network / libp2p network depending on being pre/post the fork point, and start syncing.

Terminal window
./polygon-edge server --data-dir=/path/to/your/datadir --chain=/path/to/your/genesis.json --libp2p "0.0.0.0:30301" --devp2p "0.0.0.0:30302" --jsonrpc="0.0.0.0:8545" --grpc-address="0.0.0.0:9632"

Monitoring the latest block and checking the timestamp to determine how far behind your node is can be useful to see if block production has halted for any reason and prompt an investigation into the node. There is also a healthcheck endpoint to ensure that the node is alive available at http://your-address:8545/health a GET request to this endpoint will return a status 200 response with a body of OK if the node is healthy.

Upgrading the version of Polygon Edge is a simple procedure. Build the new binary and replace the existing version with this new binary and restart the node with the same flags as before.