Static Nodes, Trusted Nodes, and Boot Nodes - Expanse

Static Nodes, Trusted Nodes, and Boot Nodes

  1. Home
  2. Docs
  3. Developer
  4. Static Nodes, Trusted Nodes, and Boot Nodes

Static Nodes, Trusted Nodes, and Boot Nodes

Static Nodes, Trusted Nodes, and Boot Nodes

 

Gexp supports a feature called static nodes if you have certain peers you always want to connect to. Static nodes are re-connected on disconnects. You can configure permanent static nodes by putting something like the following into <datadir>/static-nodes.json (this should be the same folder that your chaindata and keystore folders are in)

[
     “enode://f4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de10[email protected]33.4.2.1:30303”,
     “enode://[email protected]:port”
]

You can also add static nodes at runtime via the Javascript console using admin.addPeer()

> admin.addPeer(“enode://f4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de10[email protected]33.4.2.1:30303”)

Common problems with connectivity

Sometimes you just can’t get connected. The most common reasons are:

  • Your local time might be incorrect. An accurate clock is required to participate in the Expanse network. Check your OS for how to resync your clock (example sudo ntpdate -s time.nist.gov) because even 12 seconds too fast can lead to 0 peers.
  • Some firewall configurations can prevent UDP traffic from flowing. You can use the static nodes feature or admin.addPeer() on the console to configure connections by hand.

To start gexp without the discovery protocol, you can use the –nodiscover parameter. You only want this if you are running a test node or an experimental test network with fixed nodes.

Articles

Tags ,
Was this article helpful to you? Yes No

How can we help?

Come talk to us on Discord