feat: ic0 v1.1.0 and ic-cdk v0.20.1 with msg_caller_info_{data,signer} APIs#708
Merged
feat: ic0 v1.1.0 and ic-cdk v0.20.1 with msg_caller_info_{data,signer} APIs#708
Conversation
…d downloads Switch pocket-ic dependency from a git tag to a specific commit rev (2026-04-15, IC PR #9845) and update the download script and test utilities to handle both `rev=` and `tag=` source URLs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e,copy} Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
aterga
reviewed
Apr 17, 2026
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the ic0/ic-cdk crates to expose new “caller identity attribute” system APIs (msg_caller_info_*) and adds PocketIC-based e2e coverage for them, while also improving the PocketIC server download/pinning workflow (tag or git rev).
Changes:
- Add raw
ic0bindings formsg_caller_info_{data,signer}_{size,copy}and publishic0v1.1.0. - Add higher-level
ic_cdk::api::{msg_caller_info_data, msg_caller_info_signer}and publishic-cdk/ic-cdk-macrosv0.20.1. - Enhance PocketIC setup (download script + test harness) and add e2e tests using
update_call_with_sender_info.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/download_pocket_ic_server.sh | Switches PocketIC server resolution to use cargo metadata and supports pinning by tag or git rev; adds OS/arch detection. |
| ic0/src/sys.rs | Adds new raw wasm imports + non-wasm stubs for msg_caller_info_*. |
| ic0/src/lib.rs | Adds safe slice-based wrappers for msg_caller_info_* size/copy APIs. |
| ic0/manual_safety_comments.txt | Documents safety notes for the newly-added ic0.msg_caller_info_* system APIs. |
| ic0/ic0.txt | Adds the new system API symbols to the ic0 API definition list. |
| ic0/Cargo.toml | Bumps ic0 crate version to 1.1.0. |
| ic0/CHANGELOG.md | Adds 1.1.0 changelog entry for the new bindings. |
| ic-cdk/src/api.rs | Adds high-level msg_caller_info_data() and msg_caller_info_signer() helpers. |
| ic-cdk/Cargo.toml | Bumps ic-cdk crate version to 0.20.1. |
| ic-cdk/CHANGELOG.md | Adds 0.20.1 changelog entry for new ic_cdk::api functions. |
| ic-cdk-timers/src/global_timer.rs | Refactors timer “skip” logic to avoid early returns inside match arms. |
| ic-cdk-macros/Cargo.toml | Bumps ic-cdk-macros crate version to 0.20.1 (lockstep). |
| e2e-tests/tests/test_utilities.rs | Updates PocketIC server cache validation to accept both tag and rev pins. |
| e2e-tests/tests/management_canister.rs | Extends PocketIC setup to include threshold-keys subnet for signing API tests. |
| e2e-tests/tests/api.rs | Adds e2e coverage for msg_caller_info_{data,signer} using PocketIC sender_info. |
| e2e-tests/src/bin/api.rs | Adds canister entrypoints used by the new e2e tests for caller info APIs. |
| Cargo.toml | Bumps workspace deps (ic0, ic-cdk, ic-cdk-macros) and updates PocketIC tag. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamspofford-dfinity
approved these changes
Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
msg_caller_info_data_size/copyandmsg_caller_info_signer_size/copyraw bindings toic0(sys.rs and lib.rs)msg_caller_info_data() -> Vec<u8>andmsg_caller_info_signer() -> Option<Principal>higher-level bindings toic_cdk::apiupdate_call_with_sender_infoThese APIs expose the caller identity attribute feature described in dfinity/portal#6202.
msg_caller_info_datareturns auxiliary data provided by the signing canister, andmsg_caller_info_signerreturns the canister ID of the canister that provided the caller's canister signature. Both return empty/Nonewhen the caller is not authenticated via canister signatures.PocketIC setup improvements
The e2e test harness/CI now supports pinning
pocket-icto a git revision in addition to a tag, and the download step resolves the matching server binary for either form. This unblocked developing against an unreleased RC of PocketIC before cutting over to the tagged release.Crate releases
ic01.0.1 → 1.1.0ic-cdk0.20.0 → 0.20.1 (andic-cdk-macrosbumped in lockstep)Test plan
call_msg_caller_info_dataandcall_msg_caller_info_signerverify correct values with and withoutsender_info🤖 Generated with Claude Code