-
-
Notifications
You must be signed in to change notification settings - Fork 788
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
Check constancy when calling to external function #1480
Check constancy when calling to external function #1480
Conversation
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.
Add a test in /syntax/ and it's good to go.
Note to self: we decided at last meeting to add an assert_no_modify (or something) to the language and so this PR needs to be expanded to add that. Also I need to fix the tests |
@jacqueswww should be ready to go |
pinging @fubuloubu @davesque for review |
Need to add some docs on |
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
What I did
Fix #1468 , #1377
How I did it
The compiler was not checking constancy of external calls inside of a constant context. However, it was correctly generating static calls, so calls to modifying functions would fail at runtime when the callee tried to modify state (per https://github.com/ethereum/EIPs/blob/d95612c8206b7e225bec5dc34c4b019c9531e44d/EIPS/eip-214.md). This adds a check when compiling external calls that they cannot be modifying within a constant context.
How to verify it
Description for the changelog
Add constancy check for external calls
Cute Animal Picture