feat: preconditions for installing code
This PR specifies preconditions for installing canister code via the corresponding management canister endpoints that must be satisfied (if provided) for the call to succeed. The motivation is to prevent canisters that are not stopped from being installed and to enable compare-and-swap semantics for installing canisters (by atomically "comparing" the canister history before "swapping" the canister code).
🤖 Here's your preview: https://zeh4i-iqaaa-aaaam-aeivq-cai.icp0.io
Should we do the same for load_canister_snapshot_args?
Should we do the same for
load_canister_snapshot_args?
Makes sense to me.
@mraszyk can we merge this?
@mraszyk can we merge this?
Not really because it is not implemented in the protocol (this PR is merely a suggestion for a new protocol feature).