-
Notifications
You must be signed in to change notification settings - Fork 285
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
Fix EOF initcode handling before EOF is enabled #893
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #893 +/- ##
=======================================
Coverage 98.50% 98.50%
=======================================
Files 130 130
Lines 15625 15655 +30
=======================================
+ Hits 15391 15421 +30
Misses 234 234
Flags with carried forward coverage won't be shown. Click here to find out more.
|
tx.gas_limit = block.gas_limit; | ||
pre.get(tx.sender).balance = tx.gas_limit * tx.max_gas_price + tx.value + 1; | ||
|
||
const bytecode init_container = eof_bytecode(ret(0, 1)); |
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.
we usually use eof_bytecode(OP_INVALID)
as the smallest valid eof container. Also, eof_bytecode(ret(0, 1))
fails validation due to wrong max stack height. However irrelevant to the logic being tested, I think it's safer to use a valid EOF code here.
Ah, I see the same is used above. I think this should be fixed there as well when we're at it.
The special rule of handling EOF initcode in CREATE/CREATE2 instructions should not be activated before EOF is activated.
e09d0f1
to
b449afc
Compare
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
The special rule of handling EOF initcode in CREATE/CREATE2 instructions should not be activated before EOF is activated.