aboutsummaryrefslogtreecommitdiffstats
path: root/GeneralStateTests
diff options
context:
space:
mode:
authorwinsvega <winsvega@mail.ru>2018-11-09 21:01:41 +0800
committerGitHub <noreply@github.com>2018-11-09 21:01:41 +0800
commit6f9575214a707d6b38b473aba0b271c95c560478 (patch)
tree57984b67a090e4f458d49d9efd24b388fca0322e /GeneralStateTests
parent080c4193798e771c13b95d0dadca616cd8298a49 (diff)
parentc5d58d235b632c87e386352d4fab4857283b874f (diff)
downloadtangerine-tests-6f9575214a707d6b38b473aba0b271c95c560478.tar
tangerine-tests-6f9575214a707d6b38b473aba0b271c95c560478.tar.gz
tangerine-tests-6f9575214a707d6b38b473aba0b271c95c560478.tar.bz2
tangerine-tests-6f9575214a707d6b38b473aba0b271c95c560478.tar.lz
tangerine-tests-6f9575214a707d6b38b473aba0b271c95c560478.tar.xz
tangerine-tests-6f9575214a707d6b38b473aba0b271c95c560478.tar.zst
tangerine-tests-6f9575214a707d6b38b473aba0b271c95c560478.zip
Merge pull request #538 from ajsutton/memory-write-tests
Tests where data is copied to a memory range longer than the data itself
Diffstat (limited to 'GeneralStateTests')
-rw-r--r--GeneralStateTests/stCodeCopyTest/ExtCodeCopyTargetRangeLongerThanCodeTests.json125
-rw-r--r--GeneralStateTests/stPreCompiledContracts2/CallEcrecoverInvalidSignature.json118
-rw-r--r--GeneralStateTests/stPreCompiledContracts2/CallEcrecoverUnrecoverableKey.json118
-rw-r--r--GeneralStateTests/stPreCompiledContracts2/CallIdentity_6_inputShorterThanOutput.json118
4 files changed, 479 insertions, 0 deletions
diff --git a/GeneralStateTests/stCodeCopyTest/ExtCodeCopyTargetRangeLongerThanCodeTests.json b/GeneralStateTests/stCodeCopyTest/ExtCodeCopyTargetRangeLongerThanCodeTests.json
new file mode 100644
index 000000000..87e4a7a97
--- /dev/null
+++ b/GeneralStateTests/stCodeCopyTest/ExtCodeCopyTargetRangeLongerThanCodeTests.json
@@ -0,0 +1,125 @@
+{
+ "ExtCodeCopyTargetRangeLongerThanCodeTests" : {
+ "_info" : {
+ "comment" : "Uses EXTCODECOPY to copy 32 bytes of code into a 64 byte range of memory and ensures that the last 32 bytes of the memory range are zeroed out",
+ "filledwith" : "testeth 1.5.0-alpha.5-3+commit.9c4db26c",
+ "lllcversion" : "Version: 0.5.0-develop.2018.9.29+commit.c4b5101b.Darwin.appleclang",
+ "source" : "src/GeneralStateTestsFiller/stCodeCopyTest/ExtCodeCopyTargetRangeLongerThanCodeTestsFiller.json",
+ "sourceHash" : "f18e3887da90c5b18497a754982425e913c8cf0df1cfac2ec0256809d6339041"
+ },
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "0x7fffffffffffffff",
+ "currentNumber" : "0x28d138",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "post" : {
+ "Byzantium" : [
+ {
+ "hash" : "0x30610221e70d7a02d1556b926275c2665354a648402d17156e82fbe7a856a785",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Constantinople" : [
+ {
+ "hash" : "0x8c59709f11546ec8208d20bc9b57d2b2942734c79f7465277d79c22bf9c81a17",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "EIP150" : [
+ {
+ "hash" : "0x30610221e70d7a02d1556b926275c2665354a648402d17156e82fbe7a856a785",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "EIP158" : [
+ {
+ "hash" : "0x30610221e70d7a02d1556b926275c2665354a648402d17156e82fbe7a856a785",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Frontier" : [
+ {
+ "hash" : "0x1a33bec32c521827b0efcb18d8a7e40eb525eef4c7d465ca093a77352559c11b",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Homestead" : [
+ {
+ "hash" : "0x1a33bec32c521827b0efcb18d8a7e40eb525eef4c7d465ca093a77352559c11b",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ]
+ },
+ "pre" : {
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0xffffffffffffffffffffffffffffffff",
+ "code" : "",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xaaaf5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x1b58",
+ "code" : "0x61123460205260406000600073eeef5374fce5edbc8e2a8697c15331677e6ebf0b3c60005160005560205160015561567860605260406000604073a94f5374fce5edbc8e2a8697c15331677e6ebf0b3c604051600255606051600355",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xeeef5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x00",
+ "code" : "0x1122334455667788991011121314151617181920212223242526272829303132",
+ "nonce" : "0x01",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "0x"
+ ],
+ "gasLimit" : [
+ "0x061a80"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0xaaaf5374fce5edbc8e2a8697c15331677e6ebf0b",
+ "value" : [
+ "0x00"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/GeneralStateTests/stPreCompiledContracts2/CallEcrecoverInvalidSignature.json b/GeneralStateTests/stPreCompiledContracts2/CallEcrecoverInvalidSignature.json
new file mode 100644
index 000000000..1548d0fd5
--- /dev/null
+++ b/GeneralStateTests/stPreCompiledContracts2/CallEcrecoverInvalidSignature.json
@@ -0,0 +1,118 @@
+{
+ "CallEcrecoverInvalidSignature" : {
+ "_info" : {
+ "comment" : "CALL to ECREC precompile with input which is a completely invalid signature and a 32 byte output range in memory. ECREC should return an empty response and the 32 byte output range should be left unchanged.",
+ "filledwith" : "testeth 1.5.0-alpha.5-3+commit.9c4db26c",
+ "lllcversion" : "Version: 0.5.0-develop.2018.9.29+commit.c4b5101b.Darwin.appleclang",
+ "source" : "src/GeneralStateTestsFiller/stPreCompiledContracts2/CallEcrecoverInvalidSignatureFiller.json",
+ "sourceHash" : "0c4766b334540da6fb7c3074b2f58916a5b372f569bd5ae39cea7a563f3415d4"
+ },
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x989680",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "post" : {
+ "Byzantium" : [
+ {
+ "hash" : "0x9ee49fbe5b14e1e6cb43aa76ba9fc2d47990d17e99bb6b1d3c5492f49f1f2bb3",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Constantinople" : [
+ {
+ "hash" : "0x9ee49fbe5b14e1e6cb43aa76ba9fc2d47990d17e99bb6b1d3c5492f49f1f2bb3",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "EIP150" : [
+ {
+ "hash" : "0x9493e6f93663fac8862d4d41657b7b464bd6505ab0cc37560ea19fc835048cca",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "EIP158" : [
+ {
+ "hash" : "0x9ee49fbe5b14e1e6cb43aa76ba9fc2d47990d17e99bb6b1d3c5492f49f1f2bb3",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Frontier" : [
+ {
+ "hash" : "0xbf17d0546e6fc734455768b418c74d30885da7ac8c4d52097a23f3e9dbfc53de",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Homestead" : [
+ {
+ "hash" : "0xbf17d0546e6fc734455768b418c74d30885da7ac8c4d52097a23f3e9dbfc53de",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ]
+ },
+ "pre" : {
+ "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+ "balance" : "0x01312d00",
+ "code" : "0x7f1122334455667788991011121314151617181920212223242526272829303132608052602060806080600060006001620493e0f150608051600055",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "0x"
+ ],
+ "gasLimit" : [
+ "0x37ba90"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : [
+ "0x0186a0"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/GeneralStateTests/stPreCompiledContracts2/CallEcrecoverUnrecoverableKey.json b/GeneralStateTests/stPreCompiledContracts2/CallEcrecoverUnrecoverableKey.json
new file mode 100644
index 000000000..a9797892a
--- /dev/null
+++ b/GeneralStateTests/stPreCompiledContracts2/CallEcrecoverUnrecoverableKey.json
@@ -0,0 +1,118 @@
+{
+ "CallEcrecoverUnrecoverableKey" : {
+ "_info" : {
+ "comment" : "CALL to ECREC precompile with input that has a valid signature structure but that does not recover a valid key. Specifies a 32 byte output range in memory. ECREC should return an empty response and the 32 byte output range should be left unchanged.",
+ "filledwith" : "testeth 1.5.0-alpha.5-3+commit.9c4db26c",
+ "lllcversion" : "Version: 0.5.0-develop.2018.9.29+commit.c4b5101b.Darwin.appleclang",
+ "source" : "src/GeneralStateTestsFiller/stPreCompiledContracts2/CallEcrecoverUnrecoverableKeyFiller.json",
+ "sourceHash" : "8f7d5de0d10cd62354a083430d132f8dfe9b497013294f3b5b1442bc7b8cfb54"
+ },
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x989680",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "post" : {
+ "Byzantium" : [
+ {
+ "hash" : "0xb332e922800f4c7a600185a7c0f822f908eed115edd53fe95486c96afb0e30fd",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Constantinople" : [
+ {
+ "hash" : "0xb332e922800f4c7a600185a7c0f822f908eed115edd53fe95486c96afb0e30fd",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "EIP150" : [
+ {
+ "hash" : "0xafc696f31fc3b84b00711c870ae62269eb8e704eb73b33ddd62589d746783d29",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "EIP158" : [
+ {
+ "hash" : "0xb332e922800f4c7a600185a7c0f822f908eed115edd53fe95486c96afb0e30fd",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Frontier" : [
+ {
+ "hash" : "0x2434c2b8d780aa3c78868fac0f0561b638961f6f70da057af72c4150d2edb761",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Homestead" : [
+ {
+ "hash" : "0x2434c2b8d780aa3c78868fac0f0561b638961f6f70da057af72c4150d2edb761",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ]
+ },
+ "pre" : {
+ "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+ "balance" : "0x01312d00",
+ "code" : "0x7fa8b53bdf3306a35a7103ab5504a0c9b492295564b6202b1942a84ef300107281600052601b6020527f30783565316530336635336365313862373732636362303039336666373166336040527f66353366356337356237346463623331613835616138623838393262346538626060527f1122334455667788991011121314151617181920212223242526272829303132608052602060806080600060006001620493e0f150608051600055",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "0x"
+ ],
+ "gasLimit" : [
+ "0x37ba90"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : [
+ "0x0186a0"
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/GeneralStateTests/stPreCompiledContracts2/CallIdentity_6_inputShorterThanOutput.json b/GeneralStateTests/stPreCompiledContracts2/CallIdentity_6_inputShorterThanOutput.json
new file mode 100644
index 000000000..5567f4de0
--- /dev/null
+++ b/GeneralStateTests/stPreCompiledContracts2/CallIdentity_6_inputShorterThanOutput.json
@@ -0,0 +1,118 @@
+{
+ "CallIdentity_6_inputShorterThanOutput" : {
+ "_info" : {
+ "comment" : "CALL to ID precompile with 32 bytes of input and a 64 byte output range. The lower 32 bytes of the output range should be set to the input and the higher 32 bytes left unchanged.",
+ "filledwith" : "testeth 1.5.0-alpha.5-3+commit.9c4db26c",
+ "lllcversion" : "Version: 0.5.0-develop.2018.9.29+commit.c4b5101b.Darwin.appleclang",
+ "source" : "src/GeneralStateTestsFiller/stPreCompiledContracts2/CallIdentity_6_inputShorterThanOutputFiller.json",
+ "sourceHash" : "43492012cffad6493023400648e819ed3bd6894a0542d188479d8c7545e1eb54"
+ },
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x20000",
+ "currentGasLimit" : "0x989680",
+ "currentNumber" : "0x01",
+ "currentTimestamp" : "0x03e8",
+ "previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "post" : {
+ "Byzantium" : [
+ {
+ "hash" : "0xf850d326a667a720b918486f654ea8dee8f259bd181dfd5d1d9c20a541b0c020",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Constantinople" : [
+ {
+ "hash" : "0xf850d326a667a720b918486f654ea8dee8f259bd181dfd5d1d9c20a541b0c020",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "EIP150" : [
+ {
+ "hash" : "0x8a26dc52d663f97939c0857acc21c7280b5ffa4a6a7ae80bda8f2dc23d9ad44c",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "EIP158" : [
+ {
+ "hash" : "0xf850d326a667a720b918486f654ea8dee8f259bd181dfd5d1d9c20a541b0c020",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Frontier" : [
+ {
+ "hash" : "0x1f0007a6d8ab994df32a993b89ee7d9b5692209307accb12adee25c8768d0f1c",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ],
+ "Homestead" : [
+ {
+ "hash" : "0x1f0007a6d8ab994df32a993b89ee7d9b5692209307accb12adee25c8768d0f1c",
+ "indexes" : {
+ "data" : 0,
+ "gas" : 0,
+ "value" : 0
+ },
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
+ }
+ ]
+ },
+ "pre" : {
+ "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
+ "balance" : "0x01312d00",
+ "code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600052611234602052604060006020600060006004610258f150602051600055",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x0de0b6b3a7640000",
+ "code" : "",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ "0x"
+ ],
+ "gasLimit" : [
+ "0x989680"
+ ],
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
+ "value" : [
+ "0x0186a0"
+ ]
+ }
+ }
+} \ No newline at end of file