separate Frontier and Homestead opcode dispatcher

This commit is contained in:
andri lim 2019-03-18 11:27:32 +07:00
parent b4720bce26
commit 4383831772
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
4 changed files with 161 additions and 173 deletions

View File

@ -86,7 +86,7 @@ OK: 2/3 Fail: 0/3 Skip: 1/3
callcallcallcode_001.json Skip callcallcallcode_001.json Skip
callcallcallcode_001_OOGE.json Skip callcallcallcode_001_OOGE.json Skip
callcallcallcode_001_OOGMAfter.json Skip callcallcallcode_001_OOGMAfter.json Skip
+ callcallcallcode_001_OOGMBefore.json OK callcallcallcode_001_OOGMBefore.json Skip
callcallcallcode_001_SuicideEnd.json Skip callcallcallcode_001_SuicideEnd.json Skip
+ callcallcallcode_001_SuicideMiddle.json OK + callcallcallcode_001_SuicideMiddle.json OK
callcallcallcode_ABCB_RECURSIVE.json Skip callcallcallcode_ABCB_RECURSIVE.json Skip
@ -94,16 +94,16 @@ OK: 2/3 Fail: 0/3 Skip: 1/3
callcallcode_01_OOGE.json Skip callcallcode_01_OOGE.json Skip
callcallcode_01_SuicideEnd.json Skip callcallcode_01_SuicideEnd.json Skip
callcallcodecall_010.json Skip callcallcodecall_010.json Skip
callcallcodecall_010_OOGE.json Skip + callcallcodecall_010_OOGE.json OK
+ callcallcodecall_010_OOGMAfter.json OK callcallcodecall_010_OOGMAfter.json Skip
callcallcodecall_010_OOGMBefore.json Skip callcallcodecall_010_OOGMBefore.json Skip
callcallcodecall_010_SuicideEnd.json Skip callcallcodecall_010_SuicideEnd.json Skip
callcallcodecall_010_SuicideMiddle.json Skip callcallcodecall_010_SuicideMiddle.json Skip
callcallcodecall_ABCB_RECURSIVE.json Skip callcallcodecall_ABCB_RECURSIVE.json Skip
callcallcodecallcode_011.json Skip callcallcodecallcode_011.json Skip
callcallcodecallcode_011_OOGE.json Skip + callcallcodecallcode_011_OOGE.json OK
+ callcallcodecallcode_011_OOGMAfter.json OK callcallcodecallcode_011_OOGMAfter.json Skip
callcallcodecallcode_011_OOGMBefore.json Skip + callcallcodecallcode_011_OOGMBefore.json OK
callcallcodecallcode_011_SuicideEnd.json Skip callcallcodecallcode_011_SuicideEnd.json Skip
callcallcodecallcode_011_SuicideMiddle.json Skip callcallcodecallcode_011_SuicideMiddle.json Skip
callcallcodecallcode_ABCB_RECURSIVE.json Skip callcallcodecallcode_ABCB_RECURSIVE.json Skip
@ -115,42 +115,42 @@ OK: 2/3 Fail: 0/3 Skip: 1/3
+ callcodeInInitcodeToExistingContract.json OK + callcodeInInitcodeToExistingContract.json OK
+ callcodeInInitcodeToExistingContractWithValueTransfer.json OK + callcodeInInitcodeToExistingContractWithValueTransfer.json OK
+ callcode_checkPC.json OK + callcode_checkPC.json OK
callcodecall_10.json Skip + callcodecall_10.json OK
callcodecall_10_OOGE.json Skip + callcodecall_10_OOGE.json OK
callcodecall_10_SuicideEnd.json Skip + callcodecall_10_SuicideEnd.json OK
callcodecallcall_100.json Skip callcodecallcall_100.json Skip
callcodecallcall_100_OOGE.json Skip + callcodecallcall_100_OOGE.json OK
+ callcodecallcall_100_OOGMAfter.json OK + callcodecallcall_100_OOGMAfter.json OK
callcodecallcall_100_OOGMBefore.json Skip + callcodecallcall_100_OOGMBefore.json OK
callcodecallcall_100_SuicideEnd.json Skip + callcodecallcall_100_SuicideEnd.json OK
callcodecallcall_100_SuicideMiddle.json Skip + callcodecallcall_100_SuicideMiddle.json OK
callcodecallcall_ABCB_RECURSIVE.json Skip callcodecallcall_ABCB_RECURSIVE.json Skip
callcodecallcallcode_101.json Skip callcodecallcallcode_101.json Skip
callcodecallcallcode_101_OOGE.json Skip + callcodecallcallcode_101_OOGE.json OK
callcodecallcallcode_101_OOGMAfter.json Skip + callcodecallcallcode_101_OOGMAfter.json OK
callcodecallcallcode_101_OOGMBefore.json Skip + callcodecallcallcode_101_OOGMBefore.json OK
callcodecallcallcode_101_SuicideEnd.json Skip + callcodecallcallcode_101_SuicideEnd.json OK
callcodecallcallcode_101_SuicideMiddle.json Skip + callcodecallcallcode_101_SuicideMiddle.json OK
callcodecallcallcode_ABCB_RECURSIVE.json Skip callcodecallcallcode_ABCB_RECURSIVE.json Skip
callcodecallcode_11.json Skip callcodecallcode_11.json Skip
callcodecallcode_11_OOGE.json Skip + callcodecallcode_11_OOGE.json OK
callcodecallcode_11_SuicideEnd.json Skip + callcodecallcode_11_SuicideEnd.json OK
callcodecallcodecall_110.json Skip callcodecallcodecall_110.json Skip
callcodecallcodecall_110_OOGE.json Skip + callcodecallcodecall_110_OOGE.json OK
callcodecallcodecall_110_OOGMAfter.json Skip + callcodecallcodecall_110_OOGMAfter.json OK
callcodecallcodecall_110_OOGMBefore.json Skip + callcodecallcodecall_110_OOGMBefore.json OK
callcodecallcodecall_110_SuicideEnd.json Skip + callcodecallcodecall_110_SuicideEnd.json OK
callcodecallcodecall_110_SuicideMiddle.json Skip + callcodecallcodecall_110_SuicideMiddle.json OK
callcodecallcodecall_ABCB_RECURSIVE.json Skip callcodecallcodecall_ABCB_RECURSIVE.json Skip
callcodecallcodecallcode_111.json Skip callcodecallcodecallcode_111.json Skip
callcodecallcodecallcode_111_OOGE.json Skip + callcodecallcodecallcode_111_OOGE.json OK
+ callcodecallcodecallcode_111_OOGMAfter.json OK + callcodecallcodecallcode_111_OOGMAfter.json OK
callcodecallcodecallcode_111_OOGMBefore.json Skip + callcodecallcodecallcode_111_OOGMBefore.json OK
callcodecallcodecallcode_111_SuicideEnd.json Skip + callcodecallcodecallcode_111_SuicideEnd.json OK
callcodecallcodecallcode_111_SuicideMiddle.json Skip + callcodecallcodecallcode_111_SuicideMiddle.json OK
callcodecallcodecallcode_ABCB_RECURSIVE.json Skip callcodecallcodecallcode_ABCB_RECURSIVE.json Skip
``` ```
OK: 27/79 Fail: 0/79 Skip: 52/79 OK: 50/79 Fail: 0/79 Skip: 29/79
## stCallCreateCallCodeTest ## stCallCreateCallCodeTest
```diff ```diff
Call1024BalanceTooLow.json Skip Call1024BalanceTooLow.json Skip
@ -183,7 +183,7 @@ OK: 27/79 Fail: 0/79 Skip: 52/79
+ createInitFailBadJumpDestination.json OK + createInitFailBadJumpDestination.json OK
+ createInitFailStackSizeLargerThan1024.json OK + createInitFailStackSizeLargerThan1024.json OK
+ createInitFailStackUnderflow.json OK + createInitFailStackUnderflow.json OK
+ createInitFailUndefinedInstruction.json OK createInitFailUndefinedInstruction.json Skip
+ createInitFail_OOGduringInit.json OK + createInitFail_OOGduringInit.json OK
+ createInitOOGforCREATE.json OK + createInitOOGforCREATE.json OK
createJS_ExampleContract.json Skip createJS_ExampleContract.json Skip
@ -193,13 +193,13 @@ OK: 27/79 Fail: 0/79 Skip: 52/79
+ createNameRegistratorPreStore1NotEnoughGas.json OK + createNameRegistratorPreStore1NotEnoughGas.json OK
+ createNameRegistratorendowmentTooHigh.json OK + createNameRegistratorendowmentTooHigh.json OK
``` ```
OK: 19/39 Fail: 0/39 Skip: 20/39 OK: 18/39 Fail: 0/39 Skip: 21/39
## stCallDelegateCodesCallCodeHomestead ## stCallDelegateCodesCallCodeHomestead
```diff ```diff
callcallcallcode_001.json Skip callcallcallcode_001.json Skip
callcallcallcode_001_OOGE.json Skip callcallcallcode_001_OOGE.json Skip
callcallcallcode_001_OOGMAfter.json Skip callcallcallcode_001_OOGMAfter.json Skip
+ callcallcallcode_001_OOGMBefore.json OK callcallcallcode_001_OOGMBefore.json Skip
callcallcallcode_001_SuicideEnd.json Skip callcallcallcode_001_SuicideEnd.json Skip
+ callcallcallcode_001_SuicideMiddle.json OK + callcallcallcode_001_SuicideMiddle.json OK
callcallcallcode_ABCB_RECURSIVE.json Skip callcallcallcode_ABCB_RECURSIVE.json Skip
@ -207,61 +207,61 @@ OK: 19/39 Fail: 0/39 Skip: 20/39
callcallcode_01_OOGE.json Skip callcallcode_01_OOGE.json Skip
callcallcode_01_SuicideEnd.json Skip callcallcode_01_SuicideEnd.json Skip
callcallcodecall_010.json Skip callcallcodecall_010.json Skip
callcallcodecall_010_OOGE.json Skip + callcallcodecall_010_OOGE.json OK
+ callcallcodecall_010_OOGMAfter.json OK callcallcodecall_010_OOGMAfter.json Skip
callcallcodecall_010_OOGMBefore.json Skip callcallcodecall_010_OOGMBefore.json Skip
callcallcodecall_010_SuicideEnd.json Skip callcallcodecall_010_SuicideEnd.json Skip
callcallcodecall_010_SuicideMiddle.json Skip callcallcodecall_010_SuicideMiddle.json Skip
callcallcodecall_ABCB_RECURSIVE.json Skip callcallcodecall_ABCB_RECURSIVE.json Skip
callcallcodecallcode_011.json Skip callcallcodecallcode_011.json Skip
callcallcodecallcode_011_OOGE.json Skip + callcallcodecallcode_011_OOGE.json OK
+ callcallcodecallcode_011_OOGMAfter.json OK callcallcodecallcode_011_OOGMAfter.json Skip
callcallcodecallcode_011_OOGMBefore.json Skip + callcallcodecallcode_011_OOGMBefore.json OK
callcallcodecallcode_011_SuicideEnd.json Skip callcallcodecallcode_011_SuicideEnd.json Skip
callcallcodecallcode_011_SuicideMiddle.json Skip callcallcodecallcode_011_SuicideMiddle.json Skip
callcallcodecallcode_ABCB_RECURSIVE.json Skip callcallcodecallcode_ABCB_RECURSIVE.json Skip
callcodecall_10.json Skip + callcodecall_10.json OK
callcodecall_10_OOGE.json Skip + callcodecall_10_OOGE.json OK
callcodecall_10_SuicideEnd.json Skip + callcodecall_10_SuicideEnd.json OK
callcodecallcall_100.json Skip callcodecallcall_100.json Skip
callcodecallcall_100_OOGE.json Skip + callcodecallcall_100_OOGE.json OK
+ callcodecallcall_100_OOGMAfter.json OK + callcodecallcall_100_OOGMAfter.json OK
callcodecallcall_100_OOGMBefore.json Skip + callcodecallcall_100_OOGMBefore.json OK
callcodecallcall_100_SuicideEnd.json Skip + callcodecallcall_100_SuicideEnd.json OK
callcodecallcall_100_SuicideMiddle.json Skip + callcodecallcall_100_SuicideMiddle.json OK
callcodecallcall_ABCB_RECURSIVE.json Skip callcodecallcall_ABCB_RECURSIVE.json Skip
callcodecallcallcode_101.json Skip callcodecallcallcode_101.json Skip
callcodecallcallcode_101_OOGE.json Skip + callcodecallcallcode_101_OOGE.json OK
callcodecallcallcode_101_OOGMAfter.json Skip + callcodecallcallcode_101_OOGMAfter.json OK
callcodecallcallcode_101_OOGMBefore.json Skip + callcodecallcallcode_101_OOGMBefore.json OK
callcodecallcallcode_101_SuicideEnd.json Skip + callcodecallcallcode_101_SuicideEnd.json OK
callcodecallcallcode_101_SuicideMiddle.json Skip + callcodecallcallcode_101_SuicideMiddle.json OK
callcodecallcallcode_ABCB_RECURSIVE.json Skip callcodecallcallcode_ABCB_RECURSIVE.json Skip
callcodecallcode_11.json Skip callcodecallcode_11.json Skip
callcodecallcode_11_OOGE.json Skip + callcodecallcode_11_OOGE.json OK
callcodecallcode_11_SuicideEnd.json Skip + callcodecallcode_11_SuicideEnd.json OK
callcodecallcodecall_110.json Skip callcodecallcodecall_110.json Skip
callcodecallcodecall_110_OOGE.json Skip + callcodecallcodecall_110_OOGE.json OK
callcodecallcodecall_110_OOGMAfter.json Skip + callcodecallcodecall_110_OOGMAfter.json OK
callcodecallcodecall_110_OOGMBefore.json Skip + callcodecallcodecall_110_OOGMBefore.json OK
callcodecallcodecall_110_SuicideEnd.json Skip + callcodecallcodecall_110_SuicideEnd.json OK
callcodecallcodecall_110_SuicideMiddle.json Skip + callcodecallcodecall_110_SuicideMiddle.json OK
callcodecallcodecall_ABCB_RECURSIVE.json Skip callcodecallcodecall_ABCB_RECURSIVE.json Skip
callcodecallcodecallcode_111.json Skip callcodecallcodecallcode_111.json Skip
callcodecallcodecallcode_111_OOGE.json Skip + callcodecallcodecallcode_111_OOGE.json OK
+ callcodecallcodecallcode_111_OOGMAfter.json OK + callcodecallcodecallcode_111_OOGMAfter.json OK
callcodecallcodecallcode_111_OOGMBefore.json Skip + callcodecallcodecallcode_111_OOGMBefore.json OK
callcodecallcodecallcode_111_SuicideEnd.json Skip + callcodecallcodecallcode_111_SuicideEnd.json OK
callcodecallcodecallcode_111_SuicideMiddle.json Skip + callcodecallcodecallcode_111_SuicideMiddle.json OK
callcodecallcodecallcode_ABCB_RECURSIVE.json Skip callcodecallcodecallcode_ABCB_RECURSIVE.json Skip
``` ```
OK: 6/58 Fail: 0/58 Skip: 52/58 OK: 29/58 Fail: 0/58 Skip: 29/58
## stCallDelegateCodesHomestead ## stCallDelegateCodesHomestead
```diff ```diff
callcallcallcode_001.json Skip callcallcallcode_001.json Skip
callcallcallcode_001_OOGE.json Skip callcallcallcode_001_OOGE.json Skip
callcallcallcode_001_OOGMAfter.json Skip callcallcallcode_001_OOGMAfter.json Skip
+ callcallcallcode_001_OOGMBefore.json OK callcallcallcode_001_OOGMBefore.json Skip
callcallcallcode_001_SuicideEnd.json Skip callcallcallcode_001_SuicideEnd.json Skip
+ callcallcallcode_001_SuicideMiddle.json OK + callcallcallcode_001_SuicideMiddle.json OK
callcallcallcode_ABCB_RECURSIVE.json Skip callcallcallcode_ABCB_RECURSIVE.json Skip
@ -269,55 +269,55 @@ OK: 6/58 Fail: 0/58 Skip: 52/58
callcallcode_01_OOGE.json Skip callcallcode_01_OOGE.json Skip
callcallcode_01_SuicideEnd.json Skip callcallcode_01_SuicideEnd.json Skip
callcallcodecall_010.json Skip callcallcodecall_010.json Skip
callcallcodecall_010_OOGE.json Skip + callcallcodecall_010_OOGE.json OK
+ callcallcodecall_010_OOGMAfter.json OK callcallcodecall_010_OOGMAfter.json Skip
callcallcodecall_010_OOGMBefore.json Skip callcallcodecall_010_OOGMBefore.json Skip
callcallcodecall_010_SuicideEnd.json Skip callcallcodecall_010_SuicideEnd.json Skip
callcallcodecall_010_SuicideMiddle.json Skip callcallcodecall_010_SuicideMiddle.json Skip
callcallcodecall_ABCB_RECURSIVE.json Skip callcallcodecall_ABCB_RECURSIVE.json Skip
callcallcodecallcode_011.json Skip callcallcodecallcode_011.json Skip
callcallcodecallcode_011_OOGE.json Skip + callcallcodecallcode_011_OOGE.json OK
+ callcallcodecallcode_011_OOGMAfter.json OK callcallcodecallcode_011_OOGMAfter.json Skip
callcallcodecallcode_011_OOGMBefore.json Skip + callcallcodecallcode_011_OOGMBefore.json OK
callcallcodecallcode_011_SuicideEnd.json Skip callcallcodecallcode_011_SuicideEnd.json Skip
callcallcodecallcode_011_SuicideMiddle.json Skip callcallcodecallcode_011_SuicideMiddle.json Skip
callcallcodecallcode_ABCB_RECURSIVE.json Skip callcallcodecallcode_ABCB_RECURSIVE.json Skip
callcodecall_10.json Skip + callcodecall_10.json OK
callcodecall_10_OOGE.json Skip + callcodecall_10_OOGE.json OK
callcodecall_10_SuicideEnd.json Skip + callcodecall_10_SuicideEnd.json OK
callcodecallcall_100.json Skip callcodecallcall_100.json Skip
callcodecallcall_100_OOGE.json Skip + callcodecallcall_100_OOGE.json OK
+ callcodecallcall_100_OOGMAfter.json OK + callcodecallcall_100_OOGMAfter.json OK
callcodecallcall_100_OOGMBefore.json Skip + callcodecallcall_100_OOGMBefore.json OK
callcodecallcall_100_SuicideEnd.json Skip + callcodecallcall_100_SuicideEnd.json OK
callcodecallcall_100_SuicideMiddle.json Skip + callcodecallcall_100_SuicideMiddle.json OK
callcodecallcall_ABCB_RECURSIVE.json Skip callcodecallcall_ABCB_RECURSIVE.json Skip
callcodecallcallcode_101.json Skip callcodecallcallcode_101.json Skip
callcodecallcallcode_101_OOGE.json Skip + callcodecallcallcode_101_OOGE.json OK
callcodecallcallcode_101_OOGMAfter.json Skip + callcodecallcallcode_101_OOGMAfter.json OK
callcodecallcallcode_101_OOGMBefore.json Skip + callcodecallcallcode_101_OOGMBefore.json OK
callcodecallcallcode_101_SuicideEnd.json Skip + callcodecallcallcode_101_SuicideEnd.json OK
callcodecallcallcode_101_SuicideMiddle.json Skip + callcodecallcallcode_101_SuicideMiddle.json OK
callcodecallcallcode_ABCB_RECURSIVE.json Skip callcodecallcallcode_ABCB_RECURSIVE.json Skip
callcodecallcode_11.json Skip callcodecallcode_11.json Skip
callcodecallcode_11_OOGE.json Skip + callcodecallcode_11_OOGE.json OK
callcodecallcode_11_SuicideEnd.json Skip + callcodecallcode_11_SuicideEnd.json OK
callcodecallcodecall_110.json Skip callcodecallcodecall_110.json Skip
callcodecallcodecall_110_OOGE.json Skip + callcodecallcodecall_110_OOGE.json OK
callcodecallcodecall_110_OOGMAfter.json Skip + callcodecallcodecall_110_OOGMAfter.json OK
callcodecallcodecall_110_OOGMBefore.json Skip + callcodecallcodecall_110_OOGMBefore.json OK
callcodecallcodecall_110_SuicideEnd.json Skip + callcodecallcodecall_110_SuicideEnd.json OK
callcodecallcodecall_110_SuicideMiddle.json Skip + callcodecallcodecall_110_SuicideMiddle.json OK
callcodecallcodecall_ABCB_RECURSIVE.json Skip callcodecallcodecall_ABCB_RECURSIVE.json Skip
callcodecallcodecallcode_111.json Skip callcodecallcodecallcode_111.json Skip
callcodecallcodecallcode_111_OOGE.json Skip + callcodecallcodecallcode_111_OOGE.json OK
+ callcodecallcodecallcode_111_OOGMAfter.json OK + callcodecallcodecallcode_111_OOGMAfter.json OK
callcodecallcodecallcode_111_OOGMBefore.json Skip + callcodecallcodecallcode_111_OOGMBefore.json OK
callcodecallcodecallcode_111_SuicideEnd.json Skip + callcodecallcodecallcode_111_SuicideEnd.json OK
callcodecallcodecallcode_111_SuicideMiddle.json Skip + callcodecallcodecallcode_111_SuicideMiddle.json OK
callcodecallcodecallcode_ABCB_RECURSIVE.json Skip callcodecallcodecallcode_ABCB_RECURSIVE.json Skip
``` ```
OK: 6/58 Fail: 0/58 Skip: 52/58 OK: 29/58 Fail: 0/58 Skip: 29/58
## stChangedEIP150 ## stChangedEIP150
```diff ```diff
Call1024BalanceTooLow.json Skip Call1024BalanceTooLow.json Skip
@ -335,7 +335,7 @@ OK: 6/58 Fail: 0/58 Skip: 52/58
+ callcallcodecall_010_OOGMAfter_3.json OK + callcallcodecall_010_OOGMAfter_3.json OK
+ callcallcodecallcode_011_OOGMAfter_1.json OK + callcallcodecallcode_011_OOGMAfter_1.json OK
+ callcallcodecallcode_011_OOGMAfter_2.json OK + callcallcodecallcode_011_OOGMAfter_2.json OK
callcodecallcall_100_OOGMAfter_1.json Skip + callcodecallcall_100_OOGMAfter_1.json OK
+ callcodecallcall_100_OOGMAfter_2.json OK + callcodecallcall_100_OOGMAfter_2.json OK
+ callcodecallcall_100_OOGMAfter_3.json OK + callcodecallcall_100_OOGMAfter_3.json OK
+ callcodecallcallcode_101_OOGMAfter_1.json OK + callcodecallcallcode_101_OOGMAfter_1.json OK
@ -351,7 +351,7 @@ OK: 6/58 Fail: 0/58 Skip: 52/58
+ contractCreationMakeCallThatAskMoreGasThenTransactionProvided.jsonOK + contractCreationMakeCallThatAskMoreGasThenTransactionProvided.jsonOK
+ createInitFail_OOGduringInit.json OK + createInitFail_OOGduringInit.json OK
``` ```
OK: 25/30 Fail: 0/30 Skip: 5/30 OK: 26/30 Fail: 0/30 Skip: 4/30
## stCodeCopyTest ## stCodeCopyTest
```diff ```diff
+ ExtCodeCopyTests.json OK + ExtCodeCopyTests.json OK
@ -592,9 +592,9 @@ OK: 46/46 Fail: 0/46 Skip: 0/46
+ CreateAndGasInsideCreateWithMemExpandingCalls.json OK + CreateAndGasInsideCreateWithMemExpandingCalls.json OK
+ DelegateCallOnEIPWithMemExpandingCalls.json OK + DelegateCallOnEIPWithMemExpandingCalls.json OK
+ ExecuteCallThatAskMoreGasThenTransactionHasWithMemExpandingCalls.jsonOK + ExecuteCallThatAskMoreGasThenTransactionHasWithMemExpandingCalls.jsonOK
NewGasPriceForCodesWithMemExpandingCalls.json Skip + NewGasPriceForCodesWithMemExpandingCalls.json OK
``` ```
OK: 7/8 Fail: 0/8 Skip: 1/8 OK: 8/8 Fail: 0/8 Skip: 0/8
## stMemoryStressTest ## stMemoryStressTest
```diff ```diff
CALLCODE_Bounds.json Skip CALLCODE_Bounds.json Skip
@ -718,10 +718,10 @@ OK: 67/67 Fail: 0/67 Skip: 0/67
+ NonZeroValue_CALL_ToEmpty.json OK + NonZeroValue_CALL_ToEmpty.json OK
+ NonZeroValue_CALL_ToNonNonZeroBalance.json OK + NonZeroValue_CALL_ToNonNonZeroBalance.json OK
+ NonZeroValue_CALL_ToOneStorageKey.json OK + NonZeroValue_CALL_ToOneStorageKey.json OK
NonZeroValue_DELEGATECALL.json Skip + NonZeroValue_DELEGATECALL.json OK
NonZeroValue_DELEGATECALL_ToEmpty.json Skip + NonZeroValue_DELEGATECALL_ToEmpty.json OK
NonZeroValue_DELEGATECALL_ToNonNonZeroBalance.json Skip + NonZeroValue_DELEGATECALL_ToNonNonZeroBalance.json OK
NonZeroValue_DELEGATECALL_ToOneStorageKey.json Skip + NonZeroValue_DELEGATECALL_ToOneStorageKey.json OK
+ NonZeroValue_SUICIDE.json OK + NonZeroValue_SUICIDE.json OK
+ NonZeroValue_SUICIDE_ToEmpty.json OK + NonZeroValue_SUICIDE_ToEmpty.json OK
+ NonZeroValue_SUICIDE_ToNonNonZeroBalance.json OK + NonZeroValue_SUICIDE_ToNonNonZeroBalance.json OK
@ -735,7 +735,7 @@ OK: 67/67 Fail: 0/67 Skip: 0/67
+ NonZeroValue_TransactionCALLwithData_ToNonNonZeroBalance.json OK + NonZeroValue_TransactionCALLwithData_ToNonNonZeroBalance.json OK
+ NonZeroValue_TransactionCALLwithData_ToOneStorageKey.json OK + NonZeroValue_TransactionCALLwithData_ToOneStorageKey.json OK
``` ```
OK: 20/24 Fail: 0/24 Skip: 4/24 OK: 24/24 Fail: 0/24 Skip: 0/24
## stPreCompiledContracts ## stPreCompiledContracts
```diff ```diff
identity_to_bigger.json Skip identity_to_bigger.json Skip
@ -2229,10 +2229,10 @@ OK: 0/24 Fail: 0/24 Skip: 24/24
+ ZeroValue_CALL_ToEmpty.json OK + ZeroValue_CALL_ToEmpty.json OK
+ ZeroValue_CALL_ToNonZeroBalance.json OK + ZeroValue_CALL_ToNonZeroBalance.json OK
+ ZeroValue_CALL_ToOneStorageKey.json OK + ZeroValue_CALL_ToOneStorageKey.json OK
ZeroValue_DELEGATECALL.json Skip + ZeroValue_DELEGATECALL.json OK
ZeroValue_DELEGATECALL_ToEmpty.json Skip + ZeroValue_DELEGATECALL_ToEmpty.json OK
ZeroValue_DELEGATECALL_ToNonZeroBalance.json Skip + ZeroValue_DELEGATECALL_ToNonZeroBalance.json OK
ZeroValue_DELEGATECALL_ToOneStorageKey.json Skip + ZeroValue_DELEGATECALL_ToOneStorageKey.json OK
+ ZeroValue_SUICIDE.json OK + ZeroValue_SUICIDE.json OK
+ ZeroValue_SUICIDE_ToEmpty.json OK + ZeroValue_SUICIDE_ToEmpty.json OK
+ ZeroValue_SUICIDE_ToNonZeroBalance.json OK + ZeroValue_SUICIDE_ToNonZeroBalance.json OK
@ -2246,7 +2246,7 @@ OK: 0/24 Fail: 0/24 Skip: 24/24
+ ZeroValue_TransactionCALLwithData_ToNonZeroBalance.json OK + ZeroValue_TransactionCALLwithData_ToNonZeroBalance.json OK
+ ZeroValue_TransactionCALLwithData_ToOneStorageKey.json OK + ZeroValue_TransactionCALLwithData_ToOneStorageKey.json OK
``` ```
OK: 20/24 Fail: 0/24 Skip: 4/24 OK: 24/24 Fail: 0/24 Skip: 0/24
## stZeroKnowledge ## stZeroKnowledge
```diff ```diff
ecmul_1-2_2_28000_128.json Skip ecmul_1-2_2_28000_128.json Skip
@ -2520,4 +2520,4 @@ OK: 0/133 Fail: 0/133 Skip: 133/133
OK: 0/130 Fail: 0/130 Skip: 130/130 OK: 0/130 Fail: 0/130 Skip: 130/130
---TOTAL--- ---TOTAL---
OK: 1231/2334 Fail: 0/2334 Skip: 1103/2334 OK: 1309/2334 Fail: 0/2334 Skip: 1025/2334

View File

@ -172,13 +172,18 @@ let FrontierOpDispatch {.compileTime.}: array[Op, NimNode] = block:
Call: newIdentNode "call", Call: newIdentNode "call",
CallCode: newIdentNode "callCode", CallCode: newIdentNode "callCode",
Return: newIdentNode "returnOp", Return: newIdentNode "returnOp",
DelegateCall: newIdentNode "delegateCall",
# StaticCall: introduced in Byzantium # StaticCall: introduced in Byzantium
# Revert: introduced in Byzantium # Revert: introduced in Byzantium
# Invalid: newIdentNode "invalid", # Invalid: newIdentNode "invalid",
SelfDestruct: newIdentNode "selfDestruct" SelfDestruct: newIdentNode "selfDestruct"
] ]
proc genHomesteadJumpTable(ops: array[Op, NimNode]): array[Op, NimNode] {.compileTime.} =
result = ops
result[DelegateCall] = newIdentNode "delegateCall"
let HomesteadOpDispatch {.compileTime.}: array[Op, NimNode] = genHomesteadJumpTable(FrontierOpDispatch)
proc opTableToCaseStmt(opTable: array[Op, NimNode], computation: NimNode): NimNode = proc opTableToCaseStmt(opTable: array[Op, NimNode], computation: NimNode): NimNode =
let instr = genSym(nskVar) let instr = genSym(nskVar)
@ -240,15 +245,25 @@ proc opTableToCaseStmt(opTable: array[Op, NimNode], computation: NimNode): NimNo
macro genFrontierDispatch(computation: BaseComputation): untyped = macro genFrontierDispatch(computation: BaseComputation): untyped =
result = opTableToCaseStmt(FrontierOpDispatch, computation) result = opTableToCaseStmt(FrontierOpDispatch, computation)
macro genHomesteadDispatch(computation: BaseComputation): untyped =
result = opTableToCaseStmt(HomesteadOpDispatch, computation)
proc frontierVM(computation: var BaseComputation) = proc frontierVM(computation: var BaseComputation) =
if not computation.execPrecompiles: if not computation.execPrecompiles:
genFrontierDispatch(computation) genFrontierDispatch(computation)
proc homesteadVM(computation: var BaseComputation) =
if not computation.execPrecompiles:
genHomesteadDispatch(computation)
proc updateOpcodeExec*(computation: var BaseComputation, fork: Fork) = proc updateOpcodeExec*(computation: var BaseComputation, fork: Fork) =
case fork case fork
of FkFrontier..FkSpurious: of FkFrontier:
computation.opCodeExec = frontierVM computation.opCodeExec = frontierVM
computation.frontierVM() computation.frontierVM()
of FkHomestead..FkSpurious:
computation.opCodeExec = homesteadVM
computation.homesteadVM()
else: else:
raise newException(VMError, "Unknown or not implemented fork: " & $fork) raise newException(VMError, "Unknown or not implemented fork: " & $fork)

View File

@ -13,32 +13,8 @@
# being mostly used for short-term regression prevention. # being mostly used for short-term regression prevention.
func allowedFailingGeneralStateTest*(folder, name: string): bool = func allowedFailingGeneralStateTest*(folder, name: string): bool =
let allowedFailingGeneralStateTests = @[ let allowedFailingGeneralStateTests = @[
"callcallcallcode_001.json",
"callcallcallcode_001.json",
"callcallcode_01.json",
"callcallcodecall_010.json",
"callcallcodecallcode_011.json",
"callcodecallcall_100.json",
"callcodecallcallcode_101.json",
"callcodecallcode_11.json",
"callcodecallcodecall_110.json",
"callcodecallcodecallcode_111.json",
"TransactionCollisionToEmptyButCode.json", "TransactionCollisionToEmptyButCode.json",
"TransactionCollisionToEmptyButNonce.json", "TransactionCollisionToEmptyButNonce.json",
"CallLoseGasOOG.json",
"CallcodeLoseGasOOG.json",
"callOutput1.json",
"callOutput2.json",
"callOutput3.json",
"callOutput3Fail.json",
"callOutput3partial.json",
"callOutput3partialFail.json",
"callcodeOutput1.json",
"callcodeOutput2.json",
"callcodeOutput3.json",
"callcodeOutput3Fail.json",
"callcodeOutput3partial.json",
"callcodeOutput3partialFail.json",
"deleagateCallAfterValueTransfer.json", "deleagateCallAfterValueTransfer.json",
"delegatecallInInitcodeToEmptyContract.json", "delegatecallInInitcodeToEmptyContract.json",
"delegatecallInInitcodeToExistingContract.json", "delegatecallInInitcodeToExistingContract.json",
@ -104,54 +80,52 @@ func allowedFailingGeneralStateTest*(folder, name: string): bool =
"callcodecallcodecallcode_ABCB_RECURSIVE.json", "callcodecallcodecallcode_ABCB_RECURSIVE.json",
# Frontier failed test cases # Frontier failed test cases
"createJS_ExampleContract.json", "createJS_ExampleContract.json",
"callcallcallcode_001_OOGMAfter_1.json",
"callcallcallcode_001_OOGMAfter_2.json",
"createInitFailUndefinedInstruction.json",
"callcallcodecall_010_OOGMAfter.json",
# Failed in homestead but OK in Frontier
"callcallcallcode_001.json",
"callcallcallcode_001_OOGE.json", "callcallcallcode_001_OOGE.json",
"callcallcallcode_001_OOGMAfter.json", "callcallcallcode_001_OOGMAfter.json",
"callcallcallcode_001_OOGMBefore.json",
"callcallcallcode_001_SuicideEnd.json", "callcallcallcode_001_SuicideEnd.json",
"callcallcallcode_ABCB_RECURSIVE.json", "callcallcallcode_ABCB_RECURSIVE.json",
"callcallcode_01.json",
"callcallcode_01_OOGE.json", "callcallcode_01_OOGE.json",
"callcallcode_01_SuicideEnd.json", "callcallcode_01_SuicideEnd.json",
"callcallcodecall_010_OOGE.json", "callcallcodecall_010.json",
"callcallcodecall_010_OOGMBefore.json", "callcallcodecall_010_OOGMBefore.json",
"callcallcodecall_010_SuicideEnd.json", "callcallcodecall_010_SuicideEnd.json",
"callcallcodecall_010_SuicideMiddle.json", "callcallcodecall_010_SuicideMiddle.json",
"callcallcodecallcode_011_OOGE.json", "callcallcodecallcode_011.json",
"callcallcodecallcode_011_OOGMBefore.json", "callcallcodecallcode_011_OOGMAfter.json",
"callcallcodecallcode_011_SuicideEnd.json", "callcallcodecallcode_011_SuicideEnd.json",
"callcallcodecallcode_011_SuicideMiddle.json", "callcallcodecallcode_011_SuicideMiddle.json",
"callcodecall_10.json", "callcallcallcode_001.json",
"callcodecall_10_OOGE.json", "callcallcallcode_001_OOGMAfter.json",
"callcodecall_10_SuicideEnd.json", "callcallcode_01.json",
"callcodecallcall_100_OOGE.json", "callcallcodecall_010.json",
"callcodecallcall_100_OOGMBefore.json", "callcallcodecallcode_011.json",
"callcodecallcall_100_SuicideEnd.json", "callcodecallcall_100.json",
"callcodecallcall_100_SuicideMiddle.json", "callcodecallcallcode_101.json",
"callcodecallcallcode_101_OOGE.json", "callcodecallcode_11.json",
"callcodecallcallcode_101_OOGMAfter.json", "callcodecallcodecall_110.json",
"callcodecallcallcode_101_OOGMBefore.json", "callcodecallcodecallcode_111.json",
"callcodecallcallcode_101_SuicideEnd.json", "CallLoseGasOOG.json",
"callcodecallcallcode_101_SuicideMiddle.json", "CallcodeLoseGasOOG.json",
"callcodecallcode_11_OOGE.json", "callOutput1.json",
"callcodecallcode_11_SuicideEnd.json", "callOutput2.json",
"callcodecallcodecall_110_OOGE.json", "callOutput3.json",
"callcodecallcodecall_110_OOGMAfter.json", "callOutput3Fail.json",
"callcodecallcodecall_110_OOGMBefore.json", "callOutput3partial.json",
"callcodecallcodecall_110_SuicideEnd.json", "callOutput3partialFail.json",
"callcodecallcodecall_110_SuicideMiddle.json", "callcodeOutput1.json",
"callcodecallcodecallcode_111_OOGE.json", "callcodeOutput2.json",
"callcodecallcodecallcode_111_OOGMBefore.json", "callcodeOutput3.json",
"callcodecallcodecallcode_111_SuicideEnd.json", "callcodeOutput3Fail.json",
"callcodecallcodecallcode_111_SuicideMiddle.json", "callcodeOutput3partial.json",
"callcallcallcode_001_OOGMAfter_1.json", "callcodeOutput3partialFail.json"
"callcallcallcode_001_OOGMAfter_2.json",
"callcodecallcall_100_OOGMAfter_1.json",
"NewGasPriceForCodesWithMemExpandingCalls.json",
"NonZeroValue_DELEGATECALL.json",
"NonZeroValue_DELEGATECALL_ToEmpty.json",
"NonZeroValue_DELEGATECALL_ToNonNonZeroBalance.json",
"NonZeroValue_DELEGATECALL_ToOneStorageKey.json",
"ZeroValue_DELEGATECALL.json",
"ZeroValue_DELEGATECALL_ToEmpty.json",
"ZeroValue_DELEGATECALL_ToNonZeroBalance.json",
"ZeroValue_DELEGATECALL_ToOneStorageKey.json"
] ]
result = name in allowedFailingGeneralStateTests result = name in allowedFailingGeneralStateTests

View File

@ -290,7 +290,6 @@ proc getFixtureTransaction*(j: JsonNode, dataIndex, gasIndex, valueIndex: int):
result.R = fromBytesBE(Uint256, raw[0..31]) result.R = fromBytesBE(Uint256, raw[0..31])
result.S = fromBytesBE(Uint256, raw[32..63]) result.S = fromBytesBE(Uint256, raw[32..63])
result.V = raw[64] + 27.byte result.V = raw[64] + 27.byte
proc hashLogEntries*(logs: seq[Log]): string = proc hashLogEntries*(logs: seq[Log]): string =
toLowerAscii("0x" & $keccakHash(rlp.encode(logs))) toLowerAscii("0x" & $keccakHash(rlp.encode(logs)))