Subnet topology

Hi,

I’m would like to build a canister that automatically fetches subnet and node topology information on-chain. I wanted to ask:

  • How can I query the IC management canister from a Motoko canister to get the subnet and node topology?
  • Is there a Candid-based proxy or interface for the Registry canister’s protobuf-based methods?

My goal is to retrieve a certified list of subnets and nodes on-chain (via function like get_subnets, and get_nodes similar to what I see on the dashbaord). Any guidance or examples would be greatly appreciated :slight_smile:

Best,

Asamartino

1 Like

I don’t know the details how to do it, but I am pretty sure you want to use the registry, not the management canister to fetch the data you’re interested in. There is no proxy that translates the registry output to Candid that I’m aware of

Hi Vivienne,

Thank you very much for you answer. Yes, you are right. I’m fetching from the NNS registry. The only workaround I’ve thought of so far is using an HTTPS outcall to fetch data from the dashboard (but is not on-chain). Out of curiosity, is there any other workaround that you can think of?

Best,

Asamartino

1 Like

Maybe an LLM could write you an adapter canister? It’s probably a lot easier to do in Rust than in Motoko

Great, thank you very much for your help @Vivienne :slight_smile:

1 Like