aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2017-09-05 16:45:19 +0800
committerGitHub <noreply@github.com>2017-09-05 16:45:19 +0800
commitc7c0b5654fc346398b4f919d8c9cb42db38070fa (patch)
tree893c8939b9224e844e3aee59eef4e5ea78109ef7 /src
parent8de686b445674c14c9b8df4d1edf189555158d6f (diff)
parent6ca43a77fa28e4407af317a2c8abf4e494ddc480 (diff)
downloaddexon-tests-c7c0b5654fc346398b4f919d8c9cb42db38070fa.tar
dexon-tests-c7c0b5654fc346398b4f919d8c9cb42db38070fa.tar.gz
dexon-tests-c7c0b5654fc346398b4f919d8c9cb42db38070fa.tar.bz2
dexon-tests-c7c0b5654fc346398b4f919d8c9cb42db38070fa.tar.lz
dexon-tests-c7c0b5654fc346398b4f919d8c9cb42db38070fa.tar.xz
dexon-tests-c7c0b5654fc346398b4f919d8c9cb42db38070fa.tar.zst
dexon-tests-c7c0b5654fc346398b4f919d8c9cb42db38070fa.zip
Merge pull request #290 from ethereum/returndata-tests
Add more returndata 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
-rw-r--r--src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_successful_callcodeFiller.json (renamed from src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_callcodeFiller.json)2
8 files changed, 517 insertions, 1 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"
+ ]
+ }
+ }
+}
diff --git a/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_callcodeFiller.json b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_successful_callcodeFiller.json
index 4640a8b0a..1e1511cb6 100644
--- a/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_callcodeFiller.json
+++ b/src/GeneralStateTestsFiller/stReturnDataTest/returndatasize_after_successful_callcodeFiller.json
@@ -1,5 +1,5 @@
{
- "returndatasize_after_callcode" : {
+ "returndatasize_after_successful_callcode" : {
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x20000",