-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
feat[venom]: add effects to instructions #4264
feat[venom]: add effects to instructions #4264
Conversation
Co-authored-by: Harry Kalogirou <harkal@nlogn.eu>
Co-authored-by: HodanPlodky <36966616+HodanPlodky@users.noreply.github.com>
"selfbalance": BALANCE, | ||
"log": MEMORY, | ||
"revert": MEMORY, | ||
"return": MEMORY, |
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.
return has an offset to memory, right? so in theory you might be forced to zero-extend the memory
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.
applies to other opcodes as well
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.
do we really care about zero extension? i think gas is an effect we don't need to preserve
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.
what about msize
?
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.
hmm that's true. but return can't be reordered past other instructions anyways
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.
you have the same for eg mload
from enum import Flag, auto | ||
|
||
|
||
class Effects(Flag): |
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.
modeling code (e.g., for code copy) isn't useful?
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.
It's not that useful, since it can't change during execution
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.
(At least that I know of)
vyper/venom/effects.py
Outdated
"mcopy": MEMORY, | ||
} | ||
|
||
reads = { |
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.
why aren't create opcodes modeled here?
vyper/venom/effects.py
Outdated
RETURNDATA = Effects.RETURNDATA | ||
|
||
|
||
writes = { |
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.
selfdestruct (atleast balance)?
add missing create effects
Have you considered the effect of logs on other logs ie. in CSE you cannot replace the log by another log or what would happened if you switch log order. Not sure if it should be modeled in this PR |
That's a good one! We definitely should not reorder logs. |
What I did
add effects to instructions, which is helpful for several different ongoing efforts
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture