-
Notifications
You must be signed in to change notification settings - Fork 314
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
EVM instructions part 2 #34
Conversation
lib/instructions/instruction_names.c
Outdated
NULL, | ||
NULL, | ||
"INVALID", | ||
"SELFDESTRUCT", |
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.
I think this should be SUICIDE
in Frontier :)
And technically INVALID
should only be added at a later hard fork if were are pedantic.
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.
The INVALID
EIP does not have the date specified. I think we can assume that this is a kind of change that affects EVM also back in time.
The similar case is for SELFDESTRUCT (EIP-6) which was not the part of Homestead HF officially.
test/unittests/test_instructions.cpp
Outdated
@@ -90,7 +90,7 @@ TEST(instructions, byzantium_hard_fork) | |||
|
|||
TEST(instructions, name_gas_cost_equivalence) | |||
{ | |||
for (auto rev = EVMC_FRONTIER; rev <= EVMC_CONSTANTINOPLE; | |||
for (auto rev = EVMC_FRONTIER; rev <= EVMC_LATEST_REVISON; |
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.
REVISON
-> REVISION
include/evmc/evmc.h
Outdated
EVMC_CONSTANTINOPLE = 5 | ||
EVMC_CONSTANTINOPLE = 5, | ||
|
||
EVMC_LATEST_REVISON = EVMC_CONSTANTINOPLE |
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.
I wonder if this should be rather LATEST_STABLE_REVISION
and point to BYZANTIUM
?
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.
Not sure, probably yes. Would you use it anywhere in Hera?
Maybe name it DEFAULT_REVISION
?
|
||
#include <evmc/instructions.h> | ||
|
||
static const char* constantinople_names[256] = { |
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.
These lists are hard to maintain.
Maybe at least add delimiting comment lines like
// 0x0
"STOP",
"ADD",
...
// 0x10
...
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.
Added numbers in comments.
e9a7023
to
9b1ebea
Compare
Changes:
evmc_instruction
enum renamed toevmc_opcode
and items prefixed withOP_
.Follow up of #33.