DFINITY’s Canister Shuffle: Smoother Moves Across Subnets

DFINITY is rolling out a feature that simplifies canister migration across subnets, offering developers more control over their projects. The move ensures that canisters can transition between subnets with specific features, such as the European subnet or the fiduciary subnet, which caters to particular replication needs. This upgrade is a step towards optimising the Internet Computer for efficiency and scalability.

Canister migration retains state, cycles, and canister ID while excluding transient state elements like logs and metrics. The process requires stopping the canister to avoid open call contexts before migration. While the transient state is not maintained, the fundamental structure remains intact, ensuring a smooth transition for developers.

The process follows three key steps: migrating canister state, transferring cycles, and reassigning canister IDs. Canister state migration works through a snapshot mechanism, where the existing canister is replicated onto a new canister in the target subnet. Initially, the migrated canister has a temporary ID, but this is later reassigned to match the original. The approach involves expanding the management canister API to allow snapshot reading, writing, and storage, enabling more seamless data movement.

DFINITY is also introducing new dfx commands for downloading and uploading snapshots. These will function both off-chain, where developers can store snapshots on disk, and on-chain, where a new snapshot migration canister ensures data integrity. The on-chain method provides independent verification, bolstering security and reliability.

Beyond migration, these enhancements also enable multiple backups, disaster recovery, and testing in environments that mirror the mainnet. Developers can maintain various snapshots instead of relying on a single one per canister, as is currently the case.

For cycle transfers, DFINITY is leveraging the existing cycles wallet mechanism. Once a snapshot is taken, developers can deploy a wallet to the original canister and shift cycles to the new one using dfx commands. This ensures a smooth financial transition between subnets without disrupting canister operations.

The final step is canister ID migration, which is crucial for maintaining continuity. Once a canister has been duplicated onto a new subnet, the original ID remains attached to the old canister. To resolve this, a dedicated NNS canister manages ID migration by renaming the new canister to match the original ID. This ensures that applications and services referencing the canister remain unaffected.

A principal controlling both canisters initiates the process by adding the NNS canister as a controller and executing the migration call. DFINITY is introducing a new dfx command to simplify this step. If the process is interrupted, developers can restore the original canister from its snapshot without data loss.

These enhancements reflect an ongoing effort to streamline Internet Computer functionality, making it more adaptable to developer needs. By enabling canister migration with minimal disruption, DFINITY is ensuring that projects remain flexible, efficient, and scalable. Feedback is welcomed as the feature continues to be refined.

 

Subscribe

Related articles

Internet Computer’s AI Push Still Waiting for Market Recognition

Dominic Williams, founder of the DFINITY Foundation, has said...

Advanced Mobile FPS Developed Using Caffeine AI

@X2WorldTech has returned to game development with a new...

DeepSeek V3.1 Evaluates KIP as Next Step for Persistent AI Memory

KIP is emerging as a notable advancement in artificial...

Juno release adds stable memory hosting and Internet Identity login

Developers working with Juno now have access to a...

BUILDR mixes Solana and ICP with gaming, services and cross-chain tools

BUILDR launched only yesterday on PumpFun, one of the...
Maria Irene
Maria Irenehttp://ledgerlife.io/
Maria Irene is a multi-faceted journalist with a focus on various domains including Cryptocurrency, NFTs, Real Estate, Energy, and Macroeconomics. With over a year of experience, she has produced an array of video content, news stories, and in-depth analyses. Her journalistic endeavours also involve a detailed exploration of the Australia-India partnership, pinpointing avenues for mutual collaboration. In addition to her work in journalism, Maria crafts easily digestible financial content for a specialised platform, demystifying complex economic theories for the layperson. She holds a strong belief that journalism should go beyond mere reporting; it should instigate meaningful discussions and effect change by spotlighting vital global issues. Committed to enriching public discourse, Maria aims to keep her audience not just well-informed, but also actively engaged across various platforms, encouraging them to partake in crucial global conversations.

LEAVE A REPLY

Please enter your comment!
Please enter your name here