Is it correct that my block producer is connected to all this peers?

Hi guys, i’ve just setted up both the block producer and the relay. I’m following the coincashew guide, i’ve setted everything until the gLiveView.sh, but i would like to know if it is correct that my producer is connected to all this peers.
Producer:
block producerpng
relay:
relay

Both the blockchain are already synchronized, i’m in preview testnet.
And also it stay with Relay on top of gLiveView in my producer.

Hi,

  1. atm the BP is running as a relay not as a BP
  2. The BP should be connected only with the Relay (don’t run topology updater on BP, inside topology file add only the Relay and set the FW to allow inside connections only from Relay)

Cheers,

1 Like

As Alex wrote, your BP is not running as a BP. You probably did not configure correctly the vrf.skey (the VRF signing key), kes.skey (the KES signing key) and node.cert (the operational certificate), which are required on the BP as startup parameters.
Your BP should only connect to your relay. It is connecting to all those nodes because you did not delete the line:
"useLedgerAfterSlot": 322000
from the topology file. You should also delete the comma at the end of the previous line to make the JSON valid.

1 Like

Thank you, this line "useLedgerAfterSlot": 322000 was connecting me to other peers, removing it the block producer is connecting only to the relay

1 Like

Hi Alex, i’m running the topologyUpdater script into the relay node, but from the logs i can see this:

{ "resultcode": "201", "datetime":"2022-12-30 12:09:40", "clientIp": "censored", "iptype": 4, "msg": "nice to meet you" }
{ "resultcode": "504", "datetime":"2022-12-30 12:33:15", "clientIp": "censored", "iptype": 4, "msg": "one request per hour please" }
{ "resultcode": "504", "datetime":"2022-12-30 12:33:16", "clientIp": "censored", "iptype": 4, "msg": "one request per hour please" }
{ "resultcode": "203", "datetime":"2022-12-30 13:33:12", "clientIp": "censored", "iptype": 4, "msg": "welcome to the topology" }
{ "resultcode": "504", "datetime":"2022-12-30 13:33:17", "clientIp": "censored", "iptype": 4, "msg": "one request per hour please" }
{ "resultcode": "204", "datetime":"2022-12-30 14:33:04", "clientIp": "censored", "iptype": 4, "msg": "glad you're staying with us" }
{ "resultcode": "504", "datetime":"2022-12-30 14:33:05", "clientIp": "censored", "iptype": 4, "msg": "one request per hour please" }
{ "resultcode": "204", "datetime":"2022-12-30 15:33:05", "clientIp": "censored", "iptype": 4, "msg": "glad you're staying with us" }
{ "resultcode": "504", "datetime":"2022-12-30 15:33:19", "clientIp": "censored", "iptype": 4, "msg": "one request per hour please" }
{ "resultcode": "204", "datetime":"2022-12-30 16:33:09", "clientIp": "censored", "iptype": 4, "msg": "glad you're staying with us" }
{ "resultcode": "504", "datetime":"2022-12-30 16:33:13", "clientIp": "censored", "iptype": 4, "msg": "one request per hour please" }
{ "resultcode": "204", "datetime":"2022-12-30 17:33:11", "clientIp": "cendored", "iptype": 4, "msg": "glad you're staying with us" }

(i didn’t put all the lines from the logs, but are all the same of the posted)
I let the relay run whole the night, and i’ve tried yesterday and also this morning with the relay-topology_pull.sh and this is what i can see from the testnet-topology.json

{ "resultcode": "402", "datetime":"2022-12-31 11:44:48", "clientIp": "censored", "iptype": 4, "msg": "IP is not (yet) allowed to fetch this list",  "Producers": [   { "addr": "relays-new.cardano-testnet.iohkdev.io", "port": 3001, "valency": 2 } , { "addr": "relays-new.cardano-testnet.iohkdev.io", "port": 3001, "valency": 2 } ]  }

I’m not understanding why into the testnet-topology.json there isn’t my block producer node, and also there is still written “IP is not (yet) allowed to fetch this list”. In my topology.json there is the block producer IP. I’m in testnet Preview, i don’t know if maybe is for this reason.

Regards

Try from relay

telnet BP_IP port

U should see connected, if not check the FW rules

BTW, both nodes are 100% synced?

Yes, the connection with telnet it’s fine also the firewall i’ve checked and the connection is good.
But the topology.json is diffrerent from the one of the mainnet, and i maybe is for this reason?
It is this one:

curl -O -J https://book.world.dev.cardano.org/environments/preview/topology.json

https://developers.cardano.org/docs/get-started/running-cardano

Both the nodes are synced, i checked also on the explorer:
https://preview.cexplorer.io/

That means you are sending the heart-beat to topologyUpdater servers more often than once per hour. How does your cron job configuration look like?

“IP is not (yet) allowed to fetch this list”

There was a similiar issue before with the testnet and @werkof was able to resolve it for that specific user. Maybe try contacting @werkof .

I’m not understanding why into the testnet-topology.json there isn’t my block producer node,

When running the topologyUpdater pull script have you included your block producers IP into the topologyUpdater script. That is required when you solely depend on that script to make the final topology file. If you don’t include your producers Ip then you need to add it manually after the pull script is run.

But the topology.json is diffrerent from the one of the mainnet, and i maybe is for this reason?

I’m not sure I understand what your files look like. If possible please paste the contents here, and mask your IP addresses.
On the BP the topology file should include just the Relay.
The Relay’s topology includes your BP IP and other relays.

1 Like

Hi Mcrio, thanks for the answer.
The crontab:

cat crontab.txt
33 * * * * /home/uno/cardano-my-node/topologyUpdater.sh

I’m following the coincashew guide, for the topologyUpdater.sh i didn’t change anything except for the -4 in the last line, but before i tried also without the -4 with the same results.

#!/bin/bash
# shellcheck disable=SC2086,SC2034
 
USERNAME=uno
CNODE_PORT=6000 # must match your relay node port as set in the startup command
CNODE_HOSTNAME=""  # optional. must resolve to the IP you are requesting from
CNODE_BIN="/usr/local/bin"
CNODE_HOME=/home/uno/cardano-my-node
CNODE_LOG_DIR="${CNODE_HOME}/logs"
GENESIS_JSON="${CNODE_HOME}/shelley-genesis.json"
NETWORKID=$(jq -r .networkId $GENESIS_JSON)
CNODE_VALENCY=1   # optional for multi-IP hostnames
NWMAGIC=$(jq -r .networkMagic < $GENESIS_JSON)
[[ "${NETWORKID}" = "Mainnet" ]] && HASH_IDENTIFIER="--mainnet" || HASH_IDENTIFIER="--testnet-magic ${NWMAGIC}"
[[ "${NWMAGIC}" = "764824073" ]] && NETWORK_IDENTIFIER="--mainnet" || NETWORK_IDENTIFIER="--testnet-magic ${NWMAGIC}"
 
export PATH="${CNODE_BIN}:${PATH}"
export CARDANO_NODE_SOCKET_PATH="${CNODE_HOME}/db/socket"
 
blockNo=$(/usr/local/bin/cardano-cli query tip ${NETWORK_IDENTIFIER} | jq -r .block )
 
# Note:
# if you run your node in IPv4/IPv6 dual stack network configuration and want announced the
# IPv4 address only please add the -4 parameter to the curl command below  (curl -4 -s ...)
if [ "${CNODE_HOSTNAME}" != "CHANGE ME" ]; then
  T_HOSTNAME="&hostname=${CNODE_HOSTNAME}"
else
  T_HOSTNAME=''
fi

if [ ! -d ${CNODE_LOG_DIR} ]; then
  mkdir -p ${CNODE_LOG_DIR};
fi
 
curl -4 -s "https://api.clio.one/htopology/v1/?port=${CNODE_PORT}&blockNo=${blockNo}&valency=${CNODE_VALENCY}&magic=${NWMAGIC}${T_HOSTNAME}" | tee -a $CNODE_LOG_DIR/topologyUpdater_lastresult.json

After waiting 4 hours, when i ran the relay-topology_pull.sh :

#!/bin/bash
BLOCKPRODUCING_IP=192.168.1.56
BLOCKPRODUCING_PORT=6000
curl -s -o /home/uno/cardano-my-node/testnet-topology.json "https://api.clio.one/htopology/v1/fetch/?max=20&magic=1097911063&customPeers=::1|relays-new.cardano-testnet.iohkdev.io:3001:2"

Here below my topology.json file, i took it from the cardano developer page that i’ve linked in my previous comment.

{
  "LocalRoots": {
    "groups": [
      {
        "localRoots": {
          "accessPoints": [
{
            "address": "192.168.1.56",
            "port": 6000
          }
],
          "advertise": false
        },
        "valency": 1
      }
    ]
  },
  "PublicRoots": [
    {
      "publicRoots": {
        "accessPoints": [
          {
            "address": "preview-node.world.dev.cardano.org",
            "port": 30002
          }
        ],
        "advertise": false
      }
    }
  ],
  "useLedgerAfterSlot": 322000
}

I’ve seen some videos of other guys building their node in testnet and they use different link and also the file structure:

{
	"Producers": [
	  {
	    "addr": "<BlockProducingNodeIPAddress>",
	    "port": 6000,
	    "valency": 1
	  },
	  {
	    "addr": "relay-new.cardano-testnet.iohkdev.io",
	    "port": 3001,
	    "valency": 2
	  }
	]
}

but if i take from the cardano docs the official configuration files on github for the testnet are like mine

The first topology file is for when you have p2p enabled, the second one for when you have p2p disabled (in your config.json file).

1 Like

I’m not perfectly familiar with the Coincashew scripts but if you have enabled p2p (seems like) then you don’t need TopologyUpdater at all. (which is good)

1 Like