From 7c8746b49ea9f8d8bc213cd7fcf3adb78d068b2a Mon Sep 17 00:00:00 2001 From: mraszyk <31483726+mraszyk@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:55:13 +0200 Subject: [PATCH 1/3] feat: release v0.28.0 (#346) * release v0.28.0 * add back unreleased section --- spec/_attachments/interface-spec-changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/_attachments/interface-spec-changelog.md b/spec/_attachments/interface-spec-changelog.md index 90011636..ec3576b8 100644 --- a/spec/_attachments/interface-spec-changelog.md +++ b/spec/_attachments/interface-spec-changelog.md @@ -1,6 +1,8 @@ ## Changelog {#changelog} ### ∞ (unreleased) + +### 0.28.0 (2024-10-11) {#0_28_0} * Add new management canister methods for canister snapshot support. ### 0.27.0 (2024-09-20) {#0_27_0} From 8dabf9def8ab4ac99d5560bcd8459879012bb50f Mon Sep 17 00:00:00 2001 From: mraszyk <31483726+mraszyk@users.noreply.github.com> Date: Tue, 22 Oct 2024 21:56:40 +0200 Subject: [PATCH 2/3] chore(deps): bump cookie and express in /docusaurus (#350) Bumps [cookie](https://github.com/jshttp/cookie) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together. Updates `cookie` from 0.6.0 to 0.7.1 - [Release notes](https://github.com/jshttp/cookie/releases) - [Commits](https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.1) Updates `express` from 4.21.0 to 4.21.1 - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/4.21.1/History.md) - [Commits](https://github.com/expressjs/express/compare/4.21.0...4.21.1) --- updated-dependencies: - dependency-name: cookie dependency-type: indirect - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docusaurus/package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docusaurus/package-lock.json b/docusaurus/package-lock.json index bd61ca59..56db89a9 100644 --- a/docusaurus/package-lock.json +++ b/docusaurus/package-lock.json @@ -5112,9 +5112,9 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==" }, "node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "engines": { "node": ">= 0.6" } @@ -6279,16 +6279,16 @@ } }, "node_modules/express": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.0.tgz", - "integrity": "sha512-VqcNGcj/Id5ZT1LZ/cfihi3ttTn+NJmkli2eZADigjq29qTlWi/hAQ43t/VLPq8+UX06FCEx3ByOYet6ZFblng==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.6.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", From bed36d9a7a75efe2ad7cd17c132fa7dc59f4d574 Mon Sep 17 00:00:00 2001 From: mraszyk <31483726+mraszyk@users.noreply.github.com> Date: Tue, 22 Oct 2024 21:57:29 +0200 Subject: [PATCH 3/3] fix: ic0.call_perform spec (#348) --- spec/index.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/spec/index.md b/spec/index.md index ee37e789..c195c77b 100644 --- a/spec/index.md +++ b/spec/index.md @@ -1718,7 +1718,7 @@ There must be at most one call to `ic0.call_on_cleanup` between `ic0.call_new` a This deducts `MAX_CYCLES_PER_RESPONSE` cycles from the canister balance and sets them aside for response processing. - If the function returns `0` as the `err_code`, the IC was able to enqueue the call. In this case, the call will either be delivered, returned because the destination canister does not exist or returned because of an out of cycles condition. This also means that exactly one of the reply or reject callbacks will be executed. + If the function returns `0` as the `err_code`, the IC was able to enqueue the call. In this case, the call will either be delivered, returned because the destination canister does not exist, returned due to a lack of resources within the IC, or returned because of an out of cycles condition. This also means that exactly one of the reply or reject callbacks will be executed. If the function returns a non-zero value, the call cannot (and will not be) performed. This can happen due to a lack of resources within the IC, but also if it would reduce the current cycle balance to a level below where the canister would be frozen. @@ -7197,15 +7197,13 @@ ic0.call_peform() : ( err_code : i32 ) = if es.context ∉ {U, CQ, Ry, Rt, CRy, CRt, T} then Trap {cycles_used = es.cycles_used;} if es.pending_call = NoPendingCall then Trap {cycles_used = es.cycles_used;} - es.balance := es.balance - MAX_CYCLES_PER_RESPONSE - - // are we below the freezing threshold? - // Or maybe the system has other reasons to not perform this - if liquid_balance(es) < 0 or system_cannot_do_this_call_now() + // `system_cannot_do_this_call_now` abstracts over resource issues preventing the call from being made + if liquid_balance(es) < MAX_CYCLES_PER_RESPONSE or system_cannot_do_this_call_now() then discard_pending_call() return or + es.balance := es.balance - MAX_CYCLES_PER_RESPONSE es.calls := es.calls · es.pending_call es.pending_call := NoPendingCall return 0 @@ -7213,7 +7211,7 @@ ic0.call_peform() : ( err_code : i32 ) = // helper function discard_pending_call() = if es.pending_call ≠ NoPendingCall then - es.balance := es.balance + MAX_CYCLES_PER_RESPONSE + es.pending_call.transferred_cycles + es.balance := es.balance + es.pending_call.transferred_cycles es.pending_call := NoPendingCall ic0.stable_size() : (page_count : i32) =