agent-rs icon indicating copy to clipboard operation
agent-rs copied to clipboard

Is fetch_subnet_by_canister already functional?

Open rdobrik opened this issue 1 year ago • 3 comments

I am working on Java Agent implementation, currently adding subnet API functions. Looks like subnet with canisterId doesn't return subnet info. When I replace it with subnetId it works properly. Is it something still in development?

rdobrik avatar May 01 '24 00:05 rdobrik

It's complicated, but subnet info should be read with subnet id. Some paths are available via canister id, such as public_key and canister_ranges, but metrics is only available with subnet id. It's in the spec, but not easy to find: https://internetcomputer.org/docs/current/references/ic-interface-spec#http-read-state: "the subnet form must be used when requesting paths of the form /subnet/<subnet_id>/metrics"

chenyan-dfinity avatar May 01 '24 01:05 chenyan-dfinity

👍 I assumed that, so I will get subnetId from Certificate delegation then. Just that function is used internally in query_signed with canister Id. If I did not miss something. Is query_signed already officially out or it's still work in progress?

rdobrik avatar May 01 '24 01:05 rdobrik

I think signed query is released, but I haven't tried it myself.

chenyan-dfinity avatar May 01 '24 01:05 chenyan-dfinity