Topology updater on testnet is adding mainnet peers to my relay

Hi, am actually running my nodes on testnet using topology updater. But can see the topology updater is adding both testnet an mainnet relays too. When I check the log of my node, there are many errors related to mainnet nodes. Any ideas how to solve?

Log from my cardano-node:
Feb 09 00:58:20 ADARelay bash[236348]: [ADARelay:cardano.node.DnsSubscription:Notice:4728] [2021-02-08 23:58:20.09 UTC] Domain: “relays-new.cardano-mainnet.iohk.io” Co>
Feb 09 00:58:20 ADARelay bash[236348]: [ADARelay:cardano.node.DnsSubscription:Error:4728] [2021-02-08 23:58:20.10 UTC] Domain: “relays-new.cardano-mainnet.iohk.io” App> <<<<<<<<<<<<<<<<<<, mainnet relays
Feb 09 00:58:20 ADARelay bash[236348]: [ADARelay:cardano.node.ErrorPolicy:Notice:67] [2021-02-08 23:58:20.10 UTC] IP 52.57.223.108:3001 ErrorPolicySuspendConsumer (Jus>
Feb 09 00:58:20 ADARelay bash[236348]: [ADARelay:cardano.node.DnsSubscription:Warning:70] [2021-02-08 23:58:20.11 UTC] Domain: “relays-new.cardano-mainnet.iohk.io” Fai> <<<<<<<<<<<<<<<<<<<<<< same
Feb 09 00:58:23 ADARelay bash[236348]: [ADARelay:cardano.node.ChainDB:Notice:50] [2021-02-08 23:58:23.31 UTC] Chain extended, new tip: e4026cd02e219be188ef7067a1febe91>
Feb 09 00:58:30 ADARelay bash[236348]: [ADARelay:cardano.node.DnsSubscription:Notice:4736] [2021-02-08 23:58:30.08 UTC] Domain: “relays-new.cardano-mainnet.iohk.io” Co>
Feb 09 00:58:30 ADARelay bash[236348]: [ADARelay:cardano.node.DnsSubscription:Notice:4736] [2021-02-08 23:58:30.09 UTC] Domain: “relays-new.cardano-mainnet.iohk.io” Co>
Feb 09 00:58:30 ADARelay bash[236348]: [ADARelay:cardano.node.DnsSubscription:Error:4736] [2021-02-08 23:58:30.10 UTC] Domain: “relays-new.cardano-mainnet.iohk.io” App>
Feb 09 00:58:30 ADARelay bash[236348]: [ADARelay:cardano.node.ErrorPolicy:Notice:67] [2021-02-08 23:58:30.10 UTC] IP 52.57.223.108:3001 ErrorPolicySuspendConsumer (Jus>


toplogy updater setup:
cat topologyUpdater.sh
^#!/bin/bash
#shellcheck disable=SC2086,SC2034

USERNAME=myusername /////// not sharing my real username here //////
CNODE_PORT=6000 # must match your relay node port as set in the startup command
CNODE_HOSTNAME=“CHANGE ME” # optional. must resolve to the IP you are requesting from
CNODE_BIN="/usr/local/bin"
CNODE_HOME=/home/myusername/cnode
CNODE_LOG_DIR="/home/myusername/cnode/logs"
GENESIS_JSON="/home/myusername/cnode/config/testnet-shelley-genesis.json"
NETWORKID=$(jq -r .networkId GENESIS_JSON) <<< getting from genesis json config CNODE_VALENCY=1 # optional for multi-IP hostnames NWMAGIC=(jq -r .networkMagic < $GENESIS_JSON)


testnet JSON config file > latest ver. downloaded from Cardano Configurations :
cat testnet-shelley-genesis.json
{
“activeSlotsCoeff”: 0.05,
“protocolParams”: {
“protocolVersion”: {
<>
“updateQuorum”: 5,
“networkId”: “Testnet”, <<<<<<<<<<<<<<<<<<<<<<< networkId set to testnet
“initialFunds”: {},
“maxLovelaceSupply”: 45000000000000000,
“networkMagic”: 1097911063,
“epochLength”: 432000,
“systemStart”: “2019-07-24T20:20:16Z”,
“slotsPerKESPeriod”: 129600,
“slotLength”: 1,
“maxKESEvolutions”: 62,
“securityParam”: 2160
}


topology file:
cat testnet-topology.json
{ “resultcode”: “402”, “datetime”:“2021-02-07 01:36:07”, “clientIp”: “79.143.178.65”, “iptype”: 4, “msg”: “IP is not (yet) allowed to fetch this list”, “Producers”: [ { “addr”: “<>”, “port”: 6000, “valency”: 2 },
{ “addr”: “relays-new.cardano-testnet.iohkdev.io”, “port”: 3001, “valency”: 2 },
{ “addr”: “relays-new.cardano-mainnet.iohk.io”, “port”: 3001, “valency”: 2 } ] } <<<<<<<<< mainnet nodes

Any ideas how to fix that?

Hi rafek47! I suppose you’ve followed the CoinCashew tutorial. I’m no expert but ran into your problem as well. Either IOHK or CoinCashew screwed up with the DNS address.

It’s not
relays-new.cardano-mainnet.iohk.io BUT
relays-new.cardano-testnet.iohkdev.io (note the missing dev after iohk and testnet instead of mainnet).

Solution:

update your testnet-topology.json to look like THIS.

You can find all the official config files here.

I hope it will help, don’t hesitate to come back if this doesn’t solve it.

Cheers!

Hi blambow
Sure i did it manually and changed to testnet domains, but I did not know how to do it in topology updater, which of course overwrited it everytime, even when i have set testnet in topology updater.
I have switched to mainnet, so this was solved for me this way.

1 Like

Running into the same issue. Has anyone figured out how to configure topologyudater.sh to run on testnet?

1 Like