-
Notifications
You must be signed in to change notification settings - Fork 13
[Certora] Allocations from adapters #686
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
base: certora/import-chainsecurity-specs
Are you sure you want to change the base?
[Certora] Allocations from adapters #686
Conversation
Signed-off-by: Colin | Morpho 🦋 <[email protected]>
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.
Notes about this PR.
|
||
definition max_int256() returns int256 = (2 ^ 255) - 1; | ||
|
||
strong invariant allocationIsInt256(bytes32 id) |
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.
Informational: this definition is here only to make it possible to require in other rules. Importing Invariants.spec
makes the process fail for a yet to be explained reason.
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.
I suggest we track this in an issue and merge it as is until Certora comes up a fix/explanation.
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.
The reason is that storage analysis fails for this Certora run. It's ok as it's sound, but then it prevents to hook on storage. The problem comes from the fact that Invariants does hook on storage (but it's respective run doesn't fail storage analysis, so it goes through ok).
The current workaround works fine (it just duplicates an invariant).
An alternative is to separate the Invariants job into 2, one that does not hook on storage that we would import here, and another one with the hook on storage (to prove totalSupplyIsSumOfBalances). But in the end this may be even more overhead
Signed-off-by: Colin | Morpho 🦋 <[email protected]>
Signed-off-by: Colin | Morpho 🦋 <[email protected]>
…cs' into feat/verif/allocations-alt
Looks good for us , munging is absolutely necessary since the real code uses the extsload function that we don’t support |
Based on #621
Slack thread.
Replaces #617