include miner address in touchedAccounts, GST +7

This commit is contained in:
andri lim 2019-04-18 11:12:21 +07:00
parent c07f01a74d
commit f7338b7d76
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
4 changed files with 23 additions and 23 deletions

View File

@ -522,8 +522,8 @@ OK: 5/5 Fail: 0/5 Skip: 0/5
+ CallRecursiveContract.json OK + CallRecursiveContract.json OK
+ CallTheContractToCreateEmptyContract.json OK + CallTheContractToCreateEmptyContract.json OK
+ NotEnoughCashContractCreation.json OK + NotEnoughCashContractCreation.json OK
OutOfGasContractCreation.json Skip + OutOfGasContractCreation.json OK
OutOfGasPrefundedContractCreation.json Skip + OutOfGasPrefundedContractCreation.json OK
+ ReturnTest.json OK + ReturnTest.json OK
+ ReturnTest2.json OK + ReturnTest2.json OK
+ StackUnderFlowContractCreation.json OK + StackUnderFlowContractCreation.json OK
@ -532,7 +532,7 @@ OK: 5/5 Fail: 0/5 Skip: 0/5
+ TransactionCreateStopInInitcode.json OK + TransactionCreateStopInInitcode.json OK
+ TransactionCreateSuicideInInitcode.json OK + TransactionCreateSuicideInInitcode.json OK
``` ```
OK: 15/18 Fail: 0/18 Skip: 3/18 OK: 17/18 Fail: 0/18 Skip: 1/18
## stLogTests ## stLogTests
```diff ```diff
+ log0_emptyMem.json OK + log0_emptyMem.json OK
@ -1609,10 +1609,10 @@ OK: 35/37 Fail: 0/37 Skip: 2/37
+ RevertOpcodeDirectCall.json OK + RevertOpcodeDirectCall.json OK
+ RevertOpcodeInCallsOnNonEmptyReturnData.json OK + RevertOpcodeInCallsOnNonEmptyReturnData.json OK
+ RevertOpcodeInCreateReturns.json OK + RevertOpcodeInCreateReturns.json OK
RevertOpcodeInInit.json Skip + RevertOpcodeInInit.json OK
+ RevertOpcodeMultipleSubCalls.json OK + RevertOpcodeMultipleSubCalls.json OK
+ RevertOpcodeReturn.json OK + RevertOpcodeReturn.json OK
RevertOpcodeWithBigOutputInInit.json Skip + RevertOpcodeWithBigOutputInInit.json OK
+ RevertPrecompiledTouch.json OK + RevertPrecompiledTouch.json OK
+ RevertPrecompiledTouchCC.json OK + RevertPrecompiledTouchCC.json OK
+ RevertPrecompiledTouchDC.json OK + RevertPrecompiledTouchDC.json OK
@ -1632,7 +1632,7 @@ OK: 35/37 Fail: 0/37 Skip: 2/37
+ TouchToEmptyAccountRevert2.json OK + TouchToEmptyAccountRevert2.json OK
+ TouchToEmptyAccountRevert3.json OK + TouchToEmptyAccountRevert3.json OK
``` ```
OK: 41/43 Fail: 0/43 Skip: 2/43 OK: 43/43 Fail: 0/43 Skip: 0/43
## stShift ## stShift
```diff ```diff
sar00.json Skip sar00.json Skip
@ -2137,14 +2137,14 @@ OK: 43/44 Fail: 0/44 Skip: 1/44
+ createNameRegistratorPerTxsAfter.json OK + createNameRegistratorPerTxsAfter.json OK
+ createNameRegistratorPerTxsAt.json OK + createNameRegistratorPerTxsAt.json OK
+ createNameRegistratorPerTxsBefore.json OK + createNameRegistratorPerTxsBefore.json OK
createNameRegistratorPerTxsNotEnoughGasAfter.json Skip + createNameRegistratorPerTxsNotEnoughGasAfter.json OK
createNameRegistratorPerTxsNotEnoughGasAt.json Skip + createNameRegistratorPerTxsNotEnoughGasAt.json OK
createNameRegistratorPerTxsNotEnoughGasBefore.json Skip + createNameRegistratorPerTxsNotEnoughGasBefore.json OK
+ delegatecallAfterTransition.json OK + delegatecallAfterTransition.json OK
+ delegatecallAtTransition.json OK + delegatecallAtTransition.json OK
+ delegatecallBeforeTransition.json OK + delegatecallBeforeTransition.json OK
``` ```
OK: 6/9 Fail: 0/9 Skip: 3/9 OK: 9/9 Fail: 0/9 Skip: 0/9
## stWalletTest ## stWalletTest
```diff ```diff
+ dayLimitConstruction.json OK + dayLimitConstruction.json OK
@ -2520,4 +2520,4 @@ OK: 5/133 Fail: 0/133 Skip: 128/133
OK: 0/130 Fail: 0/130 Skip: 130/130 OK: 0/130 Fail: 0/130 Skip: 130/130
---TOTAL--- ---TOTAL---
OK: 1500/2334 Fail: 0/2334 Skip: 834/2334 OK: 1507/2334 Fail: 0/2334 Skip: 827/2334

View File

@ -288,9 +288,6 @@ proc collectTouchedAccounts*(c: BaseComputation, output: var HashSet[EthAddress]
if address[i] != 0: return if address[i] != 0: return
result = address[19] == byte(3) result = address[19] == byte(3)
if c.isOriginComputation and c.msg.gasPrice == 0:
output.incl c.vmState.blockHeader.coinbase
for _, beneficiary in c.accountsToDelete: for _, beneficiary in c.accountsToDelete:
if c.isError and c.isOriginComputation: if c.isError and c.isOriginComputation:
# Special case to account for geth+parity bug # Special case to account for geth+parity bug

View File

@ -6,7 +6,7 @@
# at your option. This file may not be copied, modified, or distributed except according to those terms. # at your option. This file may not be copied, modified, or distributed except according to those terms.
import import
ranges/typedranges, sequtils, strformat, tables, options, ranges/typedranges, sequtils, strformat, tables, options, sets,
eth/common, chronicles, ./db/[db_chain, state_db], eth/common, chronicles, ./db/[db_chain, state_db],
constants, errors, transaction, vm_types, vm_state, utils, constants, errors, transaction, vm_types, vm_state, utils,
./vm/[computation, interpreter], ./vm/interpreter/gas_costs ./vm/[computation, interpreter], ./vm/interpreter/gas_costs
@ -33,6 +33,9 @@ proc setupComputation*(vmState: BaseVMState, tx: Transaction, sender, recipient:
else: else:
vmState.blockNumber.toFork vmState.blockNumber.toFork
if fork >= FkSpurious:
vmState.touchedAccounts.incl(vmState.blockHeader.coinbase)
var gas = tx.gasLimit - tx.intrinsicGas var gas = tx.gasLimit - tx.intrinsicGas
# TODO: refactor message to use byterange # TODO: refactor message to use byterange

View File

@ -22,16 +22,16 @@ func allowedFailingGeneralStateTest*(folder, name: string): bool =
# Spurious Dragon failed GST # Spurious Dragon failed GST
"CallContractToCreateContractOOG.json", "CallContractToCreateContractOOG.json",
"OutOfGasContractCreation.json",
"OutOfGasPrefundedContractCreation.json",
"RevertOpcodeInInit.json",
"RevertOpcodeWithBigOutputInInit.json",
"failed_tx_xcf416c53.json", "failed_tx_xcf416c53.json",
"createNameRegistratorPerTxsNotEnoughGasAfter.json",
"createNameRegistratorPerTxsNotEnoughGasAt.json",
"createNameRegistratorPerTxsNotEnoughGasBefore.json",
"TransactionSendingToZero.json" "TransactionSendingToZero.json"
#"OutOfGasContractCreation.json",
#"OutOfGasPrefundedContractCreation.json",
#"RevertOpcodeInInit.json",
#"RevertOpcodeWithBigOutputInInit.json",
#"createNameRegistratorPerTxsNotEnoughGasAfter.json",
#"createNameRegistratorPerTxsNotEnoughGasAt.json",
#"createNameRegistratorPerTxsNotEnoughGasBefore.json",
#"ZeroValue_CALLCODE_ToEmpty.json", #"ZeroValue_CALLCODE_ToEmpty.json",
#"ZeroValue_CALLCODE_ToOneStorageKey.json", #"ZeroValue_CALLCODE_ToOneStorageKey.json",
#"NonZeroValue_CALLCODE_ToEmpty.json", #"NonZeroValue_CALLCODE_ToEmpty.json",