- What happens to the controllers of a canister that has run out of cycles? Are they also garbage-collected like the code and memory? I assume not.
- Is there a limit on the number of controllers a canister can have?
The interface spec covers the answers to both questions.
What happens to the controllers of a canister that has run out of cycles? Are they also garbage-collected like the code and memory? I assume not.
From the uninstall_code method section (which will happen automatically when the canister has run out of cycles):
A canister after uninstalling retains its cycle balances, controllers , history, status, and allocations.
Is there a limit on the number of controllers a canister can have?
From the create_canister
section:
controllers
(vec principal
)A list of at most 10 principals. The principals in this list become the controllers of the canister. Note that the caller of the
create_canister
call is not a controller of the canister unless it is a member of thecontrollers
list.