aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitry <dimitry@ethereum.org>2018-12-13 00:48:20 +0800
committerDimitry <dimitry@ethereum.org>2018-12-13 00:51:08 +0800
commitafe968f2a96b2d8c9a70bf32933220e02f9ce680 (patch)
treeddf3508fd9a75a058d55f5ff04c030c8344e8900 /src
parent7d924188d831d7d9706c44ae3711257b2fbea013 (diff)
downloaddexon-tests-afe968f2a96b2d8c9a70bf32933220e02f9ce680.tar
dexon-tests-afe968f2a96b2d8c9a70bf32933220e02f9ce680.tar.gz
dexon-tests-afe968f2a96b2d8c9a70bf32933220e02f9ce680.tar.bz2
dexon-tests-afe968f2a96b2d8c9a70bf32933220e02f9ce680.tar.lz
dexon-tests-afe968f2a96b2d8c9a70bf32933220e02f9ce680.tar.xz
dexon-tests-afe968f2a96b2d8c9a70bf32933220e02f9ce680.tar.zst
dexon-tests-afe968f2a96b2d8c9a70bf32933220e02f9ce680.zip
extcodehash of account that suicide in a subcall
Diffstat (limited to 'src')
-rw-r--r--src/BlockchainTestsFiller/GeneralStateTests/stExtCodeHash/extCodeHashSubcallSuicide_d0g0v0Filler.json100
-rw-r--r--src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashSubcallSuicideFiller.yml88
2 files changed, 188 insertions, 0 deletions
diff --git a/src/BlockchainTestsFiller/GeneralStateTests/stExtCodeHash/extCodeHashSubcallSuicide_d0g0v0Filler.json b/src/BlockchainTestsFiller/GeneralStateTests/stExtCodeHash/extCodeHashSubcallSuicide_d0g0v0Filler.json
new file mode 100644
index 000000000..b15854fce
--- /dev/null
+++ b/src/BlockchainTestsFiller/GeneralStateTests/stExtCodeHash/extCodeHashSubcallSuicide_d0g0v0Filler.json
@@ -0,0 +1,100 @@
+{
+ "extCodeHashSubcallSuicide_d0g0v0" : {
+ "_info" : {
+ "comment" : "transaction to B | B call to A | A delegatecall/callcode to C (C has selfdestruct) | A selfdestructed. returned to B. now we could check extcodehash of A (in account B code)"
+ },
+ "blocks" : [
+ {
+ "blockHeaderPremine" : {
+ "difficulty" : "0x020000",
+ "gasLimit" : "0x989680",
+ "timestamp" : "0x03e8",
+ "updatePoW" : "1"
+ },
+ "transactions" : [
+ {
+ "data" : "0x",
+ "gasLimit" : "0x07a120",
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "r" : "0x207768aa22a4c6f8da0844ba3f0420f32cb48ae946f5431ef5ceaa290d73df",
+ "s" : "0x505965f889f738e0c5d6da39d4d8ffef5c8256475e1066a7f215017ac205c68d",
+ "to" : "0xb000000000000000000000000000000000000000",
+ "v" : "0x1c",
+ "value" : "0x01"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ }
+ ],
+ "expect" : [
+ {
+ "network" : "Constantinople",
+ "result" : {
+ "0xa000000000000000000000000000000000000000" : {
+ },
+ "0xb000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x01" : "0x3c2265ca60a41f7da0c762b50885e4e7fd9a963716a3a03cfbea4eca95a854f9",
+ "0x02" : "0x24",
+ "0x03" : "0x6020600060006000600073c00000000000000000000000000000000000000062",
+ "0x04" : "0x3c2265ca60a41f7da0c762b50885e4e7fd9a963716a3a03cfbea4eca95a854f9",
+ "0x05" : "0x24",
+ "0x06" : "0x6020600060006000600073c00000000000000000000000000000000000000062",
+ "0x07" : "0x01"
+ }
+ }
+ }
+ }
+ ],
+ "genesisBlockHeader" : {
+ "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
+ "coinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "difficulty" : "131072",
+ "extraData" : "0x42",
+ "gasLimit" : "0x989680",
+ "gasUsed" : "0",
+ "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "nonce" : "0x0102030405060708",
+ "number" : "0",
+ "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a",
+ "timestamp" : "0x03b6",
+ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
+ "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ },
+ "pre" : {
+ "0xa000000000000000000000000000000000000000" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "0x6020600060006000600073c00000000000000000000000000000000000000062055730f2",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "0x00",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xb000000000000000000000000000000000000000" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "0x73a0000000000000000000000000000000000000003f60015573a0000000000000000000000000000000000000003b60025560206000600073a0000000000000000000000000000000000000003c6000516003556020600060006000600073a00000000000000000000000000000000000000062055730f15073a0000000000000000000000000000000000000003f60045573a0000000000000000000000000000000000000003b60055560206000600073a0000000000000000000000000000000000000003c6000516006556020600060006000600073a00000000000000000000000000000000000000062055730f1600755",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xc000000000000000000000000000000000000000" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "0x73a94f5374fce5edbc8e2a8697c15331677e6ebf0bff",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "sealEngine" : "NoProof"
+ }
+} \ No newline at end of file
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashSubcallSuicideFiller.yml b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashSubcallSuicideFiller.yml
new file mode 100644
index 000000000..9b2bd175a
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashSubcallSuicideFiller.yml
@@ -0,0 +1,88 @@
+# transaction to B
+# B call to A
+# A delegatecall/callcode to C (C has selfdestruct)
+# A selfdestructed. returned to B. now we could check extcodehash of A (in account B code)
+---
+extCodeHashSubcallSuicide:
+ _info:
+ comment: "transaction to B | B call to A | A delegatecall/callcode to C (C has selfdestruct) | A selfdestructed. returned to B. now we could check extcodehash of A (in account B code)"
+ env:
+ currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
+ currentDifficulty: '0x20000'
+ currentGasLimit: "10000000"
+ currentNumber: "1"
+ currentTimestamp: "1000"
+ previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
+ pre:
+ b000000000000000000000000000000000000000:
+ balance: '1000000000000000000'
+ code: |
+ {
+ (SSTORE 1 (EXTCODEHASH 0xa000000000000000000000000000000000000000))
+ (SSTORE 2 (EXTCODESIZE 0xa000000000000000000000000000000000000000))
+ (EXTCODECOPY 0xa000000000000000000000000000000000000000 0 0 32)
+ (SSTORE 3 (MLOAD 0))
+
+ (CALL 350000 0xa000000000000000000000000000000000000000 0 0 0 0 32)
+
+ (SSTORE 4 (EXTCODEHASH 0xa000000000000000000000000000000000000000))
+ (SSTORE 5 (EXTCODESIZE 0xa000000000000000000000000000000000000000))
+ (EXTCODECOPY 0xa000000000000000000000000000000000000000 0 0 32)
+ (SSTORE 6 (MLOAD 0))
+
+ [[7]] (CALL 350000 0xa000000000000000000000000000000000000000 0 0 0 0 32)
+ }
+ nonce: '0'
+ storage: {}
+ a000000000000000000000000000000000000000:
+ balance: '1000000000000000000'
+ code: |
+ {
+ (CALLCODE 350000 0xc000000000000000000000000000000000000000 0 0 0 0 32)
+ }
+ nonce: '0'
+ storage: {}
+ c000000000000000000000000000000000000000:
+ balance: '1000000000000000000'
+ code: |
+ {
+ (SELFDESTRUCT 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b)
+ }
+ nonce: '0'
+ storage: {}
+ a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
+ balance: '1000000000000000000'
+ code: '0x00'
+ nonce: '0'
+ storage: {}
+ expect:
+ - indexes:
+ data: !!int -1
+ gas: !!int -1
+ value: !!int -1
+ network:
+ - '>=Constantinople'
+ result:
+ b000000000000000000000000000000000000000:
+ storage: {
+ 1: '0x3c2265ca60a41f7da0c762b50885e4e7fd9a963716a3a03cfbea4eca95a854f9',
+ 2: '0x24',
+ 3: '0x6020600060006000600073c00000000000000000000000000000000000000062',
+ 4: '0x3c2265ca60a41f7da0c762b50885e4e7fd9a963716a3a03cfbea4eca95a854f9',
+ 5: '0x24',
+ 6: '0x6020600060006000600073c00000000000000000000000000000000000000062',
+ 7: '0x01'
+ }
+ a000000000000000000000000000000000000000:
+ 'shouldnotexist': '1'
+ transaction:
+ data:
+ - ''
+ gasLimit:
+ - '500000'
+ gasPrice: '1'
+ nonce: '0'
+ secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
+ to: 'b000000000000000000000000000000000000000'
+ value:
+ - '1'