Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(system-api): add call_cycles_add128_up_to #1158

Merged
merged 28 commits into from
Aug 29, 2024

Conversation

sesi200
Copy link
Contributor

@sesi200 sesi200 commented Aug 27, 2024

Introduces call_cycles_add128_up_to to the system API to offer a way of adding as many cycles as possible to a call without trapping in the subsequent call_perform.
Corresponding spec MR: dfinity/interface-spec#316
Closes SDK-1761

@github-actions github-actions bot added the feat label Aug 27, 2024
@sesi200 sesi200 marked this pull request as ready for review August 28, 2024 09:04
@sesi200 sesi200 requested review from a team as code owners August 28, 2024 09:04
@dsarlis dsarlis requested a review from mraszyk August 28, 2024 13:06
@dsarlis
Copy link
Member

dsarlis commented Aug 28, 2024

Adding @mraszyk for spec compliance check.

@sesi200 sesi200 added this pull request to the merge queue Aug 29, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 29, 2024
@sesi200 sesi200 added this pull request to the merge queue Aug 29, 2024
Merged via the queue into master with commit 66c25e6 Aug 29, 2024
23 checks passed
@sesi200 sesi200 deleted the SDK-1677-call-cycles-add-up-to branch August 29, 2024 14:05
mraszyk added a commit that referenced this pull request Sep 3, 2024
github-merge-queue bot pushed a commit that referenced this pull request Sep 4, 2024
#1319)

This reverts commit 66c25e6.

The `dst` output parameter could make it problematic for a higher-level
language. Such output parameters typically result in unexpected allocs
in C bindings from a managed language making the subsequent
`call_perform` likely to fail.

On the other hand, one can derive the value of the `dst` output
parameter by computing the difference in canister cycles balance before
and after calling `call_cycles_add128_up_to` (confirmed empirically)
which might allow us to avoid the output parameter.
levifeldman pushed a commit to levifeldman/ic that referenced this pull request Oct 1, 2024
levifeldman pushed a commit to levifeldman/ic that referenced this pull request Oct 1, 2024
…y#1158)" (dfinity#1319)

This reverts commit 66c25e6.

The `dst` output parameter could make it problematic for a higher-level
language. Such output parameters typically result in unexpected allocs
in C bindings from a managed language making the subsequent
`call_perform` likely to fail.

On the other hand, one can derive the value of the `dst` output
parameter by computing the difference in canister cycles balance before
and after calling `call_cycles_add128_up_to` (confirmed empirically)
which might allow us to avoid the output parameter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants