What happens to a canister's prinicipal id after it runs out of cycles?

Hello!

I was reading this: The Internet Computer Interface Specification | Internet Computer and the note that says:

Once the IC frees the resources of a canister, its id, cycles balance, and controllers are preserved on the IC for a minimum of 10 years. What happens to the canister after this period is currently unspecified.

I have the following questions:

  1. how do I bring back / redeploy a canister that ran out of cycles?
  2. will the canister retain its original PrincipalID?

I admit I am not sure, so i asked the RD team to see who can help answer this.

I’ll quote an answer to the internal discussion triggered by your question:

Once a canister runs out of cycles, it is uninstalled and its state is deleted. Still, the canister ID and controller set are retained and the controllers can still top up the canister with cycles and deploy new code.

I.e. there is a difference between a deleted canister (gone forever, canister ID can never be reused) and a canister without a Wasm binary and state (whether because it’s a newly created canister or an uninstalled one). So a canister that ran out of cycles will look exactly the same as a newly created canister without a Wasm binary installed. Anyone can add cycles; and controllers (if any) can install a new Wasm binary. The canister ID will implicitly be the same as before, as the canister has never gone away. The state (including the heap) will be gone forever though.

(There is currently no explicit 10 year limit. The replica simply keeps around uninstalled but not deleted canisters forever. Later on, there may be a need to garbage collect long unused canisters.)

4 Likes

Thank you very much indeed!