diff --git a/GeneralStateTests.md b/GeneralStateTests.md index 2f9d7daa6..e052f0a88 100644 --- a/GeneralStateTests.md +++ b/GeneralStateTests.md @@ -183,7 +183,7 @@ OK: 50/79 Fail: 0/79 Skip: 29/79 + createInitFailBadJumpDestination.json OK + createInitFailStackSizeLargerThan1024.json OK + createInitFailStackUnderflow.json OK - createInitFailUndefinedInstruction.json Skip ++ createInitFailUndefinedInstruction.json OK + createInitFail_OOGduringInit.json OK + createInitOOGforCREATE.json OK + createJS_ExampleContract.json OK @@ -193,7 +193,7 @@ OK: 50/79 Fail: 0/79 Skip: 29/79 + createNameRegistratorPreStore1NotEnoughGas.json OK + createNameRegistratorendowmentTooHigh.json OK ``` -OK: 19/39 Fail: 0/39 Skip: 20/39 +OK: 20/39 Fail: 0/39 Skip: 19/39 ## stCallDelegateCodesCallCodeHomestead ```diff callcallcallcode_001.json Skip @@ -2520,4 +2520,4 @@ OK: 0/133 Fail: 0/133 Skip: 133/133 OK: 0/130 Fail: 0/130 Skip: 130/130 ---TOTAL--- -OK: 1310/2334 Fail: 0/2334 Skip: 1024/2334 +OK: 1311/2334 Fail: 0/2334 Skip: 1023/2334 diff --git a/nimbus/vm/computation.nim b/nimbus/vm/computation.nim index 26c361cf6..e4fccaf2f 100644 --- a/nimbus/vm/computation.nim +++ b/nimbus/vm/computation.nim @@ -160,7 +160,12 @@ proc applyMessage(computation: var BaseComputation, opCode: static[Op]): bool = debug "EVMError applyMessage failed", msg = computation.error.info, depth = computation.msg.depth - + except ValueError: + snapshot.revert(true) + debug "ValueError applyMessage failed", + msg = computation.error.info, + depth = computation.msg.depth + result = not computation.isError proc writeContract*(computation: var BaseComputation, fork: Fork): bool = diff --git a/tests/fixtures/TracerTests/block46402.json b/tests/fixtures/TracerTests/block46402.json index 455d22779..27b50bddc 100644 --- a/tests/fixtures/TracerTests/block46402.json +++ b/tests/fixtures/TracerTests/block46402.json @@ -283,7 +283,7 @@ "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000060" ], - "error": "Invalid instruction, received an opcode not implemented in the current fork." + "error": "" } ], "stateDiff": { @@ -704,7 +704,7 @@ "0000000000000000000000000000000000000000000000000000000000000000", "0000000000000000000000000000000000000000000000000000000000000060" ], - "error": "Invalid instruction, received an opcode not implemented in the current fork." + "error": "" } ] }, diff --git a/tests/test_generalstate_failing.nim b/tests/test_generalstate_failing.nim index dc2ef6bc2..44a5ba211 100644 --- a/tests/test_generalstate_failing.nim +++ b/tests/test_generalstate_failing.nim @@ -80,8 +80,7 @@ func allowedFailingGeneralStateTest*(folder, name: string): bool = "callcodecallcodecallcode_ABCB_RECURSIVE.json", # Frontier failed test cases "callcallcallcode_001_OOGMAfter_1.json", - "callcallcallcode_001_OOGMAfter_2.json", - "createInitFailUndefinedInstruction.json", + "callcallcallcode_001_OOGMAfter_2.json", "callcallcodecall_010_OOGMAfter.json", # Failed in homestead but OK in Frontier