Recommended Peer Settings for Mainnet Nodes

There have been many reports of peering issues for heimdall and bor in the last few days. If you are already running nodes, please update your configuration to include these new settings.

Heimdall:

Config file location (default): /var/lib/heimdall/config/config.toml

Config file location (based on your heimdall-home): <heimdall-home>/config/config.toml

Sentry/Archive Node:

[p2p]

# Maximum number of inbound peers
max_num_inbound_peers = 100
[p2p]

# Maximum number of outbound peers to connect to, excluding persistent peers
max_num_outbound_peers = 100
[p2p]

# Comma separated list of seed nodes to connect to
seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"

For external_address, please provide the IP of your external address This needs to be changed in sentry node

[p2p]

external_address = "<node-external-ip>:26656"

Validator Node:

[p2p]

# Comma separated list of seed nodes to connect to
seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
[p2p]

# Maximum number of outbound peers to connect to, excluding persistent peers
max_num_outbound_peers = 50
[p2p]

# Maximum number of inbound peers
max_num_inbound_peers = 50

Also, in the following settings, the node id of all the sentries should be put in the validator node and the node id of the validator should be put in the sentry nodes. This makes sure to have a persistent connection between the sentry and validator

[p2p]

# Comma separated list of nodes to keep persistent connections to
persistent_peers = ""

Bor:

Config file location (default): /var/lib/bor/config.toml

Others : <bor-home>/config.toml

Sentry/Archive Node:

[p2p]
maxpeers = 50

[p2p.discovery]
bootnodes = ["enode://76316d1cb93c8ed407d3332d595233401250d48f8fbb1d9c65bd18c0495eca1b43ec38ee0ea1c257c0abb7d1f25d649d359cdfe5a805842159cfe36c5f66b7e8@52.78.36.216:30303", "enode://b8f1cc9c5d4403703fbf377116469667d2b1823c0daf16b7250aa576bacf399e42c3930ccfcb02c5df6879565a2b8931335565f0e8d3f8e72385ecf4a4bf160a@3.36.224.80:30303", "enode://8729e0c825f3d9cad382555f3e46dcff21af323e89025a0e6312df541f4a9e73abfa562d64906f5e59c51fe6f0501b3e61b07979606c56329c020ed739910759@54.194.245.5:30303", "enode://681ebac58d8dd2d8a6eef15329dfbad0ab960561524cf2dfde40ad646736fe5c244020f20b87e7c1520820bc625cfb487dd71d63a3a3bf0baea2dbb8ec7c79f1@34.240.245.39:30303"]

Validator Node:

[p2p]
maxpeers = 20

[p2p.discovery]
bootnodes = ["enode://76316d1cb93c8ed407d3332d595233401250d48f8fbb1d9c65bd18c0495eca1b43ec38ee0ea1c257c0abb7d1f25d649d359cdfe5a805842159cfe36c5f66b7e8@52.78.36.216:30303", "enode://b8f1cc9c5d4403703fbf377116469667d2b1823c0daf16b7250aa576bacf399e42c3930ccfcb02c5df6879565a2b8931335565f0e8d3f8e72385ecf4a4bf160a@3.36.224.80:30303", "enode://8729e0c825f3d9cad382555f3e46dcff21af323e89025a0e6312df541f4a9e73abfa562d64906f5e59c51fe6f0501b3e61b07979606c56329c020ed739910759@54.194.245.5:30303", "enode://681ebac58d8dd2d8a6eef15329dfbad0ab960561524cf2dfde40ad646736fe5c244020f20b87e7c1520820bc625cfb487dd71d63a3a3bf0baea2dbb8ec7c79f1@34.240.245.39:30303"]

Ideally, if you’re following the sentry <> validator architecture (i.e. validator is only connected to sentry and sentry is connect to the rest of the world), the configs given below are recommended.

  1. The validator node should have the sentry added as the static node. Having this will make sure that the validator always stays connected to sentry.

    [p2p.discovery]
    static-nodes = ["<sentry-ip>:<sentry-p2p-port>"]
    
  2. The sentry node should have validator added as the trusted node. Having this will make sure that sentry always has the capacity to accommodate validator in it’s peer set.

    [p2p.discovery]
    trusted-nodes = ["<validator-ip>:<validator-p2p-port>"]
    
2 Likes

bor service sync very slow what’s the reason… Even my heimdall is on 1.0.2v and bor is on 1.0.6v

Will doing this resolve the issue described here? Heimdall intermittent sync issue

Edit: looks like if I modify /etc/hosts and insert

0.0.0.0 localhost and comment out
#127.0.0.1 localhost it worked

What do you mean by external_address? We are running a full node heimdall and bor on GCP, does this section apply to us?

It is the address to advertise to peers for them to dial. If empty, will use the same port as the laddr, and will introspect on the listener or use UPnP to figure out the address. You can leave it empty.

external_address = ""

or you can input IP addr of your own machine :

external_address = "<node-external-ip>:26656"