Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

add new transition rejecting stop_canister calls #229

Merged
merged 14 commits into from
Nov 23, 2023

Conversation

mraszyk
Copy link
Contributor

@mraszyk mraszyk commented Sep 24, 2023

Given that every canister on the IC mainnet is also charged for its message memory usage which is a scarce resource, it is prudent that calls are not long-running. Hence, this PR introduces the possibility to reject stop_canister calls at any time.

It also updates the reject code for pending stop_canister calls after calling start_canister from CANISTER_REJECT (4) to CANISTER_ERROR (5). This makes sense because CANISTER_REJECT (4) is characterized as an "explicit reject by the canister".

@mraszyk mraszyk requested a review from a team as a code owner September 24, 2023 18:53
@Dfinity-Bjoern

This comment was marked as outdated.

spec/index.md Outdated Show resolved Hide resolved
spec/index.md Outdated Show resolved Hide resolved
@bogwar bogwar closed this Sep 28, 2023
@mraszyk mraszyk reopened this Sep 28, 2023
@mraszyk

This comment was marked as outdated.

spec/index.md Outdated Show resolved Hide resolved
@oggy-dfin

This comment was marked as outdated.

@mraszyk mraszyk changed the title introduce timeout for stop_canister calls add new transition rejecting stop_canister calls Oct 5, 2023
@mraszyk

This comment was marked as resolved.

Copy link
Member

@Dfinity-Bjoern Dfinity-Bjoern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed that it probably makes sense to:

  • keep the canister stopping (my worry about inconsistency was unjustified, rejected calls can change state also elsewhere)
  • return a CANISTER_REJECT instead of a CANISTER_ERROR, since the operation actually changed the state.

spec/index.md Outdated Show resolved Hide resolved
@dsarlis

This comment was marked as resolved.

@mraszyk

This comment was marked as resolved.

@dsarlis

This comment was marked as resolved.

@mraszyk

This comment was marked as resolved.

@mraszyk

This comment was marked as resolved.

Co-authored-by: Claudio Russo <[email protected]>
@dsarlis

This comment was marked as resolved.

@mraszyk

This comment was marked as resolved.

@mraszyk

This comment was marked as resolved.

@dsarlis

This comment was marked as resolved.

spec/index.md Outdated Show resolved Hide resolved
spec/index.md Outdated Show resolved Hide resolved
@mraszyk mraszyk merged commit 2f8f8e3 into master Nov 23, 2023
4 checks passed
pull bot pushed a commit to mikeyhodl/ic that referenced this pull request Nov 24, 2023
feat: Time out stop_canister requests

Stop canister requests now time out after 5 minutes. See dfinity/interface-spec#229 for more details. 

See merge request dfinity-lab/public/ic!15068
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants