We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18499f4 commit 3c9ea6dCopy full SHA for 3c9ea6d
lib/evmone/baseline.cpp
@@ -216,7 +216,7 @@ evmc_result baseline_execute(ExecutionState& state, const JumpdestMap& jumpdest_
216
217
case OP_KECCAK256:
218
{
219
- const auto status_code = sha3(state);
+ const auto status_code = keccak256(state);
220
if (status_code != EVMC_SUCCESS)
221
222
state.status = status_code;
lib/evmone/instructions.cpp
@@ -227,7 +227,7 @@ constexpr std::array<instruction_exec_fn, 256> instruction_implementations = [](
227
table[OP_SHR] = op<shr>;
228
table[OP_SAR] = op<sar>;
229
230
- table[OP_KECCAK256] = op<sha3>;
+ table[OP_KECCAK256] = op<keccak256>;
231
232
table[OP_ADDRESS] = op<address>;
233
table[OP_BALANCE] = op<balance>;
lib/evmone/instructions.hpp
@@ -253,7 +253,7 @@ inline void sar(evm_stack& stack) noexcept
253
}
254
255
256
-inline evmc_status_code sha3(ExecutionState& state) noexcept
+inline evmc_status_code keccak256(ExecutionState& state) noexcept
257
258
const auto index = state.stack.pop();
259
auto& size = state.stack.top();
test/unittests/evm_test.cpp
@@ -598,7 +598,7 @@ TEST_P(evm, invalid)
598
EXPECT_EQ(result.gas_left, 0);
599
600
601
-TEST_P(evm, sha3)
+TEST_P(evm, keccak256)
602
603
execute("6108006103ff2060005260206000f3");
604
EXPECT_EQ(result.status_code, EVMC_SUCCESS);
@@ -608,7 +608,7 @@ TEST_P(evm, sha3)
608
EXPECT_EQ(bytes(&result.output_data[0], 32), hash);
609
610
611
-TEST_P(evm, sha3_empty)
+TEST_P(evm, keccak256_empty)
612
613
auto code = push(0) + OP_DUP1 + OP_KECCAK256 + ret_top();
614
execute(code);
@@ -820,11 +820,11 @@ TEST_P(evm, mstore8_memory_cost)
820
EXPECT_EQ(result.status_code, EVMC_OUT_OF_GAS);
821
822
823
-TEST_P(evm, sha3_memory_cost)
+TEST_P(evm, keccak256_memory_cost)
824
825
- execute(45, sha3(0, 1));
+ execute(45, keccak256(0, 1));
826
827
- execute(44, sha3(0, 1));
+ execute(44, keccak256(0, 1));
828
829
830
test/utils/bytecode.hpp
@@ -188,7 +188,7 @@ inline bytecode ret(bytecode c)
188
return c + ret_top();
189
190
191
-inline bytecode sha3(bytecode index, bytecode size)
+inline bytecode keccak256(bytecode index, bytecode size)
192
193
return size + index + OP_KECCAK256;
194
0 commit comments