forked from solana-program/token
-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor get_* calls in harnesses for fewer steps
#88
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
Merged
Conversation
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
Improvement from 3711 steps to 3021 steps for the proof.
`test_process_initialize_mint_{freeze, no_freeze}` did not have the
proofs run again as they do not finish to tell if there is a step
reduction
This DOES NOT reduce the amount of proofs steps compared to if this change is not present (both 89207 steps), indicating that our proofs are not getting into the `else` brach of the post-condition.
Collaborator
Author
|
Concrete tests have been run post merge for both p-token and programs and passed all (except the malformed input tests we do not handle) |
jberthold
approved these changes
Nov 5, 2025
Member
jberthold
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Nice refactoring, code is much easier to read/follow now.
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.
This PR refactors calls to
get_{account, mint, multisig}where possible in all proof harnesses to reduce the amount of steps proofs need to take. A selection of proofs were run again to see the reduction in steps, not every harness could be refactored and some proofs go for long without stopping so it is hard to see how the count changes.The naming convention introduced is inspired by specification languages that have an
old(...)operator to talk about pre-strate (e.g. Dafny). In the post state I addednewto variable so it would be clear this is captured after the implementation has executed.Proofs run and change in steps:
The concrete test harnesses that are able to run with our restricted harnesses were also run successfully