Skip to content

Commit

Permalink
Merge pull request #92 from lrettig/malformed-init-code
Browse files Browse the repository at this point in the history
Add tests for malformed init code
  • Loading branch information
axic authored Oct 25, 2018
2 parents 3395472 + a6b4d98 commit a859f75
Show file tree
Hide file tree
Showing 16 changed files with 1,107 additions and 3 deletions.
63 changes: 63 additions & 0 deletions GeneralStateTests/stEWASMTests/initMalformedBytecodeHasStart.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"initMalformedBytecodeHasStart" : {
"_info" : {
"comment" : "",
"filledwith" : "testeth 1.4.0",
"lllcversion" : "Version: 0.4.20-develop.2018.1.14+commit.0c20b6da.Darwin.appleclang",
"source" : "src/GeneralStateTestsFiller/stEWASMTests/initMalformedBytecodeHasStartFiller.yml",
"sourceHash" : "f0387d272d2bca92b72928765acbdf844e4d83a6e7725e73fc2bc93ee6892700"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x020000",
"currentGasLimit" : "0x05500000",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Byzantium" : [
{
"hash" : "0xa8398e170adc0d080f94b737c11aaabac17f09354f9ebf0b84b92d2bff060638",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x174876e800",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
},
"0xabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" : {
"balance" : "0x174876e800",
"code" : "0x0061736d0100000001110360047f7f7f7f017f60027f7f00600000022b0208657468657265756d06637265617465000008657468657265756d0c73746f7261676553746f72650001030201020503010001071102066d656d6f72790200046d61696e00020a42014001077f410021004120210141c000210241e00021034180012104418002210541d30021062003200420052006200110003602002000200110012002200310010b0ba501030041000b2000000000000000000000000000000000000000000000000000000000000000000041c0000b200000000000000000000000000000000000000000000000000000000000000001004180020b530061736d0100000001090260027f7f0060000002130108657468657265756d0666696e6973680000030201010503010001071102066d656d6f72790200046d61696e00010801010a0a0108004100410010000b",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x"
],
"gasLimit" : [
"0x5000001"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "0xabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd",
"value" : [
"0x00"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"initMalformedBytecodeHasStartFromTx" : {
"_info" : {
"comment" : "",
"filledwith" : "testeth 1.4.0",
"lllcversion" : "Version: 0.4.20-develop.2018.1.14+commit.0c20b6da.Darwin.appleclang",
"source" : "src/GeneralStateTestsFiller/stEWASMTests/initMalformedBytecodeHasStartFromTxFiller.yml",
"sourceHash" : "689ee2ed2ad8dd57727eca547e9917a0c97387875f5011a7e9af020d13f14153"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x020000",
"currentGasLimit" : "0x05500000",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Byzantium" : [
{
"hash" : "0x60f7870ae7c1fb1176a96382cbfe1c1dfc83cb08081728a7396e901a70832a36",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x174876e800",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x0061736d0100000001090260027f7f0060000002130108657468657265756d0666696e6973680000030201010503010001071102066d656d6f72790200046d61696e00010801010a0a0108004100410010000b"
],
"gasLimit" : [
"0x5000001"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "",
"value" : [
"0x00"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"initMalformedBytecodeMissingMemoryExport" : {
"_info" : {
"comment" : "",
"filledwith" : "testeth 1.4.0",
"lllcversion" : "Version: 0.4.20-develop.2018.1.14+commit.0c20b6da.Darwin.appleclang",
"source" : "src/GeneralStateTestsFiller/stEWASMTests/initMalformedBytecodeMissingMemoryExportFiller.yml",
"sourceHash" : "e4b5346e9e71459943c9d54712567e406db3b7d24237b59bbba5e446999edde9"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x020000",
"currentGasLimit" : "0x05500000",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Byzantium" : [
{
"hash" : "0xe166d49badd8b4cbe1c937fab6fdd6a698133124e00d4af5c49bff5588f82448",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x174876e800",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
},
"0xabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" : {
"balance" : "0x174876e800",
"code" : "0x0061736d0100000001110360047f7f7f7f017f60027f7f00600000022b0208657468657265756d06637265617465000008657468657265756d0c73746f7261676553746f72650001030201020503010001071102066d656d6f72790200046d61696e00020a42014001077f410021004120210141c000210241e00021034180012104418002210541c70021062003200420052006200110003602002000200110012002200310010b0b9901030041000b2000000000000000000000000000000000000000000000000000000000000000000041c0000b200000000000000000000000000000000000000000000000000000000000000001004180020b470061736d0100000001090260027f7f0060000002130108657468657265756d0666696e6973680000030201010503010001070801046d61696e00010a0a0108004100410010000b",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x"
],
"gasLimit" : [
"0x5000001"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "0xabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd",
"value" : [
"0x00"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"initMalformedBytecodeMissingMemoryExportFromTx" : {
"_info" : {
"comment" : "",
"filledwith" : "testeth 1.4.0",
"lllcversion" : "Version: 0.4.20-develop.2018.1.14+commit.0c20b6da.Darwin.appleclang",
"source" : "src/GeneralStateTestsFiller/stEWASMTests/initMalformedBytecodeMissingMemoryExportFromTxFiller.yml",
"sourceHash" : "3f50d279d60b59b0cf59ed433e3e5a9f2ef8fbc614955ae6e9341abce6d772e2"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x020000",
"currentGasLimit" : "0x05500000",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Byzantium" : [
{
"hash" : "0x60f7870ae7c1fb1176a96382cbfe1c1dfc83cb08081728a7396e901a70832a36",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x174876e800",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x0061736d0100000001090260027f7f0060000002130108657468657265756d0666696e6973680000030201010503010001070801046d61696e00010a0a0108004100410010000b"
],
"gasLimit" : [
"0x5000001"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "",
"value" : [
"0x00"
]
}
}
}
63 changes: 63 additions & 0 deletions GeneralStateTests/stEWASMTests/initMalformedBytecodeNoMain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"initMalformedBytecodeNoMain" : {
"_info" : {
"comment" : "",
"filledwith" : "testeth 1.4.0",
"lllcversion" : "Version: 0.4.20-develop.2018.1.14+commit.0c20b6da.Darwin.appleclang",
"source" : "src/GeneralStateTestsFiller/stEWASMTests/initMalformedBytecodeNoMainFiller.yml",
"sourceHash" : "b5e88f6c8d7a65aaa61081b2e34d3d1b87e1f0b8781fefe3e8a6d505d2e39a99"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x020000",
"currentGasLimit" : "0x05500000",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Byzantium" : [
{
"hash" : "0x88aaafa2fad9b006db7154abe2144acc7f38ccf64a29acaba5b8b8b2f270fe62",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x174876e800",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
},
"0xabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd" : {
"balance" : "0x174876e800",
"code" : "0x0061736d0100000001110360047f7f7f7f017f60027f7f00600000022b0208657468657265756d06637265617465000008657468657265756d0c73746f7261676553746f72650001030201020503010001071102066d656d6f72790200046d61696e00020a41013f01077f410021004120210141c000210241e000210341800121044180022105413621062003200420052006200110003602002000200110012002200310010b0b8801030041000b2000000000000000000000000000000000000000000000000000000000000000000041c0000b200000000000000000000000000000000000000000000000000000000000000001004180020b360061736d0100000001060160027f7f0002130108657468657265756d0666696e69736800000503010001070a01066d656d6f72790200",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x"
],
"gasLimit" : [
"0x5000001"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "0xabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd",
"value" : [
"0x00"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"initMalformedBytecodeNoMainFromTx" : {
"_info" : {
"comment" : "",
"filledwith" : "testeth 1.4.0",
"lllcversion" : "Version: 0.4.20-develop.2018.1.14+commit.0c20b6da.Darwin.appleclang",
"source" : "src/GeneralStateTestsFiller/stEWASMTests/initMalformedBytecodeNoMainFromTxFiller.yml",
"sourceHash" : "3cb846ae3332bdfac23f669b38830ac5c868757a2b64f4fd0fb7efcd9f7c2280"
},
"env" : {
"currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "0x020000",
"currentGasLimit" : "0x05500000",
"currentNumber" : "0x01",
"currentTimestamp" : "0x03e8",
"previousHash" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"post" : {
"Byzantium" : [
{
"hash" : "0x60f7870ae7c1fb1176a96382cbfe1c1dfc83cb08081728a7396e901a70832a36",
"indexes" : {
"data" : 0,
"gas" : 0,
"value" : 0
},
"logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
}
]
},
"pre" : {
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"balance" : "0x174876e800",
"code" : "",
"nonce" : "0x00",
"storage" : {
}
}
},
"transaction" : {
"data" : [
"0x0061736d0100000001060160027f7f0002130108657468657265756d0666696e69736800000503010001070a01066d656d6f72790200"
],
"gasLimit" : [
"0x5000001"
],
"gasPrice" : "0x01",
"nonce" : "0x00",
"secretKey" : "0x45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
"to" : "",
"value" : [
"0x00"
]
}
}
}
Loading

0 comments on commit a859f75

Please sign in to comment.