Skip to content

Conversation

@mducroux
Copy link
Contributor

@mducroux mducroux commented Jan 29, 2026

DEFI-2617: changed candid service arg of the ICP Index canister from InitArg to opt IndexArg to be consistent with ICRC1 Index arg, with type IndexArg = variant { Init : InitArg; Upgrade : UpgradeArg };. Now both the init and post_upgrade method takes the same argument index_arg: Option<IndexArg>.

@github-actions github-actions bot added the feat label Jan 29, 2026
@mducroux mducroux marked this pull request as ready for review February 2, 2026 10:53
@mducroux mducroux requested review from a team as code owners February 2, 2026 10:53
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request changes code owned by the Governance team. Therefore, make sure that
you have considered the following (for Governance-owned code):

  1. Update unreleased_changelog.md (if there are behavior changes, even if they are
    non-breaking).

  2. Are there BREAKING changes?

  3. Is a data migration needed?

  4. Security review?

How to Satisfy This Automatic Review

  1. Go to the bottom of the pull request page.

  2. Look for where it says this bot is requesting changes.

  3. Click the three dots to the right.

  4. Select "Dismiss review".

  5. In the text entry box, respond to each of the numbered items in the previous
    section, declare one of the following:

  • Done.

  • $REASON_WHY_NO_NEED. E.g. for unreleased_changelog.md, "No
    canister behavior changes.", or for item 2, "Existing APIs
    behave as before.".

Brief Guide to "Externally Visible" Changes

"Externally visible behavior change" is very often due to some NEW canister API.

Changes to EXISTING APIs are more likely to be "breaking".

If these changes are breaking, make sure that clients know how to migrate, how to
maintain their continuity of operations.

If your changes are behind a feature flag, then, do NOT add entrie(s) to
unreleased_changelog.md in this PR! But rather, add entrie(s) later, in the PR
that enables these changes in production.

Reference(s)

For a more comprehensive checklist, see here.

GOVERNANCE_CHECKLIST_REMINDER_DEDUP

@mducroux
Copy link
Contributor Author

mducroux commented Feb 2, 2026

@dfinity/team-dsm I have a test failure in sns_testing_ci-head-nns.

Error from Canister qhbym-qaaaa-aaaaa-aaafq-cai: Canister called `ic0.trap` with message: 
'failed to decode call arguments: Custom(Fail to decode argument 0 from table0 to record { ledger_id : principal }

Caused by:
    Subtyping error: Type mismatch

The ICP index canister's init function signature was changed to accept Option<IndexArg> instead of the old format init_arg: InitArg. I've updated rs/pocket_ic_server/src/pocket_ic.rs to encode the init argument correctly:

let icp_index_init_arg = IcpIndexArg::Init(IcpIndexInitArg {
    ledger_id: LEDGER_CANISTER_ID.get().0,
    retrieve_blocks_from_ledger_interval_seconds: None,
});

However, the pocket-ic-server-head-nns binary embeds the ICP index wasm at compile time in rs/pocket_ic_server/src/pocket_ic.rs:

 const ICP_INDEX_CANISTER_WASM: &[u8] = include_bytes!(env!("ICP_INDEX_CANISTER_WASM_PATH"));

The remote cache seems to be serving the old ICP index wasm embedded. The cached binary still has the old init interface, causing the type mismatch.

Is there a way to manually invalidate this cache? Should the CI be configured to detect changes in embedded wasm dependencies and force a rebuild?

Thanks a lot for your help!

@mducroux mducroux requested a review from mbjorkqvist February 2, 2026 11:02
@mducroux mducroux dismissed github-actions[bot]’s stale review February 2, 2026 11:04

No canister behavior changes.

Copy link
Contributor

@mbjorkqvist mbjorkqvist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the remaining test failures this LGTM, thanks @mducroux!

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.

2 participants