fix: do not misreport a VM resource limit when debugging - #457
Merged
Merged
Conversation
A resource limit such as the operation cost density limit is counted per operation, so it can be reached on any instruction. Debugging misreported it in two ways: - On the instruction a require statement ends in, it was attributed to that require, so the transaction was reported as a FailedRequireError for a require whose condition held. Resource limit errors now skip the require lookup. - On an instruction in a branch that is not taken, which still costs operations, the step was filtered out as not executed. The error was lost and the reason became "Unsuccessful evaluation". The step that raised the error is now kept. Both are reported as a FailedTransactionEvaluationError with the libauth reason. Closes #456 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #457 +/- ##
==========================================
+ Coverage 89.34% 89.35% +0.01%
==========================================
Files 61 61
Lines 5048 5053 +5
Branches 942 946 +4
==========================================
+ Hits 4510 4515 +5
Misses 413 413
Partials 125 125 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Sep 28, 2026
Closed
Simplify the description of a VM resource limit bug fix in debugging.
This branch was successfully deployed
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.
On behalf of Mathieu G. (mr-zwets), drafted with Claude Opus 5.5.
Fixes #456. A VM resource limit such as the operation cost density limit is counted per operation, so a transaction can run out of budget on any instruction.
debug()misreported that in two ways:requirestatement ends in, it reported aFailedRequireErrorfor that require, although its condition held. Resource-limit errors (operation cost, hashing, signature check count, operation count) now skip the require lookup.Both are now reported as a
FailedTransactionEvaluationErrorwith libauth's reason. This uses a block-list of resource limits rather than an allow-list of verify-type errors, so timelock failures and other errors raised on a require's own opcode stay attributed to that require.The new test scans the loop count and padding of a small hashing-loop contract so the budget runs out across the loop and the require statements after it. It asserts that every failure is a
FailedTransactionEvaluationErrorcarrying the operation-cost reason, and that the scan hits a require's instruction. It fails without the fix. SDK tests, lint and spellcheck pass.