YADAT - new pool on testnet

Hi All,
Just started a new test pool last week. Compiled and running version 1.27.0 based on

image
image
image

Would it be possible to delegate, so my pool can produce a block?

Sorry, but have many questions…

What is the minimum ada required to produce a block in testnet/mainnet?
How would I know if the my pool the slot leader?
How would I know if my pool made a block?
How often do I need to change the KES key?
It seems like the relay is connecting to many other relays on the testnet. Do I need to run topologyUpdate.sh and

You don’t have IN peers (not even the Producer is connected— add the relay IP+ Relay port inside topology file), u must solve it by running topology updater… you must see tx processed

What is the minimum ada required to produce a block in testnet/mainnet?

There is no minim ada requires but high amount staked = big chances to create blocks

How would I know if the my pool the slot leader?

There is a script… CNCLI which will tell u for each epoch if the pool has blocks assigned

How would I know if my pool made a block?

You will see in glive or u can go on pooltool.io and press to the bottom on mainnet button; it will switch to testnet

How often do I need to change the KES key?

~ 92 days, check the date of expiration from glive

It seems like the relay is connecting to many other relays on the testnet. Do I need to run topologyUpdate.sh and

Yes, u need to announce the relay on the network,

@Alexd1985. Thank you for the reply.

I have now created and running topologyUpdater.sh and getting the following log, where 45.79.161.84 is the relay node.

cat logs/topologyUpdater_lastresult.json
{ “resultcode”: “502”, “datetime”:“2021-07-06 20:49:08”, “clientIp”: “2600:3c03::f03c:92ff:fe85:f859”, “msg”: “invalid blockNo ” }
{ “resultcode”: “201”, “datetime”:“2021-07-06 20:55:26”, “clientIp”: “2600:3c03::f03c:92ff:fe85:f859”, “iptype”: 6, “msg”: “nice to meet you” }
{ “resultcode”: “504”, “datetime”:“2021-07-06 21:33:02”, “clientIp”: “2600:3c03::f03c:92ff:fe85:f859”, “iptype”: 6, “msg”: “one request per hour please” }
{ “resultcode”: “203”, “datetime”:“2021-07-06 22:33:02”, “clientIp”: “2600:3c03::f03c:92ff:fe85:f859”, “iptype”: 6, “msg”: “welcome to the topology” }
{ “resultcode”: “403”, “datetime”:“2021-07-06 23:33:02”, “clientIp”: “2600:3c03::f03c:92ff:fe85:f859”, “iptype”: 6, “msg”: “glad you want to stay with us, but please ensure to make your request from your IPv4 address (use curl -4 ... )” }
{ “resultcode”: “201”, “datetime”:“2021-07-07 00:33:05”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “nice to meet you” }
{ “resultcode”: “203”, “datetime”:“2021-07-07 01:33:04”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “welcome to the topology” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 02:33:06”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 03:33:07”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 04:33:06”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 05:33:02”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 06:33:02”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 07:33:01”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 08:33:02”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 09:33:04”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 10:33:02”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 11:33:03”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }
{ “resultcode”: “204”, “datetime”:“2021-07-07 12:33:08”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “glad you’re staying with us” }

However, I am still not getting INbound connections.

image

Furthermore, when I run the following to update the topology file, I get ‘IP is not (yet) allowed to fetch this list’.

curl -s -4 “https://api.clio.one/htopology/v1/fetch/?max=20&customPeers=173.255.226.250:4332:1|relays-new.cardano-testnet.iohkdev.io:3001:2

{ “resultcode”: “402”, “datetime”:“2021-07-07 13:01:49”, “clientIp”: “45.79.161.84”, “iptype”: 4, “msg”: “IP is not (yet) allowed to fetch this list”, “Producers”: [ { “addr”: “173.255.226.250”, “port”: 4332, “valency”: 1 } ,
{ “addr”: “relays-new.cardano-testnet.iohkdev.io”, “port”: 3001, “valency”: 2 } , { “addr”: “relays-new.cardano-mainnet.iohk.io”, “port”: 3001, “valency”: 2 } ] }

Thank you

hmmm I think you are on testnet but the topology updater runs on mainnet, you will need to change the magic number

but I can’t see the Producer connected to the Relay, did u added the Relay IP + port inside the Producer topology file?

There is the following logic to parse magic number, so I assumed it was behaving correctly.

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}"

I can set NWMAGIC to see what happens.

Topology file for BP

cat testnet-topology.json
{
  "Producers": [
    {
      "addr": "45.79.161.84",
      "port": 4321,
      "valency": 2
    }
  ]
}

image

press p in glive and check the peers IP, did u restarted the Producer after u re-edit the topology file?
also inside topology script (Relay) to custom peer or if u used another guide you should have a script pull… where you should add the producer IP + port… run that script and restart the node

The printed out variables from topologyUpdater.sh as follows, and as it is using the magic number from testnet-shelley-genesis.json. Could not attach topologyUpdater.sh, so just added at the end for reference.

$ ./topologyUpdater.sh
NETWORKID=Testnet
HASH_IDENTIFIER=--testnet-magic 1097911063
NETWORK_IDENTIFIER=--testnet-magic 1097911063
NWMAGIC=1097911063
CNODE_PORT=4321
blockNo=2734822
CNODE_VALENCY=2734822
T_HOSTNAME=
cmd=https://api.clio.one/htopology/v1/?port=4321&blockNo=2734822&valency=1&magic=1097911063
$ grep 1097911063 testnet-shelley-genesis.json
  "networkMagic": 1097911063,

List of Peers on Relay
image
image
image
image

I restarted the Producer many times, as I wanted to get the Grafana/Premetheus working. I currently have the Coincash and Stake Pool School versions running on Grafna for comparison.

There is a script to pull list of peers in Coincashew, but I decided to run the command by hand, just to see what it returns, before making it into a script to be run by cron.

topologyUpdater.sh

#!/bin/bash
# shellcheck disable=SC2086,SC2034

USERNAME=inca01relay
CNODE_PORT=4321 # must match your relay node port as set in the startup command
CNODE_HOSTNAME="45.79.161.84"  # optional. must resolve to the IP you are requesting from
CNODE_BIN="/usr/local/bin"
CNODE_HOME=/home/inca01relay/inca01/testnetrelay
CNODE_LOG_DIR="${CNODE_HOME}/logs"
GENESIS_JSON="${CNODE_HOME}/testnet-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/node.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}" != "45.79.161.84" ]; then
  T_HOSTNAME="&hostname=${CNODE_HOSTNAME}"
else
  T_HOSTNAME=''
fi

if [ ! -d ${CNODE_LOG_DIR} ]; then
  mkdir -p ${CNODE_LOG_DIR};
fi

echo "NETWORKID="$NETWORKID
echo "HASH_IDENTIFIER="$HASH_IDENTIFIER
echo "NETWORK_IDENTIFIER="$NETWORK_IDENTIFIER
echo "NWMAGIC="$NWMAGIC
echo "CNODE_PORT="$CNODE_PORT
echo "blockNo="$blockNo
echo "CNODE_VALENCY="$blockNo
echo "T_HOSTNAME="$T_HOSTNAME
cmd="https://api.clio.one/htopology/v1/?port=${CNODE_PORT}&blockNo=${blockNo}&valency=${CNODE_VALENCY}&magic=${NWMAGIC}${T_HOSTNAME}"
echo "cmd="$cmd

curl -s -4 "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

Additionally, I see ConnectSuccessLast in the BP log, so I assumed that BP is connecting to the Relay.

[localhos:cardano.node.IpSubscription:Info:182] [2021-07-07 15:57:15.34 UTC] IPs: 0.0.0.0:0 [45.79.161.84:4321] Trying to connect to 45.79.161.84:4321
[localhos:cardano.node.IpSubscription:Info:63546] [2021-07-07 15:57:15.34 UTC] IPs: 0.0.0.0:0 [45.79.161.84:4321] Connection Attempt Start, destination 45.79.161.84:43
21
[localhos:cardano.node.IpSubscription:Notice:182] [2021-07-07 15:57:15.34 UTC] IPs: 0.0.0.0:0 [45.79.161.84:4321] Waiting 0.025s before attempting a new connection
**[localhos:cardano.node.IpSubscription:Notice:63546] [2021-07-07 15:57:15.34 UTC] IPs: 0.0.0.0:0 [45.79.161.84:4321] Connection Attempt End, destination 45.79.161.84:4321 outcome: ConnectSuccessLast**
[localhos:cardano.node.LeadershipCheck:Info:172] [2021-07-07 15:57:16.00 UTC] {"kind":"TraceStartLeadershipCheck","chainDensity":3.0062938e-2,"slot":31304220,"delegMapSize":2002,"utxoSize":214256,"credentials":"Cardano"}
[localhos:cardano.node.Forge:Info:172] [2021-07-07 15:57:16.00 UTC] fromList [("val",Object (fromList [("kind",String "TraceNodeNotLeader"),("slot",Number 3.130422e7)])),("credentials",String "Cardano")]

I just re-got scripts from
https://cardano-community.github.io/guild-operators/#/Scripts/gliveview
and hacked away at it with the following results:

image
image
image
image

I think gLiveView may not have been connecting to the correct port.

Now it’s perfect… for in connections the server will use a local random port…

Thank you very much for all your help. Would you know anyone who can delegate to the pool to help make a block?

I don’t know if this is still valid

Hi, I used the link you provided, but as you said, it is not clear if this is still valid. How would I find out the amount that has been delegated to the pool? Also, do you if the following command/link to get the list of of relay nodes to update the topology file still works?

curl -s "https://api.clio.one/htopology/v1/fetch/?max=20&customPeers=173.255.226.250:4332:1|relays-new.cardano-testnet.iohkdev.io:3001:2"
{ "resultcode": "402", "datetime":"2021-07-09 12:28:44", "clientIp": "2600:3c03::f03c:92ff:fe85:f859", "iptype": 6, "msg": "IP is not (yet) allowed to fetch this list",  "Producers": [   { "addr": "173.255.226.250", "port": 4332, "valency": 1 } ,
  { "addr": "relays-new.cardano-testnet.iohkdev.io", "port": 3001, "valency": 2 } , { "addr": "relays-new.cardano-mainnet.iohk.io", "port": 3001, "valency": 2 } ]  }

In the Stake Pool School there is a link to get a list.
https://explorer.cardano-testnet.iohkdev.io/relays/topology.json

I can’t find YADAT on pooltool.io
Check the metadata hash

https://pooltool.io/ - click in bottom if the page on mainnet, it will switch to testnet

Earlier, the stake pool did not show up on the Daedalus wallet. One forum post suggested a problem with metadata hash.
https://forum.cardano.org/t/no-listing-of-my-pool-on-daedalus-test-wallet-testnet-did-i-miss-sth-trying-for-days-now/41263
When I ensured that pool metadata was exactly the same, so that the resulting hash would be same, the stake pool showed up in the Deadalus wallet. I even checked that it was written into the blockchain in a couple of ways, as follows.

$cardano-cli stake-pool id --output-format hex --cold-verification-key-file poolkeys/cold.vkey
1372548b744987f32d4255d3bcb37d66d47fbba507ac454f521f432d
$ cardano-cli query ledger-state --testnet-magic 1097911063 | grep publicKey | grep 1372548b744987f32d4255d3bcb37d66d47fbba507ac454f521f432d
                            "publicKey": "1372548b744987f32d4255d3bcb37d66d47fbba507ac454f521f432d",
                            "publicKey": "1372548b744987f32d4255d3bcb37d66d47fbba507ac454f521f432d",
                        "publicKey": "1372548b744987f32d4255d3bcb37d66d47fbba507ac454f521f432d",
                        "publicKey": "1372548b744987f32d4255d3bcb37d66d47fbba507ac454f521f432d",
$ cardano-cli query stake-snapshot --stake-pool-id 1372548b744987f32d4255d3bcb37d66d47fbba507ac454f521f432d --testnet-magic 1097911063
{
    "poolStakeGo": 497639826,
    "activeStakeGo": 14393800393132753,
    "poolStakeMark": 7492931138,
    "activeStakeMark": 14396618944809382,
    "poolStakeSet": 5492931138,
    "activeStakeSet": 14395270417249042
}

So you are saying that there still are problems with the metadata?

I just verified that it is visible on adatools now.
https://testnet.adatools.io/pools/1372548b744987f32d4255d3bcb37d66d47fbba507ac454f521f432d