fix invalid opcodes bug, GST +1

This commit is contained in:
andri lim 2019-03-18 13:44:22 +07:00
parent 4f6f564626
commit 739e20253a
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
4 changed files with 12 additions and 8 deletions

View File

@ -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

View File

@ -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 =

View File

@ -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": ""
}
]
},

View File

@ -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