Skip to content

Commit

Permalink
Fix remaining EOF fork spots
Browse files Browse the repository at this point in the history
  • Loading branch information
pdobacz committed Oct 22, 2024
1 parent 76e4a62 commit a70962b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ docker run --entrypoint evmone-bench ethereum/evmone /src/test/benchmarks
evmone supports EOFv1. Since EOF validation is done once during deploy-time, evmone does not revalidate during execution of bytecode. To force EOF revalidation, you can use the `validate_eof` option, example:

```
evmc run --vm libevmone.so,validate_eof --rev 13 "EF00"
evmc run --vm libevmone.so,validate_eof --rev 14 "EF00"
```

## References
Expand Down
8 changes: 4 additions & 4 deletions test/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ DUP1,4
{\"pc\":6,\"op\":3,\"gas\":\"0xf4234\",\"gasCost\":\"0x3\",\"memSize\":0,\"stack\":\\[\"0x0\",\"0x4\"\\],\"depth\":1,\"refund\":0,\"opName\":\"SUB\"}
")

add_test(NAME ${PREFIX}/validate_eof COMMAND evmc::tool --vm $<TARGET_FILE:evmone>,validate_eof run --rev 13 EF0001)
add_test(NAME ${PREFIX}/validate_eof COMMAND evmc::tool --vm $<TARGET_FILE:evmone>,validate_eof run --rev 14 EF0001)
set_tests_properties(
${PREFIX}/validate_eof PROPERTIES PASS_REGULAR_EXPRESSION
"contract validation failure")

add_test(NAME ${PREFIX}/validate_eof_success COMMAND evmc::tool --vm $<TARGET_FILE:evmone>,validate_eof run --rev 13 EF00010100040200010001040000000080000000)
add_test(NAME ${PREFIX}/validate_eof_success COMMAND evmc::tool --vm $<TARGET_FILE:evmone>,validate_eof run --rev 14 EF00010100040200010001040000000080000000)
set_tests_properties(
${PREFIX}/validate_eof_success PROPERTIES PASS_REGULAR_EXPRESSION
"Result: success")

add_test(NAME ${PREFIX}/validate_eof_create COMMAND evmc::tool --vm $<TARGET_FILE:evmone>,validate_eof run --rev 13 --create EF00010100040200010001040000000080000000)
add_test(NAME ${PREFIX}/validate_eof_create COMMAND evmc::tool --vm $<TARGET_FILE:evmone>,validate_eof run --rev 14 --create EF00010100040200010001040000000080000000)
set_tests_properties(
${PREFIX}/validate_eof_create PROPERTIES PASS_REGULAR_EXPRESSION
"contract validation failure")

add_test(NAME ${PREFIX}/validate_eof_create_success COMMAND evmc::tool --vm $<TARGET_FILE:evmone>,validate_eof run --rev 13 --create EF00010100040200010004030001001404000000008000025F5FEE00EF00010100040200010001040000000080000000)
add_test(NAME ${PREFIX}/validate_eof_create_success COMMAND evmc::tool --vm $<TARGET_FILE:evmone>,validate_eof run --rev 14 --create EF00010100040200010004030001001404000000008000025F5FEE00EF00010100040200010001040000000080000000)
set_tests_properties(
${PREFIX}/validate_eof_create_success PROPERTIES PASS_REGULAR_EXPRESSION
"Result: success")
Expand Down
2 changes: 1 addition & 1 deletion test/integration/statetest/eof/invalid_eof_in_state.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"currentTimestamp": "0x03e8"
},
"post": {
"Prague": [
"Osaka": [
{
"hash": "0xe8010ce590f401c9d61fef8ab05bea9bcec24281b795e5868809bc4e515aa530",
"indexes": {
Expand Down
2 changes: 1 addition & 1 deletion test/unittests/eof_validation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ TEST_F(eof_validation, EOF1_undefined_opcodes)
opcode == OP_DATALOADN || opcode == OP_JUMPF || opcode == OP_EOFCREATE ||
opcode == OP_RETURNCONTRACT)
continue;
// These opcodes are deprecated since Prague.
// These opcodes are deprecated since Osaka.
// gas_cost table current implementation does not allow to undef instructions.
if (opcode == OP_JUMP || opcode == OP_JUMPI || opcode == OP_PC || opcode == OP_CALLCODE ||
opcode == OP_SELFDESTRUCT || opcode == OP_CALL || opcode == OP_STATICCALL ||
Expand Down

0 comments on commit a70962b

Please sign in to comment.