aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitry <dimitry@ethereum.org>2018-07-06 20:29:44 +0800
committerDimitry <dimitry@ethereum.org>2018-07-06 20:29:44 +0800
commit3b8723eff8edc18e80a4610066847891ab61980a (patch)
tree579d07453ce2f25e057101c21e48fedaccaa3b6e /src
parentaa820ad89b8dfe378d1ce74ed8f3f79ee94bd668 (diff)
downloaddexon-tests-3b8723eff8edc18e80a4610066847891ab61980a.tar
dexon-tests-3b8723eff8edc18e80a4610066847891ab61980a.tar.gz
dexon-tests-3b8723eff8edc18e80a4610066847891ab61980a.tar.bz2
dexon-tests-3b8723eff8edc18e80a4610066847891ab61980a.tar.lz
dexon-tests-3b8723eff8edc18e80a4610066847891ab61980a.tar.xz
dexon-tests-3b8723eff8edc18e80a4610066847891ab61980a.tar.zst
dexon-tests-3b8723eff8edc18e80a4610066847891ab61980a.zip
check returndatasize after failing create
Diffstat (limited to 'src')
-rw-r--r--src/BlockchainTestsFiller/GeneralStateTests/stCreateTest/CreateOOGafterInitCodeReturndataSize_d0g0v0Filler.json84
-rw-r--r--src/GeneralStateTestsFiller/stCreateTest/CreateOOGafterInitCodeReturndataSizeFiller.json67
2 files changed, 151 insertions, 0 deletions
diff --git a/src/BlockchainTestsFiller/GeneralStateTests/stCreateTest/CreateOOGafterInitCodeReturndataSize_d0g0v0Filler.json b/src/BlockchainTestsFiller/GeneralStateTests/stCreateTest/CreateOOGafterInitCodeReturndataSize_d0g0v0Filler.json
new file mode 100644
index 000000000..5e2eda62d
--- /dev/null
+++ b/src/BlockchainTestsFiller/GeneralStateTests/stCreateTest/CreateOOGafterInitCodeReturndataSize_d0g0v0Filler.json
@@ -0,0 +1,84 @@
+{
+ "CreateOOGafterInitCodeReturndataSize_d0g0v0" : {
+ "blocks" : [
+ {
+ "blockHeaderPremine" : {
+ "difficulty" : "0x020000",
+ "gasLimit" : "0x989680",
+ "timestamp" : "0x03e8",
+ "updatePoW" : "1"
+ },
+ "transactions" : [
+ {
+ "data" : "0x",
+ "gasLimit" : "0xd70e",
+ "gasPrice" : "0x01",
+ "nonce" : "0x00",
+ "r" : "0x7529ad747ccaac2ef9598a125b4d41f3e2f487ae4636838e8b37ee24b97d5e3a",
+ "s" : "0x2441844ea0a26e310920f6130502d08e27d0fe7c0c7afc6eda91daf762a3fcc5",
+ "to" : "0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b",
+ "v" : "0x1b",
+ "value" : "0x01"
+ }
+ ],
+ "uncleHeaders" : [
+ ]
+ }
+ ],
+ "expect" : [
+ {
+ "network" : "Byzantium",
+ "result" : {
+ "0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x01"
+ },
+ "0xf1ecf98489fa9ed60a664fc4998db699cfa39d40" : {
+ }
+ }
+ },
+ {
+ "network" : "Constantinople",
+ "result" : {
+ "0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x01"
+ },
+ "0xf1ecf98489fa9ed60a664fc4998db699cfa39d40" : {
+ }
+ }
+ }
+ ],
+ "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" : {
+ "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0xe8d4a51000",
+ "code" : "",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ },
+ "0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0x00",
+ "code" : "0x726960016001556001600255600052600a6016f36000526013600d6000f0503d60020a",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/GeneralStateTestsFiller/stCreateTest/CreateOOGafterInitCodeReturndataSizeFiller.json b/src/GeneralStateTestsFiller/stCreateTest/CreateOOGafterInitCodeReturndataSizeFiller.json
new file mode 100644
index 000000000..8014a8f89
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stCreateTest/CreateOOGafterInitCodeReturndataSizeFiller.json
@@ -0,0 +1,67 @@
+{
+ "CreateOOGafterInitCodeReturndataSize" : {
+ "_info" : {
+ "comment" : "Calls a contract that runs CREATE which deploy a code. then OOG happens upon deployment of the actual code. check the RETURNDATASIZE after create. fails with OOG if RETURNDATASIZE != 0"
+ },
+ "env" : {
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x020000",
+ "currentGasLimit" : "10000000",
+ "currentNumber" : "1",
+ "currentTimestamp" : "1000",
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
+ },
+ "expect" : [
+ {
+ "indexes" : {
+ "data" : -1,
+ "gas" : 0,
+ "value" : -1
+ },
+ "network" : [">=Byzantium"],
+ "result" : {
+ "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1"
+ },
+ "0xf1ecf98489fa9ed60a664fc4998db699cfa39d40" : {
+ "shouldnotexist" : "1"
+ }
+ }
+ }
+ ],
+ "pre" :
+ {
+ "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "1000000000000",
+ "code" : "",
+ "nonce" : "0",
+ "storage" : {
+ }
+ },
+ "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
+ "balance" : "0",
+ "nonce" : "0",
+ "//code" : "{ (MSTORE 0 0x60016001556001600255) (RETURN 22 10) }",
+ "//code" : "{ (SSTORE 1 1) (SSTORE 2 1) } ",
+ "code" : "{ (MSTORE 0 0x6960016001556001600255600052600a6016f3) (CREATE 0 13 19) (EXP 2 (RETURNDATASIZE)) }",
+ "storage": {
+ }
+ }
+ },
+ "transaction" : {
+ "data" : [
+ ""
+ ],
+ "gasLimit" : [
+ "55054"
+ ],
+ "gasPrice" : "1",
+ "nonce" : "0",
+ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
+ "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b",
+ "value" : [
+ "1"
+ ]
+ }
+ }
+}