aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJared Wasinger <j-wasinger@hotmail.com>2017-09-05 04:12:52 +0800
committerJared Wasinger <j-wasinger@hotmail.com>2017-09-05 04:12:52 +0800
commit91e13877c3e47a12f65865b30330d6c2cf045d1c (patch)
tree1147203840d087928e27690ac50a36a8e89b2624 /src
parent8de686b445674c14c9b8df4d1edf189555158d6f (diff)
downloaddexon-tests-91e13877c3e47a12f65865b30330d6c2cf045d1c.tar
dexon-tests-91e13877c3e47a12f65865b30330d6c2cf045d1c.tar.gz
dexon-tests-91e13877c3e47a12f65865b30330d6c2cf045d1c.tar.bz2
dexon-tests-91e13877c3e47a12f65865b30330d6c2cf045d1c.tar.lz
dexon-tests-91e13877c3e47a12f65865b30330d6c2cf045d1c.tar.xz
dexon-tests-91e13877c3e47a12f65865b30330d6c2cf045d1c.tar.zst
dexon-tests-91e13877c3e47a12f65865b30330d6c2cf045d1c.zip
add more returndatasize/returndatacopy tests
Diffstat (limited to 'src')
-rw-r--r--src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_callcodeFiller.json67
-rw-r--r--src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_delegatecallFiller.json67
-rw-r--r--src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_staticcallFiller.json67
-rw-r--r--src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_successful_staticcallFiller.json82
-rw-r--r--src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_callcodeFiller.json82
-rw-r--r--src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_delegatecallFiller.json68
-rw-r--r--src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_staticcallFiller.json83
7 files changed, 516 insertions, 0 deletions
diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_callcodeFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_callcodeFiller.json
new file mode 100644
index 000000000..2479c2165
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_callcodeFiller.json
@@ -0,0 +1,67 @@
+{
+ "returndatacopy_after_failing_callcode" : {
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x0a00000000",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "pre" : {
+ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance": "0x10000000",
+ "code": "",
+ "nonce": "0x00",
+ "storage": {}
+ },
+ "0x1000000000000000000000000000000000000001": {
+ "balance" : "0x00",
+ "code": "{ (CALLCODE 0 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0 0) (RETURNDATACOPY 0x0 0x0 32) (SSTORE 0 (MLOAD 0))}",
+ "nonce" : "0x00",
+ "storage" : {
+ "0x00" : "0xffffffffffff"
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x6400000000",
+ "code" : "0xfd",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "expect": [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["ALL"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0xffffffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "0x0a00000000"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0x1000000000000000000000000000000000000001",
+ "value" : [
+ "0x00"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_delegatecallFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_delegatecallFiller.json
new file mode 100644
index 000000000..d2c1cc9b3
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_delegatecallFiller.json
@@ -0,0 +1,67 @@
+{
+ "returndatacopy_after_failing_delegatecall" : {
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x0a00000000",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "pre" : {
+ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance": "0x100000",
+ "code": "",
+ "nonce": "0x00",
+ "storage": {}
+ },
+ "0x1000000000000000000000000000000000000001": {
+ "balance" : "0x00",
+ "code": "{ (DELEGATECALL 10000 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0) (RETURNDATACOPY 0x0 0x0 32) ( SSTORE 0 (MLOAD 0))}",
+ "nonce" : "0x00",
+ "storage" : {
+ "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x6400000000",
+ "code" : "0xfd",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "expect": [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["ALL"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "0x0a00000000"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "value" : [
+ "0x00"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_staticcallFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_staticcallFiller.json
new file mode 100644
index 000000000..59c9d2399
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_failing_staticcallFiller.json
@@ -0,0 +1,67 @@
+{
+ "returndatacopy_after_failing_staticcall" : {
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x0a00000000",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "pre" : {
+ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance": "0x100000",
+ "code": "",
+ "nonce": "0x0",
+ "storage": {}
+ },
+ "0x1000000000000000000000000000000000000001": {
+ "balance" : "0x00",
+ "code": "{ (STATICCALL 0 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0) (RETURNDATACOPY 0x0 0x0 32) ( SSTORE 0 (MLOAD 0))}",
+ "nonce" : "0x00",
+ "storage" : {
+ "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x6400000000",
+ "code" : "{ (MSTORE 0x0 (CALLER)) (RETURN 0 32) }",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "expect": [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["ALL"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "0x0a00000000"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0x1000000000000000000000000000000000000001",
+ "value" : [
+ "0x00"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_successful_staticcallFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_successful_staticcallFiller.json
new file mode 100644
index 000000000..5ee00e14e
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatacopy_after_successful_staticcallFiller.json
@@ -0,0 +1,82 @@
+{
+ "returndatacopy_after_successful_staticcall" : {
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x0a00000000",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "pre" : {
+ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6": {
+ "balance" : "0x1000000",
+ "code": "",
+ "nonce": "0x0",
+ "storage": {}
+ },
+ "0x1000000000000000000000000000000000000001": {
+ "balance" : "0x00",
+ "code": "{ (STATICCALL 60000 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0) (RETURNDATACOPY 0x0 0x0 32) ( SSTORE 0 (MLOAD 0))}",
+ "nonce" : "0x00",
+ "storage" : {
+ "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x6400000000",
+ "code" : "{ (MSTORE 0x0 (CALLER)) (RETURN 0 32) }",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "expect": [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["Byzantium", "Constantinople"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0x1000000000000000000000000000000000000001"
+ }
+ }
+ }
+ },
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["Frontier", "Homestead", "EIP158"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "0x0a00000000"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0x1000000000000000000000000000000000000001",
+ "value" : [
+ "0x00"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_callcodeFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_callcodeFiller.json
new file mode 100644
index 000000000..d768a94c8
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_callcodeFiller.json
@@ -0,0 +1,82 @@
+{
+ "returndatasize_after_failing_callcode" : {
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x0a00000000",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "pre" : {
+ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance": "0x10000000",
+ "code": "",
+ "nonce": "0x0",
+ "storage": {}
+ },
+ "0x1000000000000000000000000000000000000001": {
+ "balance" : "0x00",
+ "code": "{ (seq (CALLCODE 100000 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0 0) (SSTORE 0 (RETURNDATASIZE)))}",
+ "nonce" : "0x00",
+ "storage" : {
+ "0x00" : "0xffffffff"
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x6400000000",
+ "code" : "0xfd",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "expect": [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["Byzantium", "Constantinople"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0x00"
+ }
+ }
+ }
+ },
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["Frontier", "Homestead", "EIP158"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0xffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "0x0a00000000"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to": "0x1000000000000000000000000000000000000001",
+ "value" : [
+ "0x00"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_delegatecallFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_delegatecallFiller.json
new file mode 100644
index 000000000..287270dc9
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_delegatecallFiller.json
@@ -0,0 +1,68 @@
+{
+ "returndatasize_after_failing_delegatecall" : {
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x0a00000000",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "pre" : {
+ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance": "0x1000000",
+ "nonce": "0x0",
+ "code": "",
+ "storage": { }
+ },
+ "0x1000000000000000000000000000000000000001": {
+ "balance" : "0x00",
+ "code": "{ (seq (DELEGATECALL 10000 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0) (SSTORE 0 (RETURNDATASIZE)))}",
+ "nonce" : "0x00",
+ "storage" : {
+ "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x6400000000",
+ "//code": "invalid opcode",
+ "code" : "0xfd",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "expect": [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["Byzantium", "Constantinople"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0x00"
+ }
+ }
+ }
+ }
+ ],
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "0x0a00000000"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0x1000000000000000000000000000000000000001",
+ "value" : [
+ "0x00"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_staticcallFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_staticcallFiller.json
new file mode 100644
index 000000000..a687a0081
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_failing_staticcallFiller.json
@@ -0,0 +1,83 @@
+{
+ "returndatasize_after_failing_staticcall" : {
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x0a00000000",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "pre" : {
+ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance": "0x100000",
+ "nonce": "0x0",
+ "code": "",
+ "storage": {}
+ },
+ "0x1000000000000000000000000000000000000001" : {
+ "balance" : "0x00",
+ "code": "{ (seq (STATICCALL 60000 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 0) (SSTORE 0 (RETURNDATASIZE)))}",
+ "nonce" : "0x00",
+ "storage" : {
+ "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x6400000000",
+ "//code": "an invalid opcode",
+ "code" : "0xfd",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "expect": [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["Byzantium", "Constantinople"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0x0"
+ }
+ }
+ }
+ },
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : -1,
+ "value" : -1
+ },
+ "network" : ["Frontier", "Homestead", "EIP158"],
+ "result" : {
+ "0x1000000000000000000000000000000000000001" : {
+ "storage" : {
+ "0x00" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
+ }
+ }
+ }
+ }
+ ],
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "0x0a00000000"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0x1000000000000000000000000000000000000001",
+ "value" : [
+ "0x00"
+ ]
+ }
+ }
+}