core/vm: Rename SHA3 instruction to KECCAK256 (#23976)

This was proposed in 2016, Solidity uses this since 2017, and evmone and other VMs use the keccak256 name. This brings geth in line with those.
This commit is contained in:
Alex Beregszaszi
2021-11-30 09:34:34 +00:00
committed by GitHub
parent 1fa91729f2
commit a69d4b273d
8 changed files with 18 additions and 18 deletions

View File

@ -70,7 +70,7 @@ const (
SHR OpCode = 0x1c
SAR OpCode = 0x1d
SHA3 OpCode = 0x20
KECCAK256 OpCode = 0x20
)
// 0x30 range - closure state.
@ -254,7 +254,7 @@ var opCodeToString = map[OpCode]string{
MULMOD: "MULMOD",
// 0x20 range - crypto.
SHA3: "SHA3",
KECCAK256: "KECCAK256",
// 0x30 range - closure state.
ADDRESS: "ADDRESS",
@ -422,7 +422,7 @@ var stringToOp = map[string]OpCode{
"SAR": SAR,
"ADDMOD": ADDMOD,
"MULMOD": MULMOD,
"SHA3": SHA3,
"KECCAK256": KECCAK256,
"ADDRESS": ADDRESS,
"BALANCE": BALANCE,
"ORIGIN": ORIGIN,