feat[venom]: add effects to instructions#4264
feat[venom]: add effects to instructions#4264charles-cooper merged 11 commits intovyperlang:masterfrom
Conversation
Co-authored-by: Harry Kalogirou <[email protected]>
Co-authored-by: HodanPlodky <[email protected]>
| "selfbalance": BALANCE, | ||
| "log": MEMORY, | ||
| "revert": MEMORY, | ||
| "return": MEMORY, |
There was a problem hiding this comment.
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.
applies to other opcodes as well
There was a problem hiding this comment.
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.
hmm that's true. but return can't be reordered past other instructions anyways
There was a problem hiding this comment.
you have the same for eg mload
| from enum import Flag, auto | ||
|
|
||
|
|
||
| class Effects(Flag): |
There was a problem hiding this comment.
modeling code (e.g., for code copy) isn't useful?
There was a problem hiding this comment.
It's not that useful, since it can't change during execution
There was a problem hiding this comment.
(At least that I know of)
vyper/venom/effects.py
Outdated
| "mcopy": MEMORY, | ||
| } | ||
|
|
||
| reads = { |
There was a problem hiding this comment.
why aren't create opcodes modeled here?
vyper/venom/effects.py
Outdated
| RETURNDATA = Effects.RETURNDATA | ||
|
|
||
|
|
||
| writes = { |
There was a problem hiding this comment.
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