fix byzantium bug related to revertPrecompileTouched

This commit is contained in:
jangko 2021-01-13 08:08:56 +07:00
parent 39723ee2fe
commit 9709525916
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
5 changed files with 15 additions and 27 deletions

View File

@ -3001,10 +3001,10 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ RevertPrecompiledTouchExactOOG_d8g1v0.json OK
+ RevertPrecompiledTouchExactOOG_d9g0v0.json OK
+ RevertPrecompiledTouchExactOOG_d9g1v0.json OK
RevertPrecompiledTouch_d0g0v0.json Skip
+ RevertPrecompiledTouch_d0g0v0.json OK
+ RevertPrecompiledTouch_d1g0v0.json OK
+ RevertPrecompiledTouch_d2g0v0.json OK
RevertPrecompiledTouch_d3g0v0.json Skip
+ RevertPrecompiledTouch_d3g0v0.json OK
+ RevertPrecompiledTouch_nonce_d0g0v0.json OK
+ RevertPrecompiledTouch_nonce_d1g0v0.json OK
+ RevertPrecompiledTouch_nonce_d2g0v0.json OK
@ -3013,10 +3013,10 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ RevertPrecompiledTouch_noncestorage_d1g0v0.json OK
+ RevertPrecompiledTouch_noncestorage_d2g0v0.json OK
+ RevertPrecompiledTouch_noncestorage_d3g0v0.json OK
RevertPrecompiledTouch_storage_d0g0v0.json Skip
+ RevertPrecompiledTouch_storage_d0g0v0.json OK
+ RevertPrecompiledTouch_storage_d1g0v0.json OK
+ RevertPrecompiledTouch_storage_d2g0v0.json OK
RevertPrecompiledTouch_storage_d3g0v0.json Skip
+ RevertPrecompiledTouch_storage_d3g0v0.json OK
+ RevertPrefoundCallOOG_d0g0v0.json OK
+ RevertPrefoundCall_d0g0v0.json OK
+ RevertPrefoundEmptyCallOOG_d0g0v0.json OK
@ -3045,7 +3045,7 @@ OK: 45/45 Fail: 0/45 Skip: 0/45
+ TouchToEmptyAccountRevert3_d0g1v0.json OK
+ TouchToEmptyAccountRevert_d0g0v0.json OK
```
OK: 207/211 Fail: 0/211 Skip: 4/211
OK: 211/211 Fail: 0/211 Skip: 0/211
## stSStoreTest
```diff
+ InitCollisionNonZeroNonce_d0g0v0.json OK
@ -11169,4 +11169,4 @@ OK: 804/804 Fail: 0/804 Skip: 0/804
OK: 519/519 Fail: 0/519 Skip: 0/519
---TOTAL---
OK: 10900/10907 Fail: 0/10907 Skip: 7/10907
OK: 10904/10907 Fail: 0/10907 Skip: 3/10907

View File

@ -1674,11 +1674,11 @@ OK: 38/38 Fail: 0/38 Skip: 0/38
+ RevertOpcodeMultipleSubCalls.json OK
+ RevertOpcodeReturn.json OK
+ RevertOpcodeWithBigOutputInInit.json OK
RevertPrecompiledTouch.json Skip
+ RevertPrecompiledTouch.json OK
+ RevertPrecompiledTouchExactOOG.json OK
+ RevertPrecompiledTouch_nonce.json OK
+ RevertPrecompiledTouch_noncestorage.json OK
RevertPrecompiledTouch_storage.json Skip
+ RevertPrecompiledTouch_storage.json OK
+ RevertPrefound.json OK
+ RevertPrefoundCall.json OK
+ RevertPrefoundCallOOG.json OK
@ -1695,7 +1695,7 @@ OK: 38/38 Fail: 0/38 Skip: 0/38
+ TouchToEmptyAccountRevert2.json OK
+ TouchToEmptyAccountRevert3.json OK
```
OK: 38/45 Fail: 0/45 Skip: 7/45
OK: 40/45 Fail: 0/45 Skip: 5/45
## stSStoreTest
```diff
+ InitCollision.json OK
@ -2593,4 +2593,4 @@ OK: 133/133 Fail: 0/133 Skip: 0/133
OK: 130/130 Fail: 0/130 Skip: 0/130
---TOTAL---
OK: 2287/2391 Fail: 0/2391 Skip: 104/2391
OK: 2289/2391 Fail: 0/2391 Skip: 102/2391

View File

@ -1685,11 +1685,11 @@ OK: 38/38 Fail: 0/38 Skip: 0/38
+ RevertOpcodeMultipleSubCalls.json OK
+ RevertOpcodeReturn.json OK
+ RevertOpcodeWithBigOutputInInit.json OK
RevertPrecompiledTouch.json Skip
+ RevertPrecompiledTouch.json OK
+ RevertPrecompiledTouchExactOOG.json OK
+ RevertPrecompiledTouch_nonce.json OK
+ RevertPrecompiledTouch_noncestorage.json OK
RevertPrecompiledTouch_storage.json Skip
+ RevertPrecompiledTouch_storage.json OK
+ RevertPrefound.json OK
+ RevertPrefoundCall.json OK
+ RevertPrefoundCallOOG.json OK
@ -1706,7 +1706,7 @@ OK: 38/38 Fail: 0/38 Skip: 0/38
+ TouchToEmptyAccountRevert2.json OK
+ TouchToEmptyAccountRevert3.json OK
```
OK: 38/45 Fail: 0/45 Skip: 7/45
OK: 40/45 Fail: 0/45 Skip: 5/45
## stSLoadTest
```diff
+ sloadGasCost.json OK
@ -2641,4 +2641,4 @@ OK: 133/133 Fail: 0/133 Skip: 0/133
OK: 130/130 Fail: 0/130 Skip: 0/130
---TOTAL---
OK: 2317/2423 Fail: 0/2423 Skip: 106/2423
OK: 2319/2423 Fail: 0/2423 Skip: 104/2423

View File

@ -243,7 +243,7 @@ proc execCall*(c: Computation) =
## https://github.com/ethereum/EIPs/blob/master/EIPS/eip-161.md
## also see: https://github.com/ethereum/EIPs/issues/716
if c.isError or c.fork >= FKIstanbul:
if c.isError or c.fork >= FKByzantium:
if c.msg.contractAddress == ripemdAddr:
# Special case to account for geth+parity bug
c.vmState.touchedAccounts.incl c.msg.contractAddress

View File

@ -95,12 +95,6 @@ func skipGSTTests*(folder: string, name: string): bool =
if slowGSTTests(folder, name):
return true
name in @[
# bugs related to ethereum/tests/b1248cd40809d219197ff01eb547170bfaaf1bf1
"RevertPrecompiledTouch.json",
"RevertPrecompiledTouch_storage.json",
]
func skipNewGSTTests*(folder: string, name: string): bool =
# share the same slow and failing tests
if skipGSTTests(folder, name):
@ -122,12 +116,6 @@ func skipBCTests*(folder: string, name: string): bool =
# BC huge memory consumption
"randomStatetest94.json",
"DelegateCallSpam.json",
# bugs related to ethereum/tests/b1248cd40809d219197ff01eb547170bfaaf1bf1
"RevertPrecompiledTouch_d0g0v0.json",
"RevertPrecompiledTouch_d3g0v0.json",
"RevertPrecompiledTouch_storage_d0g0v0.json",
"RevertPrecompiledTouch_storage_d3g0v0.json",
]
func skipNewBCTests*(folder: string, name: string): bool =