I followed the CoinCashew guide to set up things for the topology update work. I have been comparing the CoinCashew directions with the GuildOperator guild-operators topologyupdater readme and I’d like to make sure I have things set up properly on my relay nodes.
Here is my understanding of how CoinCashew directions work.
They have 2 script files: one script called topologyUpdater.sh that publishes your relay node information to the centralized list of peers and another script called relay_topology_pull.sh which fetches the peer node information to update your mainnet-topology.json. Each of these scripts invokes a certain endpoint hosted at https://api.clio.one. I assume that IOHK is maintaining the API at https://api.clio.one to do the publish and fetching, respectively.
You need to run the topologyUpdater.sh script once per hour using CRON expression
The relay_topology_pull.sh should only be run after the topologyUpdater.sh script has run at least 4 times, but they don’t mention in the directions needing to re-run the relay_topology_pull script using a cron job.
With the GuildOperator script, they put both Topology Update push and fetch into the same script, and it looks like the default behavior is to run both push and fetch every time, once per hour. I may be wrong about that, but I’m not a shell scripting expert.
In the GuildOperator instructions they also say
it’s expected that you also add a scheduled restart of the relay node to pick up a fresh topology file fetched by topologyUpdater script with relays that are alive and well.
If I were to relate this instruction to the coin cashew instructions, I think I would need to set up a CRON expression to run the relay_topology_pull.sh script each day and then restart the node. However, they don’t show that in the CoinCashew instructions unless I missed it. It appears they are suggesting to just run the script manually, but then you won’t be getting updates to the peers.
Should I add another CRON job to call relay_topology_pull.sh once per day and do a restart of the relay node? If I should, would I need to create a wrapper script that calls relay_topology_pull.sh and then do the systemctl restart?