Configuring network topology is a critical step as skipping this step will result in your minted blocks being orphaned by the rest of the network.
Credits to GROWPOOL for this addition and credits to Guild Operators on creating this process.
How the Legacy Topology API works
Your relay node pings an API server.
When the API server is convinced that your relay node is stable and is actually a running Cardano node, based on the ability to report the current block number accurately a number of times over a period of time, then the domain name or IP address of your node is automatically added to a list of other nodes that have been vetted similarly for quality and stability.
When your relay node is on the list, the relay node can request from the API server a list of other active Cardano nodes with which your node can synchronize in order to participate in the network of nodes as a peer. Also, the domain name or IP address of your relay node is distributed on lists that other active Cardano nodes may request from the same API server. NOTE: Other nodes refreshing their list of peer nodes with a list that may include the domain name or IP address of your relay node is dependent on how often other nodes request an updated list from the API server. Request an updated list of nodes from the API server for your relay regularly so that your list of peers remains accurate.
In order to stay on the list of active nodes, your relay node must ping the API server once every hour. If your relay node stops pinging the API server, then your relay node is removed from the list of active nodes after three hours.
Credits for the high level explanation: Paradoxical Sphere - Change (CHG) Cardano Stake Pool Operator
Create the topologyUpdater.sh
script to publish your node information to a topology fetch list.
Add permissions and run the updater script.
When the topologyUpdater.sh
runs successfully, you will see
{ "resultcode": "201", "datetime":"2020-07-28 01:23:45", "clientIp": "1.2.3.4", "iptype": 4, "msg": "nice to meet you" }
Every time the script runs and updates your IP, a log is created in $NODE_HOME/logs
Add a crontab job to automatically run topologyUpdater.sh
every hour on the 33rd minute. You can change the 33 value to your own preference.
After four hours and four updates, your node IP will be included in the topology fetch list.
Complete this section after four hours when your relay node IP is included in the legacy network topology fetch list.
Create relay-topology_pull.sh
script which fetches your relay node buddies and updates your topology file. Update with your block producer's IP address.
Add permissions and pull updated topology files.
Weekly, Cardano Explorer publishes a current list of IP addresses and ports for all relay nodes registered on the Cardano blockchain in a topology.json
file.
To implement the updated topology, restart your stake pool.
Don't forget to restart your relay nodes after every time you fetch topology!
All other keys must remain offline in your air-gapped offline cold environment.
Congratulations! Your stake pool is included in the legacy network topology and ready to produce blocks. When you finish testing that your stake pool successfully produces blocks, consider future-proofing your stake pool and Enabling Peer-to-peer Network Topology.
Critical Key Security Reminder: The only stake pool keys and certs that are required to run a stake pool are those required by the block producer. Namely, the following three files.
Relay Node Security Reminder: Relay nodes must not contain any operational certifications
, vrf
, skey
or cold
` ``` keys.