-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Formal verification of Account (7702+7579) #5785
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
Conversation
|
These specs pass ! https://prover.certora.com/output/71959/de382212ccb3440e92693f187ca74e93?anonymousKey=5f06da9b8474ce1aaa13d57841d641d64db70476 @ernestognw WDYT ? |
rule callInstallModule(env e, uint256 moduleTypeId, address module, bytes initData) { | ||
require calls == 0; | ||
|
||
installModule(e, moduleTypeId, module, initData); | ||
|
||
assert calls == 1; | ||
assert lastcall_target == module; | ||
assert lastcall_selector == 0x6d61fe70; // onInstall(bytes) | ||
assert lastcall_value == 0; | ||
} |
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.
Isn't already verified here?
openzeppelin-contracts/certora/specs/Account.spec
Lines 245 to 250 in a6ecba8
// Can only call a module without any value. Target is verified by `callInstallModule`. | |
f.selector == sig:installModule(uint256,address,bytes).selector && | |
isEntryPointOrSelf && | |
calls == 1 && | |
lastcall_selector == 0x6d61fe70 && // onInstall(bytes) | |
lastcall_value == 0 |
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.
That part is not verifying the target (we cannot extract it from the args).
This rule's point is mostly to check the target of the call is the module. All other checks (calls == 1, selector, value) are duplicated. Would you remove them ?
No description provided.