Full Node Synchronization

Introduction

The full-node high-speed synchronization service realizes low-latency synchronization of Ethereum client based on high-performance networks. Users' Ethereum client can directly establish P2P connections with Relay in nearby areas. Different from subscribing to block data streams, the full-node high-speed synchronization service synchronizes the latest blocks to the user's Ethereum client through P2P network. Users can obtain the latest block events and world state in the first time.

Rate Limit

Tier3Tier2Tier1

Number of full nodes allowed to connect

-

2

5

Instruction

Step1: Open ports to allow Relay access

If your Ethereum client is deployed on AWS or other cloud services, you should additionally configure inbound rules for the security group.

  1. Access your own Ethereum client's server and execute commands to set up the firewall to allow Relay access.

sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="52.205.173.134" port port="30311" protocol="tcp" accept'
  • "source address" is the IP of Relay which can be acquired from High-performance Network Service

  • The port for the Ethereum client to allow Relay access is generally set as the default, which is 30311. You can modify this based on your own node configuration.

  1. Reload the firewall configuration to make the changes take effect.

sudo firewall-cmd --reload

Step2: Add enode

  1. Go to https://www.blockrazor.io, click [Register] in the upper right corner to complete the registration

  2. Log in to the Portal, go to [Service] - [Full Node Synchronization Service], click [Add]

  1. Select the region where Relay is located (it is recommended to select the region closest to the geographical location of your Geth node), enter the Enode of the Ethereum client that needs to be connected, and click [Confirm] to complete the addition.

Step3:Set Relay as a Trusted Node (using Geth node as an example).

To ensure continuous connection between the Geth node and Relay, it is recommended to add the Relay Enode in the Geth node's config.toml file.

  1. In the config.toml file, find the TrustedNodes field in Node.P2P and add the Relay Enode obtained in step 2

[Node.P2P]
TrustedNodes = ["enode://b5b4e5aa8d8f4568af755af6da0d4642b6475d8d87c3470632bdecab8f54e4e2936ec8ae0d6f34cff8b052235e81a281912c17dfcdbf40d6d3c281b78ada4134"]
  1. Restart the Geth node, specify config.toml to start, --config config.toml

Note: You can also use JSON RPC to add Relay as a trusted node, for details, please refer to the official documentation.

Step4: Check the connection status(Enable the admin namespace in the Geth node as an example)

  1. Wait for 10 minutes, access the Geth node, execute the curl command to check the connection status

curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"admin_peers","params":[],"id":1}' http://localhost:8545

  1. In the returned data, query the Relay Enode address (which can be copied from the Portal). If the address is found, it proves that the connection is successful.

[
    {
        "enode": "enode://9ddacbcca0dc1d1b112d470552acc795fce5c3e9f50983fcd5cee7b47289914295acaef3163bea819bcc967461978425def13595deb7de4063295c40e593f320@52.205.173.134:53754",
        "id": "8be29a75ac2cf81e3aa37ccc119630a9dfc43c88d7b5200398a466f5ef9097c4",
        "name": "Geth/v1.4.5/linux-amd64/go1.21.7",
        "caps": [
            "eth/68"
        ],
        "network": {
            "localAddress": "127.0.0.1:30311",
            "remoteAddress": "52.205.173.134:53754",
            "inbound": true,
            "trusted": false,
            "static": false
        },
        "protocols": {
            "eth": {
                "version": 68
            }
        }
    }
]

If the connection status is found to be abnormal after inquiry, it may be due to network communication problems between nodes. Please go to Discord to contact us.

Last updated