aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitry <dimitry@ethereum.org>2018-12-13 23:40:33 +0800
committerDimitry <dimitry@ethereum.org>2018-12-13 23:40:33 +0800
commit11652e3eac4949eab88bf58effa2895c4af2f40f (patch)
tree0bf5cbeb5db61e76699a206c2a62113082a30854 /src
parent3c239e69bd0d2857027e4c1c883a4f981d3a75b9 (diff)
downloadtangerine-tests-11652e3eac4949eab88bf58effa2895c4af2f40f.tar.gz
tangerine-tests-11652e3eac4949eab88bf58effa2895c4af2f40f.tar.zst
tangerine-tests-11652e3eac4949eab88bf58effa2895c4af2f40f.zip
extcodecopy/hash of zero size
Diffstat (limited to 'src')
-rw-r--r--src/BlockchainTestsFiller/GeneralStateTests/stExtCodeHash/codeCopyZero_d0g0v0Filler.json109
-rw-r--r--src/GeneralStateTestsFiller/stExtCodeHash/codeCopyZeroFiller.yml123
2 files changed, 232 insertions, 0 deletions
diff --git a/src/BlockchainTestsFiller/GeneralStateTests/stExtCodeHash/codeCopyZero_d0g0v0Filler.json b/src/BlockchainTestsFiller/GeneralStateTests/stExtCodeHash/codeCopyZero_d0g0v0Filler.json
new file mode 100644
index 000000000..46d7820c2
--- /dev/null
+++ b/src/BlockchainTestsFiller/GeneralStateTests/stExtCodeHash/codeCopyZero_d0g0v0Filler.json
@@ -0,0 +1,109 @@
+{
+ "codeCopyZero_d0g0v0" : {
+ "_info" : {
+ "comment" : "https://github.com/ethereum/tests/issues/493, CODECOPY and EXTCODECOPY where codesize = 0"
+ },
+ "blocks" : [
+ {
+ "blockHeaderPremine" : {
+ "difficulty" : "0x020000",
+ "gasLimit" : "0x989680",
+ "timestamp" : "0x03e8",
+ "updatePoW" : "1"
+ },
+ "transactions" : [
+ {
+ "data" : "0x",
+ "gasLimit" : "0x155cc0",
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "r" : "0x7ddc7347a8189bfa10ae01da00fb656711d84bfd825821c173341786917403d8",
+ "s" : "0x633658eaf844aae185c3c551c6bc4fb3691c84f62d775dcfc36d92ff66e07621",
+ "to" : "0xa000000000000000000000000000000000000000",
+ "v" : "0x1c",
+ "value" : "0x01"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ }
+ ],
+ "expect" : [
+ {
+ "network" : "Constantinople",
+ "result" : {
+ "0xa000000000000000000000000000000000000000" : {
+ "storage" : {
+ "0x13" : "0x01",
+ "0x22" : "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
+ "0x23" : "0x01",
+ "0x33" : "0x01",
+ "0x40" : "0xfa5deaac2b604cc50aefee7a3767b6fcfc95732f"
+ }
+ },
+ "0xfa5deaac2b604cc50aefee7a3767b6fcfc95732f" : {
+ "storage" : {
+ "0x50" : "0x60206000600039600051605055303b605155303f605255600060006000600060",
+ "0x52" : "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
+ }
+ }
+ }
+ }
+ ],
+ "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" : "0x60206000600073a2220000000000000000000000000000000000003c60005160105573a2220000000000000000000000000000000000003b60115573a2220000000000000000000000000000000000003f6012556000600060006000600073a22200000000000000000000000000000000000061c350f260135560206000600073a2000000000000000000000000000000000000003c60005160205573a2000000000000000000000000000000000000003b60215573a2000000000000000000000000000000000000003f6022556000600060006000600073a20000000000000000000000000000000000000061c350f260235560206000600073a3000000000000000000000000000000000000003c60005160305573a3000000000000000000000000000000000000003b60315573a3000000000000000000000000000000000000003f6032556000600060006000600073a30000000000000000000000000000000000000061c350f26033556020600060006000600073a10000000000000000000000000000000000000062086470f150600051604055",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xa100000000000000000000000000000000000000" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "0x6000603880601960003960006000f560005260206000f300fe60206000600039600051605055303b605155303f605255600060006000600060003061c350f23b605355602060006000303c600051605455",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xa200000000000000000000000000000000000000" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xa300000000000000000000000000000000000000" : {
+ "balance" : "0x00",
+ "code" : "",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "0x00",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "sealEngine" : "NoProof"
+ }
+} \ No newline at end of file
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/codeCopyZeroFiller.yml b/src/GeneralStateTestsFiller/stExtCodeHash/codeCopyZeroFiller.yml
new file mode 100644
index 000000000..be5f3d85a
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stExtCodeHash/codeCopyZeroFiller.yml
@@ -0,0 +1,123 @@
+# https://github.com/ethereum/tests/issues/493, CODECOPY and EXTCODECOPY where codesize = 0
+---
+codeCopyZero:
+ _info:
+ comment: "https://github.com/ethereum/tests/issues/493, CODECOPY and EXTCODECOPY where codesize = 0"
+ env:
+ currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
+ currentDifficulty: '0x20000'
+ currentGasLimit: "10000000"
+ currentNumber: "1"
+ currentTimestamp: "1000"
+ previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
+ pre:
+ a000000000000000000000000000000000000000:
+ balance: '1000000000000000000'
+ code: |
+ {
+
+ ;; EXTCODECOPY of nonexistent account
+ (EXTCODECOPY 0xa222000000000000000000000000000000000000 0 0 32)
+ (SSTORE 0x10 (MLOAD 0))
+ (SSTORE 0x11 (EXTCODESIZE 0xa222000000000000000000000000000000000000))
+ (SSTORE 0x12 (EXTCODEHASH 0xa222000000000000000000000000000000000000))
+ (SSTORE 0x13 (CALLCODE 50000 0xa222000000000000000000000000000000000000 0 0 0 0 0))
+
+
+ ;; EXTCODECOPY of account with empty code
+ (EXTCODECOPY 0xa200000000000000000000000000000000000000 0 0 32)
+ (SSTORE 0x20 (MLOAD 0))
+ (SSTORE 0x21 (EXTCODESIZE 0xa200000000000000000000000000000000000000))
+ (SSTORE 0x22 (EXTCODEHASH 0xa200000000000000000000000000000000000000))
+ (SSTORE 0x23 (CALLCODE 50000 0xa200000000000000000000000000000000000000 0 0 0 0 0))
+
+
+ ;; EXTCODECOPY of empty account with empty code
+ (EXTCODECOPY 0xa300000000000000000000000000000000000000 0 0 32)
+ (SSTORE 0x30 (MLOAD 0))
+ (SSTORE 0x31 (EXTCODESIZE 0xa300000000000000000000000000000000000000))
+ (SSTORE 0x32 (EXTCODEHASH 0xa300000000000000000000000000000000000000))
+ (SSTORE 0x33 (CALLCODE 50000 0xa300000000000000000000000000000000000000 0 0 0 0 0))
+
+ ;; CODECOPY of dynamic account which has empty code
+ (CALL 550000 0xa100000000000000000000000000000000000000 0 0 0 0 32)
+ (SSTORE 0x40 (MLOAD 0))
+ }
+ nonce: '0'
+ storage: {}
+ a100000000000000000000000000000000000000:
+ balance: '1000000000000000000'
+ code: |
+ {
+ (MSTORE 0
+ (CREATE2 0 0
+ (lll
+ {
+ ;; codecopy of empty code
+ (CODECOPY 0 0 32)
+ [[0x50]] (MLOAD 0)
+ [[0x51]] (EXTCODESIZE (ADDRESS))
+ [[0x52]] (EXTCODEHASH (ADDRESS))
+ [[0x53]] (EXTCODESIZE (CALLCODE 50000 (ADDRESS) 0 0 0 0 0))
+ (EXTCODECOPY (ADDRESS) 0 0 32)
+ (SSTORE 0x54 (MLOAD 0))
+ }
+ 0)
+ 0))
+ (RETURN 0 32)
+ (STOP)
+ }
+ nonce: '0'
+ storage: {}
+ #account with empty code
+ a200000000000000000000000000000000000000:
+ balance: '1000000000000000000'
+ code: ''
+ nonce: '0'
+ storage: {}
+ #empty with empty code
+ a300000000000000000000000000000000000000:
+ balance: '0'
+ code: ''
+ 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:
+ a000000000000000000000000000000000000000:
+ storage: {
+ '0x13': '0x01',
+ '0x22': '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470',
+ '0x23': '0x01',
+ '0x33': '0x01',
+ '0x40': '0xfa5deaac2b604cc50aefee7a3767b6fcfc95732f'
+ }
+ fa5deaac2b604cc50aefee7a3767b6fcfc95732f:
+ storage: {
+ '0x50': '0x60206000600039600051605055303b605155303f605255600060006000600060',
+ '0x51': '0x00',
+ '0x52': '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470',
+ '0x53': '0x00',
+ '0x54': '0x00'
+ }
+ transaction:
+ data:
+ - ''
+ gasLimit:
+ - '1400000'
+ gasPrice: '1'
+ nonce: '0'
+ secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
+ to: 'a000000000000000000000000000000000000000'
+ value:
+ - '1'