Limiting peers reduces the bandwidth used by Pantheon. It also reduces the CPU time and disk access used to manage and respond to peers.
--max-peers command line option to reduce
the maximum number of peers. The default is 25.
Static nodes are configured nodes that remain connected rather than nodes connected through P2P discovery. Static nodes attempt to maintain connectivity. If a connection goes down to a static node, the node attempts to reconnect every 60 seconds.
To configure a network of static nodes:
static-nodes.jsonfile in the data directory of each node.
Start Pantheon with discovery disabled using
Runtime modifications of static nodes are not persisted between runs. The
is not updated by
Nodes outside of the static nodes are not prevented from connecting. To prevent nodes from connecting, use Permissioning.
If the added peer does not appear in the peer list (returned by
check the supplied enode URL is correct, the node is running, the node is listening for
TCP connections on the endpoint, and has not reached the maximum number of peers.
[ "enode://email@example.com:30303", "enode://firstname.lastname@example.org:30304" ]
Each node has a
static-nodes.json file. We recommend each node in the network has the same
Monitoring Peer Connections
JSON-RPC API methods to monitor peer connections include:
The default logging configuration does not list node connection and disconnection messages.
To enable listing of node connection and disconnection messages, specify the
--logging command line option
For more verbosity, specify
The console logs connection and disconnection events when the log level is
DEBUG or higher.
Successfully accepted connection from ... is displayed, connections are getting through the firewalls.
Example log output
2018-10-16 12:37:35.479-04:00 | nioEventLoopGroup-3-1 | INFO | NettyP2PNetwork | Successfully accepted connection from 0xa979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c
Limiting Remote Connections
In private networks with a level of trust between peers, enabling the remote connection limits is unnecessary and disabling may increase the speed at which nodes can join the network.