-
Notifications
You must be signed in to change notification settings - Fork 861
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
Disable EOF CALL opcodes in legacy #7544
Conversation
When the EOF call opcodes are added to the EVM, ensure legacy cannot it. Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
@@ -95,6 +95,11 @@ public long gasAvailableForChildCall(final MessageFrame frame) { | |||
|
|||
@Override | |||
public OperationResult execute(final MessageFrame frame, final EVM evm) { | |||
Code callingCode = frame.getCode(); | |||
if (callingCode.getEofVersion() == 0) { | |||
return InvalidOperation.INVALID_RESULT; |
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.
Would be good to add some tests showing that an INVALID_RESULT is returned for legacy with EXTCALL, EXTDELEGATECALL and EXTSTATICCALL
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.
https://github.com/ethereum/execution-spec-tests/pull/768/files
Tests all legacy-invalid opcodes, not just EXT*CREATE.
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, we can pull in the latest execution-spec tests when they get published 👍
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.
Signed-off-by: Danno Ferrin <danno@numisight.com>
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.
🚢
PR description
When the EOF call opcodes are added to the EVM, ensure legacy cannot it.
Fixed Issue(s)
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests