Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mraszyk
Copy link
Contributor

@mraszyk mraszyk commented Nov 20, 2024

This PR specifies a new System API ic0.subnet_self_size and ic0.subnet_self_copy that canisters can use to synchronously learn their own subnet ID. Requested on the forum.

@github-actions github-actions bot added the interface-spec Changes to the IC Interface Specification label Nov 20, 2024
Copy link

github-actions bot commented Nov 20, 2024

🤖 Here's your preview: https://vlbny-pqaaa-aaaam-abe3a-cai.icp0.io

@Dfinity-Bjoern
Copy link
Member

Thank you Martin – that looks good from the spec side, let's have @dsarlis chime in for the execution team.

@michael-weigelt
Copy link

Tangentially related: I assume the size part is necessary because principals are specified to have variable length.
However, why not change the spec to commit to a fixed length for subnet_ids and simplify this interface? Same for canister_ids?

@dsarlis
Copy link
Member

dsarlis commented Dec 9, 2024

Looks good from the execution team's pov.

@mraszyk
Copy link
Contributor Author

mraszyk commented Dec 9, 2024

Tangentially related: I assume the size part is necessary because principals are specified to have variable length. However, why not change the spec to commit to a fixed length for subnet_ids and simplify this interface? Same for canister_ids?

For backwards-compatibility, this is practically impossible for existing APIs and thus we'd introduce an inconsistency with those by following the above suggestion.

@mraszyk mraszyk marked this pull request as ready for review December 19, 2024 07:51
@mraszyk mraszyk requested a review from a team as a code owner December 19, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interface-spec Changes to the IC Interface Specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants