Removal of old ICRC Index canister

Removal of old ICRC Index canister

As part of PR 3286 (commit 575ca531a70423ccfb33d9f2487ad7e76dfdc206), the deprecated ICRC Index canister was removed from the ic repository. The old index canister has been deprecated for over a year, as it has been superseded by the index-ng canister.

Compatibility

The functions and types defined in the index.did candid interface of the deprecated ICRC index canister are compatible with the corresponding functions in the index-ng.did candid interface of the ICRC index-ng canister. At the time of writing, they are identical, except for the GetTransactions record returned as a response to a get_account_transactions query, which in the index-ng interface has an additional balance field of type Tokens (nat). As per the candid spec, this is a backwards-compatible change - clients that do not know of the new field will simply ignore it.

Migration

The main difference between the two index canister implementations, is that the old index canister stores the ledger blocks on the heap, whereas the index-ng canister stores the ledger blocks in stable structures. Migrating from a canister using the old index WASM to the index-ng WASM by upgrading is possible, but in case that fails, the index canister can be reinstalled with the index-ng WASM, and it will (re)build its state by fetching blocks from the ledger. Reinstallation is also the only option in case the index canister heap is too large such that serializing and deserializing it as part of the pre- and post-upgrade is not possible. At time of writing, the latest index-ng canister can be found as part of the ledger-suite-icrc-2024-11-28 release.

2 Likes