feat: [EXC-1783] No execution overhead on low cycles#10096
Open
alin-at-dfinity wants to merge 1 commit intomasterfrom
Open
feat: [EXC-1783] No execution overhead on low cycles#10096alin-at-dfinity wants to merge 1 commit intomasterfrom
alin-at-dfinity wants to merge 1 commit intomasterfrom
Conversation
When a message execution is skipped due to low cycle balance, don't deduct the message execution overhead from the round instruction limit. The instruction overhead is intended to account for entering and exiting the sandbox, which does not apply here.
alin-at-dfinity
commented
May 5, 2026
Comment on lines
+231
to
+233
| ExecuteSubnetMessageResultType::Finished => NumMessages::new(1), | ||
| ExecuteSubnetMessageResultType::Processing => NumMessages::new(0), | ||
| ExecuteSubnetMessageResultType::Paused => NumMessages::new(0), |
Contributor
Author
There was a problem hiding this comment.
This is a drive-by cleanup: AmountOf::new() is const; AmountOf::from() cannot be made const.
|
|
||
| let mut callee = canister0; | ||
| let mut call = other_side(callee, 0); | ||
| let mut call = other_side(callee, 1); |
Contributor
Author
There was a problem hiding this comment.
Another drive-by improvement (although this one fixes a test that was broken by this change): a message execution returning "zero instructions executed" is interpreted by the scheduler logic as "message not executed due to low cycles"; that's not what this test was aiming for (which is why it broke).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a message execution is skipped due to low cycle balance, don't deduct the message execution overhead from the round instruction limit. The instruction overhead is intended to account for entering and exiting the sandbox, which does not apply here.
This will allow the "execution" of arbitrarily many messages per round on frozen (or close to frozen) canisters, which could drive up round duration. However, there are a lot of other limits in place (ingress messages in blocks, canister call fees, queue sizes) that make this a non-issue. Particularly given that the overhead for skipping a message execution is at least an order of magnitude lower than that of executing one.