CIP - query the list of pools registered on the blockchain

Hey there,

The current Cardano node version (1.33.1) does not appear ( :question: ) to have an efficient / easy-to-use API to query the list of nodes registered on the blockchain. To get this data, it means we have to either:

  • dump the full ledger (takes several GB in memory) using cardano-cli and parse the output, extremely cpu/memory inefficient,
  • or build SQL databases to index the blockchain, not ideal,
  • or call a REST API that someone else manages, not very blockchain friendly - why trust a third party in a serious blockchain project.
  • or call cardano-cli query pool-params repeatedly using a static list of pool IDs that we get from somewhere else.

Have I missed this feature in the source code? Can it be added either in the raw tcp protocol, and/or as a new cardano-cli command line?

This simple addition will help all nodes to ‘auto-discover’ all other nodes that are properly registered on the blockchain without relying on anything else but the native protocol.

It is simple ‘dns’ I would say: the ledger already contains a registry of all the nodes and their IP / DNS name - being able to query this data efficiently and ‘resolve’ node names is common sense but that’s just my two cents on the topic. With regular DNS, we have TLDs, zones, sub-domains. How can Cardano blockchain metadata be used to ‘resolve’ human-readable node names, and enumerate all node names available in a given chain?


1 Like

You may want to look into ogmios and in particular, the poolIds query:

ogmios:repl> await poolIds()

@KtorZ Congrats on the excellent work there. This adds a hybrid option #5 to the list above:

  • Fork/clone and standup an open source REST/gRPC/etc wrapper interface for Cardano nodes you deploy for your project.

@regel Various explorers offer simple relay registries that are perhaps “good enough” for node discovery with a little filtering. Are you proposing a native API within the Cardano node itself to perform P2P discovery of peers with health metrics or something more along that lines?


I :heart_eyes: love this community.

Hey @DinoDude @KtorZ thanks for the excellent options :bangbang:

I’m almost finished with version 0.2 of Cardano helm charts. This new version integrates seamlessly with Ogmios, and finally includes a bullet proof auto-discovery mechanism to build topology.json files based on the information gathered from ogmios and a fully local websocket connection. I plan to release the update soon in the coming days, and hope the result will blow people’s mind.

Are you proposing a native API within the Cardano node itself to perform P2P discovery of peers with health metrics or something more along that lines?

Something along those lines, but eventually I manage to build the solution without any changes to cardano-node core source code. I combine P2P auto-discovery (using the on-chain pool parameters data available via the local Ogmios websocket), with TCP probes and b2sum hashes. I’m testing now the final changes, including sending SIGINT to restart the cardano-node container quickly if topology changes.

1 Like

Hey @regel thank you for all the work you have done on this project. Making repeatable secure infrastructure is so important.

Just had a quick question if you have done any cost analysis on your setup after 1 month? Minimum is AKS with E4s v4 is ~$204 / month. What does all the other services add onto that?