When you run the topology updater script after that you add the relays and producers on the #CUSTOM_PEERS="None" , the script update the topology yaml file with the custom entries and as well added many public IPs like :
Is this normal to have other IPs? how the relay can select my producer inside this list? it will be really good to know how the relay works to select the product from this long list of nodes. I could not fund answer online.
It uses a JSON configuration file and adds some error handling. In a future version (already in the making) it will also be able to send email if something goes wrong. If you have problems with the python script you can contact me directly.
Thank you for your reply. @laplasz@jf3110
I am interested to know how things works under the hood, let say I have two vms one relay and one producer, the relay has the topology with public IPs and my producer IP, let’s assume that my relay got selected to build a block. how the relay will select my producer from the topology file?
so the relay is just responsible to keep the producer in sync. So once the producer connects to your relay it can sync the blockchain via the relay. And also the scheduling. So because of the producer is in sync it knows when to produce a block.
AFAIK, for the relay the block producer is just another node connecting. It’s the block producer which figures out that it’s the one with being the leader for the specific block. The minted block is then sent from the block producer via the relay to the other relays.
Now I understand, so to check that the producer can produce blocks in the assumed case one relay one producer, the producer should look like this:
right? and to make sure that the relay and producer are in sync running the following command in both vms: CARDANO_NODE_SOCKET_PATH=/opt/cardano/cnode/sockets/node0.socket cardano-cli query tip --mainnet
I got the following for query tip
ubuntu@ip-172-31-31-40:~/cardano-my-node$ cardano-cli query tip --mainnet