Skip to content

chore: make SenderInfo available to ApiType#9743

Merged
mraszyk merged 10 commits into
masterfrom
mraszyk/persist-sender-info-in-call-context
Apr 9, 2026
Merged

chore: make SenderInfo available to ApiType#9743
mraszyk merged 10 commits into
masterfrom
mraszyk/persist-sender-info-in-call-context

Conversation

@mraszyk
Copy link
Copy Markdown
Contributor

@mraszyk mraszyk commented Apr 7, 2026

This PR makes SenderInfo available to the relevant variants of ApiType (according to the system API availability specified in this PR). To this end, the PR introduces a new field sender_info in CallContext to persist the sender info and make it available in callbacks, too.

Persist the `sender_info` field from `struct Ingress` in `CallContext`
so it is accessible from `ApiType::Update` (method entry point) and
`ApiType::ReplyCallback` (reply callbacks). This allows execution
environments to read the sender info throughout the call chain
originating from an ingress message.

Changes:
- Re-export `SenderInfo` from `ic_types::messages`
- Add `sender_info()` method to `CanisterCall`
- Add `sender_info: Option<SenderInfo>` field to `CallContext`
- Persist `sender_info` in protobuf (field 14 on `CallContext`)
- Thread `sender_info` through `ApiType::Update` and `ApiType::ReplyCallback`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the feat label Apr 7, 2026
mraszyk and others added 4 commits April 7, 2026 12:47
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mraszyk mraszyk changed the title feat: persist sender_info from Ingress in canister call contexts chore: persist sender_info from Ingress in canister call contexts Apr 7, 2026
@github-actions github-actions Bot added chore and removed feat labels Apr 7, 2026
@mraszyk mraszyk changed the title chore: persist sender_info from Ingress in canister call contexts chore: make SenderInfo available to ApiType Apr 7, 2026
@mraszyk mraszyk marked this pull request as ready for review April 7, 2026 15:02
@mraszyk mraszyk requested review from a team as code owners April 7, 2026 15:02
Comment thread rs/execution_environment/src/query_handler/query_context.rs
@mraszyk mraszyk enabled auto-merge April 8, 2026 08:01
Comment thread rs/replicated_state/src/canister_state/system_state/call_context_manager.rs Outdated
@mraszyk mraszyk disabled auto-merge April 8, 2026 08:22
@mraszyk mraszyk force-pushed the mraszyk/persist-sender-info-in-call-context branch from 593dd79 to d9fe7ec Compare April 8, 2026 11:03
@mraszyk mraszyk added this pull request to the merge queue Apr 9, 2026
Merged via the queue into master with commit c7e3ca5 Apr 9, 2026
63 of 64 checks passed
@mraszyk mraszyk deleted the mraszyk/persist-sender-info-in-call-context branch April 9, 2026 07:09
daniel-wong-dfinity-org pushed a commit that referenced this pull request Apr 15, 2026
This PR makes `SenderInfo` available to the relevant variants of
`ApiType` (according to the system API availability specified in this
[PR](dfinity/portal#6202)). To this end, the PR
introduces a new field `sender_info` in `CallContext` to persist the
sender info and make it available in callbacks, too.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants