-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: new System API ic0.subnet_self #3790
base: master
Are you sure you want to change the base?
Conversation
🤖 Here's your preview: https://vlbny-pqaaa-aaaam-abe3a-cai.icp0.io |
Thank you Martin – that looks good from the spec side, let's have @dsarlis chime in for the execution team. |
Tangentially related: I assume the size part is necessary because principals are specified to have variable length. |
Looks good from the execution team's pov. |
For backwards-compatibility, this is practically impossible for existing APIs and thus we'd introduce an inconsistency with those by following the above suggestion. |
This PR implements a new system API that enables canisters to learn which subnet they run on. The new functionality is composed of two functions: `ic0.subnet_self_size()` and `ic0.subnet_self_copy()`, described in this [Spec PR](dfinity/portal#3790).
This PR specifies a new System API
ic0.subnet_self_size
andic0.subnet_self_copy
that canisters can use to synchronously learn their own subnet ID. Requested on the forum.