Customize PFN Networks
Last updated
Was this helpful?
Last updated
Was this helpful?
When running a PFN, you can configure your node’s network connections for a few different purposes. For example, you can add a seed peer to your node’s configuration to connect your node to a specific peer of your choosing. Or you can leverage a static network identity for your PFN to allow other nodes to connect to you, as described in .
This document outlines how to configure the network of your PFN for different use cases, including:
Allowing nodes to connect to your PFN.
Connecting your PFN to seed peers.
Configuring priority access for other PFNs.
Configuring your PFN as a private PFN.
Once you start your PFN with a static identity you can allow others to connect to your PFN:
Make sure you open the TCP port of the network you wish to allow external connections on (e.g., 6180
or 6182
). This is required to allow other nodes to connect to your PFN.
If you are using Docker, simply add - "6180:6180"
or - "6182:6182"
under ports in your docker-compose.yaml
file.
Share your PFN static network identity with others. They can then use it in the seeds
key of their node’s configuration file to connect to your PFN. See the section below.
Make sure the port number you put in the addresses
matches the one you have in the PFN configuration file (for example, 6180
or 6182
).
The snippets below show the configuration file entries and format for allowing other nodes to connect to your PFN. The format of each seed peer entry should have a unique peer_id
, list of addresses
, and a role
:
docker-compose.yaml
For example:
docker-compose.yaml
To add seed peers to your PFN, the seed peers’ addresses should be added to your PFN configuration file, under the seeds
key in the public network configuration. Each seed peer entry should have a unique peer_id
, list of addresses
, and a role
(e.g., Upstream
). The snippet below shows an example of a configuration file with seed peers manually added:
To configure your PFN to allow other nodes to connect to it even when your PFN has hit the maximum number of available network connections, follow this method:
In the configuration file for your PFN add the other node as a seed peer with the Downstream
role. This will allow the other node to connect directly to you with priority access. For example:
Similarly, to make the other node dial out to your PFN, add the following to the other node’s configuration file:
You can also configure your PFN as a private PFN should you wish. What this means is that your PFN will not allow unauthenticated connections, specifically, any node that is not a validator, VFN or seed peer will be unable to connect to your PFN.
To configure your PFN as a private PFN, add the following to your PFN configuration file. Note, you should add this to the public network entry in the full_node_networks
configuration: