diff --git a/GeneralStateTests.md b/GeneralStateTests.md index 72af135d0..99b3c4208 100644 --- a/GeneralStateTests.md +++ b/GeneralStateTests.md @@ -522,8 +522,8 @@ OK: 5/5 Fail: 0/5 Skip: 0/5 + CallRecursiveContract.json OK + CallTheContractToCreateEmptyContract.json OK + NotEnoughCashContractCreation.json OK - OutOfGasContractCreation.json Skip - OutOfGasPrefundedContractCreation.json Skip ++ OutOfGasContractCreation.json OK ++ OutOfGasPrefundedContractCreation.json OK + ReturnTest.json OK + ReturnTest2.json OK + StackUnderFlowContractCreation.json OK @@ -532,7 +532,7 @@ OK: 5/5 Fail: 0/5 Skip: 0/5 + TransactionCreateStopInInitcode.json OK + TransactionCreateSuicideInInitcode.json OK ``` -OK: 15/18 Fail: 0/18 Skip: 3/18 +OK: 17/18 Fail: 0/18 Skip: 1/18 ## stLogTests ```diff + log0_emptyMem.json OK @@ -1609,10 +1609,10 @@ OK: 35/37 Fail: 0/37 Skip: 2/37 + RevertOpcodeDirectCall.json OK + RevertOpcodeInCallsOnNonEmptyReturnData.json OK + RevertOpcodeInCreateReturns.json OK - RevertOpcodeInInit.json Skip ++ RevertOpcodeInInit.json OK + RevertOpcodeMultipleSubCalls.json OK + RevertOpcodeReturn.json OK - RevertOpcodeWithBigOutputInInit.json Skip ++ RevertOpcodeWithBigOutputInInit.json OK + RevertPrecompiledTouch.json OK + RevertPrecompiledTouchCC.json OK + RevertPrecompiledTouchDC.json OK @@ -1632,7 +1632,7 @@ OK: 35/37 Fail: 0/37 Skip: 2/37 + TouchToEmptyAccountRevert2.json OK + TouchToEmptyAccountRevert3.json OK ``` -OK: 41/43 Fail: 0/43 Skip: 2/43 +OK: 43/43 Fail: 0/43 Skip: 0/43 ## stShift ```diff sar00.json Skip @@ -2137,14 +2137,14 @@ OK: 43/44 Fail: 0/44 Skip: 1/44 + createNameRegistratorPerTxsAfter.json OK + createNameRegistratorPerTxsAt.json OK + createNameRegistratorPerTxsBefore.json OK - createNameRegistratorPerTxsNotEnoughGasAfter.json Skip - createNameRegistratorPerTxsNotEnoughGasAt.json Skip - createNameRegistratorPerTxsNotEnoughGasBefore.json Skip ++ createNameRegistratorPerTxsNotEnoughGasAfter.json OK ++ createNameRegistratorPerTxsNotEnoughGasAt.json OK ++ createNameRegistratorPerTxsNotEnoughGasBefore.json OK + delegatecallAfterTransition.json OK + delegatecallAtTransition.json OK + delegatecallBeforeTransition.json OK ``` -OK: 6/9 Fail: 0/9 Skip: 3/9 +OK: 9/9 Fail: 0/9 Skip: 0/9 ## stWalletTest ```diff + 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 ---TOTAL--- -OK: 1500/2334 Fail: 0/2334 Skip: 834/2334 +OK: 1507/2334 Fail: 0/2334 Skip: 827/2334 diff --git a/nimbus/vm/computation.nim b/nimbus/vm/computation.nim index 9ab314ec2..86a3bccac 100644 --- a/nimbus/vm/computation.nim +++ b/nimbus/vm/computation.nim @@ -288,9 +288,6 @@ proc collectTouchedAccounts*(c: BaseComputation, output: var HashSet[EthAddress] if address[i] != 0: return result = address[19] == byte(3) - if c.isOriginComputation and c.msg.gasPrice == 0: - output.incl c.vmState.blockHeader.coinbase - for _, beneficiary in c.accountsToDelete: if c.isError and c.isOriginComputation: # Special case to account for geth+parity bug diff --git a/nimbus/vm_state_transactions.nim b/nimbus/vm_state_transactions.nim index 1153a8348..9dc1dc675 100644 --- a/nimbus/vm_state_transactions.nim +++ b/nimbus/vm_state_transactions.nim @@ -6,7 +6,7 @@ # at your option. This file may not be copied, modified, or distributed except according to those terms. import - ranges/typedranges, sequtils, strformat, tables, options, + ranges/typedranges, sequtils, strformat, tables, options, sets, eth/common, chronicles, ./db/[db_chain, state_db], constants, errors, transaction, vm_types, vm_state, utils, ./vm/[computation, interpreter], ./vm/interpreter/gas_costs @@ -33,6 +33,9 @@ proc setupComputation*(vmState: BaseVMState, tx: Transaction, sender, recipient: else: vmState.blockNumber.toFork + if fork >= FkSpurious: + vmState.touchedAccounts.incl(vmState.blockHeader.coinbase) + var gas = tx.gasLimit - tx.intrinsicGas # TODO: refactor message to use byterange diff --git a/tests/test_generalstate_failing.nim b/tests/test_generalstate_failing.nim index 1e167c917..121c13ade 100644 --- a/tests/test_generalstate_failing.nim +++ b/tests/test_generalstate_failing.nim @@ -22,16 +22,16 @@ func allowedFailingGeneralStateTest*(folder, name: string): bool = # Spurious Dragon failed GST "CallContractToCreateContractOOG.json", - "OutOfGasContractCreation.json", - "OutOfGasPrefundedContractCreation.json", - "RevertOpcodeInInit.json", - "RevertOpcodeWithBigOutputInInit.json", "failed_tx_xcf416c53.json", - "createNameRegistratorPerTxsNotEnoughGasAfter.json", - "createNameRegistratorPerTxsNotEnoughGasAt.json", - "createNameRegistratorPerTxsNotEnoughGasBefore.json", "TransactionSendingToZero.json" - + + #"OutOfGasContractCreation.json", + #"OutOfGasPrefundedContractCreation.json", + #"RevertOpcodeInInit.json", + #"RevertOpcodeWithBigOutputInInit.json", + #"createNameRegistratorPerTxsNotEnoughGasAfter.json", + #"createNameRegistratorPerTxsNotEnoughGasAt.json", + #"createNameRegistratorPerTxsNotEnoughGasBefore.json", #"ZeroValue_CALLCODE_ToEmpty.json", #"ZeroValue_CALLCODE_ToOneStorageKey.json", #"NonZeroValue_CALLCODE_ToEmpty.json",