Repository navigation
Re-simulate the custom account test in enforcing auth mode - #206
Merged
Merged
Conversation
Before this change, the custom account integration test padded the recording-mode simulation with fixed factors: four times the instructions, three times the disk read bytes and a fixed fee. It also built the footprint by hand, because that simulation does not run the account contract's __check_auth. On testnet under Protocol 30 the padded budget was too small: add_limit failed with resource_limit_exceeded inside __check_auth, 2,084,115 instructions consumed against 1,616,672 declared. This change: - Signs the auth entries, re-simulates the transaction in enforcing auth mode and takes that footprint, resources, and fee, for add_limit and for transfer. - Asserts the rejection of the over-limit transfer with one signer on the enforcing simulation's result error (Error(Auth, InvalidAction) with the contract's error 3) and no longer submits it. - Removes the padding, the hand-built footprint keys and two unused imports. Verified on testnet: the class passed three times on this tree, the enforcing simulation of add_limit at 2,283,077 instructions. Unit suite and static analysis green.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #206 +/- ##
=========================================
Coverage 93.47% 93.47%
Complexity 21622 21622
=========================================
Files 1006 1006
Lines 52424 52424
=========================================
Hits 49003 49003
Misses 3421 3421 🚀 New features to boost your workflow:
|
christian-rogobete
deleted the
custom-account-test-enforce-simulation
branch
November 11, 2026 16:16
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.
Before this change, the custom account integration test padded the recording-mode simulation with fixed factors: four times the instructions, three times the disk read bytes and a fixed fee. It also built the footprint by hand, because that simulation does not run the account contract's __check_auth. On testnet under Protocol 30 the padded budget was too small: add_limit failed with resource_limit_exceeded inside __check_auth, 2,084,115 instructions consumed against 1,616,672 declared.
This change:
Verified on testnet: the class passed three times on this tree, the enforcing simulation of add_limit at 2,283,077 instructions. Unit suite and static analysis green.