dfinity / interface-spec

IC Interface Specification
https://khsfq-wqaaa-aaaak-qckvq-cai.icp0.io/docs
37 stars 20 forks source link

Check for the freezing threshold on increase of compute/memory allocation #184

Closed ulan closed 1 year ago

ulan commented 1 year ago

Currently the spec underspecifies the behaviour in the case when the canister increases its memory or compute allocation such that the cycle balance of the canister drops below its freezing threshold.

This case is a potential footgun for developers because it can lead to unexpected uninstalls of the canister.

Example:

The underspecification is motivated by:

The compute_allocation and memory_allocation settings are ignored in this abstract model of the Internet Computer, as it does not address questions of performance or scheduling.

However, this example demonstrates that memory and compute allocations also affect the lifetime of the canister.

ulan commented 1 year ago

The relevant links in the spec: