I’m not sure if this topic has been discussed before, but I’m curious about the IC specification regarding canister settings. Is there a specific reason why the IC specification only allows settings to be updated in bulk?
This approach feels a bit prone to errors, at least I’m always double checking when I use those, and I believe it would be interesting and efficient if individual settings could be updated separately. Particularly as we are adding more and more options. Moreover, adding and removing single controller would be particularly nice.
But I might be missing something. Can anyone provide insights or rationale behind this design choice? Could it be related to security or consistency? If there is no particular reason and it hasn’t been discussed before, may I suggest considering this approach?
export interface canister_settings {
freezing_threshold: [] | [bigint];
controllers: [] | [Array<Principal>];
reserved_cycles_limit: [] | [bigint];
log_visibility: [] | [log_visibility];
wasm_memory_limit: [] | [bigint];
memory_allocation: [] | [bigint];
compute_allocation: [] | [bigint];
}
export interface update_settings_args {
canister_id: Principal;
settings: canister_settings;
sender_canister_version: [] | [bigint];
}
export interface _SERVICE {
update_settings: ActorMethod<[update_settings_args], undefined>;
}