Conversation
lib/instructions/instruction_names.c
Outdated
| NULL, | ||
| NULL, | ||
| "INVALID", | ||
| "SELFDESTRUCT", |
There was a problem hiding this comment.
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.
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
| TEST(instructions, name_gas_cost_equivalence) | ||
| { | ||
| for (auto rev = EVMC_FRONTIER; rev <= EVMC_CONSTANTINOPLE; | ||
| for (auto rev = EVMC_FRONTIER; rev <= EVMC_LATEST_REVISON; |
include/evmc/evmc.h
Outdated
| EVMC_CONSTANTINOPLE = 5 | ||
| EVMC_CONSTANTINOPLE = 5, | ||
|
|
||
| EVMC_LATEST_REVISON = EVMC_CONSTANTINOPLE |
There was a problem hiding this comment.
I wonder if this should be rather LATEST_STABLE_REVISION and point to BYZANTIUM?
There was a problem hiding this comment.
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.
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.
Added numbers in comments.
e9a7023 to
9b1ebea
Compare
Changes:
evmc_instructionenum renamed toevmc_opcodeand items prefixed withOP_.Follow up of #33.