Skip to content
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

Rename instruction SHA3 -> KECCAK256 #590

Merged
merged 1 commit into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning].
`access_account()` and `access_storage()` functions added to `evmc_host_interface`.
[#571](https://github.com/ethereum/evmc/pull/571)

### Changed

- Instruction `SHA3` has been renamed to `KECCAK256` as proposed by
[EIP-1803](https://eips.ethereum.org/EIPS/eip-1803) to better match the underlying hash function.
[#590](https://github.com/ethereum/evmc/pull/590)

## [7.5.0] — 2021-03-23

### Added
Expand Down
2 changes: 1 addition & 1 deletion include/evmc/instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ enum evmc_opcode
OP_SHR = 0x1c,
OP_SAR = 0x1d,

OP_SHA3 = 0x20,
OP_KECCAK256 = 0x20,

OP_ADDRESS = 0x30,
OP_BALANCE = 0x31,
Expand Down
14 changes: 7 additions & 7 deletions lib/instructions/instruction_metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static struct evmc_instruction_metrics berlin_metrics[256] = {
/* SAR = 0x1d */ {VERYLOW, 2, -1},
/* = 0x1e */ {UNDEFINED, 0, 0},
/* = 0x1f */ {UNDEFINED, 0, 0},
/* SHA3 = 0x20 */ {30, 2, -1},
/* KECCAK256 = 0x20 */ {30, 2, -1},
/* = 0x21 */ {UNDEFINED, 0, 0},
/* = 0x22 */ {UNDEFINED, 0, 0},
/* = 0x23 */ {UNDEFINED, 0, 0},
Expand Down Expand Up @@ -323,7 +323,7 @@ static struct evmc_instruction_metrics istanbul_metrics[256] = {
/* SAR = 0x1d */ {VERYLOW, 2, -1},
/* = 0x1e */ {UNDEFINED, 0, 0},
/* = 0x1f */ {UNDEFINED, 0, 0},
/* SHA3 = 0x20 */ {30, 2, -1},
/* KECCAK256 = 0x20 */ {30, 2, -1},
/* = 0x21 */ {UNDEFINED, 0, 0},
/* = 0x22 */ {UNDEFINED, 0, 0},
/* = 0x23 */ {UNDEFINED, 0, 0},
Expand Down Expand Up @@ -582,7 +582,7 @@ static struct evmc_instruction_metrics constantinople_metrics[256] = {
/* SAR = 0x1d */ {VERYLOW, 2, -1},
/* = 0x1e */ {UNDEFINED, 0, 0},
/* = 0x1f */ {UNDEFINED, 0, 0},
/* SHA3 = 0x20 */ {30, 2, -1},
/* KECCAK256 = 0x20 */ {30, 2, -1},
/* = 0x21 */ {UNDEFINED, 0, 0},
/* = 0x22 */ {UNDEFINED, 0, 0},
/* = 0x23 */ {UNDEFINED, 0, 0},
Expand Down Expand Up @@ -841,7 +841,7 @@ static struct evmc_instruction_metrics byzantium_metrics[256] = {
/* = 0x1d */ {UNDEFINED, 0, 0},
/* = 0x1e */ {UNDEFINED, 0, 0},
/* = 0x1f */ {UNDEFINED, 0, 0},
/* SHA3 = 0x20 */ {30, 2, -1},
/* KECCAK256 = 0x20 */ {30, 2, -1},
/* = 0x21 */ {UNDEFINED, 0, 0},
/* = 0x22 */ {UNDEFINED, 0, 0},
/* = 0x23 */ {UNDEFINED, 0, 0},
Expand Down Expand Up @@ -1100,7 +1100,7 @@ static struct evmc_instruction_metrics tangerine_whistle_metrics[256] = {
/* = 0x1d */ {UNDEFINED, 0, 0},
/* = 0x1e */ {UNDEFINED, 0, 0},
/* = 0x1f */ {UNDEFINED, 0, 0},
/* SHA3 = 0x20 */ {30, 2, -1},
/* KECCAK256 = 0x20 */ {30, 2, -1},
/* = 0x21 */ {UNDEFINED, 0, 0},
/* = 0x22 */ {UNDEFINED, 0, 0},
/* = 0x23 */ {UNDEFINED, 0, 0},
Expand Down Expand Up @@ -1359,7 +1359,7 @@ static struct evmc_instruction_metrics homestead_metrics[256] = {
/* = 0x1d */ {UNDEFINED, 0, 0},
/* = 0x1e */ {UNDEFINED, 0, 0},
/* = 0x1f */ {UNDEFINED, 0, 0},
/* SHA3 = 0x20 */ {30, 2, -1},
/* KECCAK256 = 0x20 */ {30, 2, -1},
/* = 0x21 */ {UNDEFINED, 0, 0},
/* = 0x22 */ {UNDEFINED, 0, 0},
/* = 0x23 */ {UNDEFINED, 0, 0},
Expand Down Expand Up @@ -1618,7 +1618,7 @@ static struct evmc_instruction_metrics frontier_metrics[256] = {
/* = 0x1d */ {UNDEFINED, 0, 0},
/* = 0x1e */ {UNDEFINED, 0, 0},
/* = 0x1f */ {UNDEFINED, 0, 0},
/* SHA3 = 0x20 */ {30, 2, -1},
/* KECCAK256 = 0x20 */ {30, 2, -1},
/* = 0x21 */ {UNDEFINED, 0, 0},
/* = 0x22 */ {UNDEFINED, 0, 0},
/* = 0x23 */ {UNDEFINED, 0, 0},
Expand Down
10 changes: 5 additions & 5 deletions lib/instructions/instruction_names.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static const char* istanbul_names[256] = {
/* 0x1d */ "SAR",
/* 0x1e */ NULL,
/* 0x1f */ NULL,
/* 0x20 */ "SHA3",
/* 0x20 */ "KECCAK256",
/* 0x21 */ NULL,
/* 0x22 */ NULL,
/* 0x23 */ NULL,
Expand Down Expand Up @@ -297,7 +297,7 @@ static const char* constantinople_names[256] = {
/* 0x1d */ "SAR",
/* 0x1e */ NULL,
/* 0x1f */ NULL,
/* 0x20 */ "SHA3",
/* 0x20 */ "KECCAK256",
/* 0x21 */ NULL,
/* 0x22 */ NULL,
/* 0x23 */ NULL,
Expand Down Expand Up @@ -556,7 +556,7 @@ static const char* byzantium_names[256] = {
/* 0x1d */ NULL,
/* 0x1e */ NULL,
/* 0x1f */ NULL,
/* 0x20 */ "SHA3",
/* 0x20 */ "KECCAK256",
/* 0x21 */ NULL,
/* 0x22 */ NULL,
/* 0x23 */ NULL,
Expand Down Expand Up @@ -815,7 +815,7 @@ static const char* homestead_names[256] = {
/* 0x1d */ NULL,
/* 0x1e */ NULL,
/* 0x1f */ NULL,
/* 0x20 */ "SHA3",
/* 0x20 */ "KECCAK256",
/* 0x21 */ NULL,
/* 0x22 */ NULL,
/* 0x23 */ NULL,
Expand Down Expand Up @@ -1074,7 +1074,7 @@ static const char* frontier_names[256] = {
/* 0x1d */ NULL,
/* 0x1e */ NULL,
/* 0x1f */ NULL,
/* 0x20 */ "SHA3",
/* 0x20 */ "KECCAK256",
/* 0x21 */ NULL,
/* 0x22 */ NULL,
/* 0x23 */ NULL,
Expand Down