Added tests as subtree
This commit is contained in:
parent
3bc64b6b6e
commit
3ad1daa70d
26
tests/vm/files/README.md
Normal file
26
tests/vm/files/README.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
tests
|
||||||
|
=====
|
||||||
|
|
||||||
|
Common tests for all clients to test against.
|
||||||
|
|
||||||
|
All files should be of the form:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"test1name":
|
||||||
|
{
|
||||||
|
"test1property1": ...,
|
||||||
|
"test1property2": ...,
|
||||||
|
...
|
||||||
|
},
|
||||||
|
"test2name":
|
||||||
|
{
|
||||||
|
"test2property1": ...,
|
||||||
|
"test2property2": ...,
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Arrays are allowed, but don't use them for sets of properties - only use them for data that is clearly a continuous contiguous sequence of values.
|
||||||
|
|
21
tests/vm/files/TODO
Normal file
21
tests/vm/files/TODO
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
- Move over to standard and clear JSON format:
|
||||||
|
|
||||||
|
All files should be of the form:
|
||||||
|
|
||||||
|
{
|
||||||
|
"test1name":
|
||||||
|
{
|
||||||
|
"test1property1": ...,
|
||||||
|
"test1property2": ...,
|
||||||
|
...
|
||||||
|
},
|
||||||
|
"test2name":
|
||||||
|
{
|
||||||
|
"test2property1": ...,
|
||||||
|
"test2property2": ...,
|
||||||
|
...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Arrays are allowed, but don't use them for sets of properties - only use them for data that is clearly a continuous contiguous sequence of values.
|
||||||
|
|
20
tests/vm/files/blockgenesistest.json
Normal file
20
tests/vm/files/blockgenesistest.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"inputs": {
|
||||||
|
},
|
||||||
|
"result": "f892f88ea00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479400000000000000000000000000000000000000008080834000008087038d7ea4c68000830f4240808080a004994f67dc55b09e814ab7ffc8df3686b4afb2bb53e60eae97ef043fe03fb829c0c0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": {
|
||||||
|
"cd2a3d9f938e13cd947ec05abc7fe734df8dd826": 100000000000000000000
|
||||||
|
},
|
||||||
|
"result": "f8b2f8aea00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a05e5b074eca68ed6f5cf3ef14712b7c97f431a41deff21e3f211cf687f618026780834000008087038d7ea4c68000830f4240808080a004994f67dc55b09e814ab7ffc8df3686b4afb2bb53e60eae97ef043fe03fb829c0c0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": {
|
||||||
|
"cd2a3d9f938e13cd947ec05abc7fe734df8dd826": 99000000000000000000,
|
||||||
|
"13978aee95f38490e9769c39b2773ed763d9cd5f": 1000000000000000000
|
||||||
|
},
|
||||||
|
"result": "f8b2f8aea00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0b1062e564d1bdb302a2feae46e837fef59c4f8a408967009dcc48327d80d8fff80834000008087038d7ea4c68000830f4240808080a004994f67dc55b09e814ab7ffc8df3686b4afb2bb53e60eae97ef043fe03fb829c0c0"
|
||||||
|
}
|
||||||
|
]
|
15
tests/vm/files/genesishashestest.json
Normal file
15
tests/vm/files/genesishashestest.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"genesis_rlp_hex": "f8abf8a7a00000000000000000000000000000000000000000000000000000000000000000a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a008bf6a98374f333b84e7d063d607696ac7cbbd409bd20fbe6a741c2dfc0eb28580830200008080830f4240808080a004994f67dc55b09e814ab7ffc8df3686b4afb2bb53e60eae97ef043fe03fb829c0c0",
|
||||||
|
"genesis_state_root": "08bf6a98374f333b84e7d063d607696ac7cbbd409bd20fbe6a741c2dfc0eb285",
|
||||||
|
"initial_alloc": {
|
||||||
|
"51ba59315b3a95761d0863b05ccc7a7f54703d99": "1606938044258990275541962092341162602522202993782792835301376",
|
||||||
|
"e4157b34ea9615cfbde6b4fda419828124b70c78": "1606938044258990275541962092341162602522202993782792835301376",
|
||||||
|
"b9c015918bdaba24b4ff057a92a3873d6eb201be": "1606938044258990275541962092341162602522202993782792835301376",
|
||||||
|
"6c386a4b26f73c802f34673f7248bb118f97424a": "1606938044258990275541962092341162602522202993782792835301376",
|
||||||
|
"cd2a3d9f938e13cd947ec05abc7fe734df8dd826": "1606938044258990275541962092341162602522202993782792835301376",
|
||||||
|
"2ef47100e0787b915105fd5e3f4ff6752079d5cb": "1606938044258990275541962092341162602522202993782792835301376",
|
||||||
|
"e6716f9544a56c530d868e4bfbacb172315bdead": "1606938044258990275541962092341162602522202993782792835301376",
|
||||||
|
"1a26338f0d905e295fccb71fa9ea849ffa12aaf4": "1606938044258990275541962092341162602522202993782792835301376"
|
||||||
|
},
|
||||||
|
"genesis_hash": "f68067286ddb7245c2203b18135456de1fc4ed6a24a2d9014195faa7900025bf"
|
||||||
|
}
|
62
tests/vm/files/hexencodetest.json
Normal file
62
tests/vm/files/hexencodetest.json
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
{
|
||||||
|
"zz,odd,open": {
|
||||||
|
"seq": [ 0, 0, 1, 2, 3, 4, 5 ],
|
||||||
|
"term": false,
|
||||||
|
"out": "10012345"
|
||||||
|
},
|
||||||
|
"z,even,open": {
|
||||||
|
"seq": [ 0, 1, 2, 3, 4, 5 ],
|
||||||
|
"term": false,
|
||||||
|
"out": "00012345"
|
||||||
|
},
|
||||||
|
"nz,odd,open": {
|
||||||
|
"seq": [ 1, 2, 3, 4, 5 ],
|
||||||
|
"term": false,
|
||||||
|
"out": "112345"
|
||||||
|
},
|
||||||
|
"zz,even,open": {
|
||||||
|
"seq": [ 0, 0, 1, 2, 3, 4 ],
|
||||||
|
"term": false,
|
||||||
|
"out": "00001234"
|
||||||
|
},
|
||||||
|
"z,odd,open": {
|
||||||
|
"seq": [ 0, 1, 2, 3, 4 ],
|
||||||
|
"term": false,
|
||||||
|
"out": "101234"
|
||||||
|
},
|
||||||
|
"nz,even,open": {
|
||||||
|
"seq": [ 1, 2, 3, 4 ],
|
||||||
|
"term": false,
|
||||||
|
"out": "001234"
|
||||||
|
},
|
||||||
|
"zz,odd,term": {
|
||||||
|
"seq": [ 0, 0, 1, 2, 3, 4, 5 ],
|
||||||
|
"term": true,
|
||||||
|
"out": "30012345"
|
||||||
|
},
|
||||||
|
"z,even,term": {
|
||||||
|
"seq": [ 0, 1, 2, 3, 4, 5 ],
|
||||||
|
"term": true,
|
||||||
|
"out": "20012345"
|
||||||
|
},
|
||||||
|
"nz,odd,term": {
|
||||||
|
"seq": [ 1, 2, 3, 4, 5 ],
|
||||||
|
"term": true,
|
||||||
|
"out": "312345"
|
||||||
|
},
|
||||||
|
"zz,even,term": {
|
||||||
|
"seq": [ 0, 0, 1, 2, 3, 4 ],
|
||||||
|
"term": true,
|
||||||
|
"out": "20001234"
|
||||||
|
},
|
||||||
|
"z,odd,term": {
|
||||||
|
"seq": [ 0, 1, 2, 3, 4 ],
|
||||||
|
"term": true,
|
||||||
|
"out": "301234"
|
||||||
|
},
|
||||||
|
"nz,even,term": {
|
||||||
|
"seq": [ 1, 2, 3, 4 ],
|
||||||
|
"term": true,
|
||||||
|
"out": "201234"
|
||||||
|
}
|
||||||
|
}
|
22
tests/vm/files/keyaddrtest.json
Normal file
22
tests/vm/files/keyaddrtest.json
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"seed": "cow",
|
||||||
|
"key": "c85ef7d79691fe79573b1a7064c19c1a9819ebdbd1faaab1a8ec92344438aaf4",
|
||||||
|
"addr": "cd2a3d9f938e13cd947ec05abc7fe734df8dd826",
|
||||||
|
"sig_of_emptystring": {
|
||||||
|
"v": "27",
|
||||||
|
"r": "55022946425863772466282515086640833500580355555249003729267710149987842051473",
|
||||||
|
"s": "3021698389129950584349170550428805649435913935175976180112863059249983907949"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"seed": "horse",
|
||||||
|
"key": "c87f65ff3f271bf5dc8643484f66b200109caffe4bf98c4cb393dc35740b28c0",
|
||||||
|
"addr": "13978aee95f38490e9769c39b2773ed763d9cd5f",
|
||||||
|
"sig_of_emptystring": {
|
||||||
|
"v": "28",
|
||||||
|
"r": "20570452350081260599473412372903969148670549754219103025003129053348571714359",
|
||||||
|
"s": "76892551129780267788164835941580941601518827936179476514262023835864819088004"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
55
tests/vm/files/namecoin.json
Normal file
55
tests/vm/files/namecoin.json
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"namecoin": {
|
||||||
|
"pre": {
|
||||||
|
"82a978b3f5962a5b0957d9ee9eef472ee55b42f1": {
|
||||||
|
"nonce": "1",
|
||||||
|
"balance": "2500000000000000000",
|
||||||
|
"storage": {},
|
||||||
|
"code": "0x"
|
||||||
|
},
|
||||||
|
"c305c901078781c232a2a521c2af7980f8385ee9": {
|
||||||
|
"nonce": "0",
|
||||||
|
"balance": "0",
|
||||||
|
"storage": {},
|
||||||
|
"code": "0x600035560f0f601d5960203560003557600160005460206000f2602758600060205460206020f2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"exec": {
|
||||||
|
"origin": "82a978b3f5962a5b0957d9ee9eef472ee55b42f1",
|
||||||
|
"code": "0x600035560f0f601d5960203560003557600160005460206000f2602758600060205460206020f2",
|
||||||
|
"value": "0",
|
||||||
|
"address": "c305c901078781c232a2a521c2af7980f8385ee9",
|
||||||
|
"gas": "10000",
|
||||||
|
"caller": "82a978b3f5962a5b0957d9ee9eef472ee55b42f1",
|
||||||
|
"data": "0x000000000000000000000000000000000000000000000000000000000000002d000000000000000000000000000000000000000000000000000000000000004e",
|
||||||
|
"gasPrice": "1000000000000"
|
||||||
|
},
|
||||||
|
"callcreates": [],
|
||||||
|
"gas": "9763",
|
||||||
|
"env": {
|
||||||
|
"currentTimestamp": "1405282164",
|
||||||
|
"currentGasLimit": "999023",
|
||||||
|
"previousHash": "112a6e7995fcb66376f44e52f011c38d328a9ed3a1dac6eebb1376fccd055fad",
|
||||||
|
"currentCoinbase": "82a978b3f5962a5b0957d9ee9eef472ee55b42f1",
|
||||||
|
"currentDifficulty": "4190208",
|
||||||
|
"currentNumber": "1"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"82a978b3f5962a5b0957d9ee9eef472ee55b42f1": {
|
||||||
|
"nonce": "1",
|
||||||
|
"balance": "2500000000000000000",
|
||||||
|
"storage": {},
|
||||||
|
"code": "0x"
|
||||||
|
},
|
||||||
|
"c305c901078781c232a2a521c2af7980f8385ee9": {
|
||||||
|
"nonce": "0",
|
||||||
|
"balance": "0",
|
||||||
|
"storage": {
|
||||||
|
"0x2d": "0x4e"
|
||||||
|
},
|
||||||
|
"code": "0x600035560f0f601d5960203560003557600160005460206000f2602758600060205460206020f2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"out": "0x0000000000000000000000000000000000000000000000000000000000000001"
|
||||||
|
}
|
||||||
|
}
|
146
tests/vm/files/rlptest.json
Normal file
146
tests/vm/files/rlptest.json
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
{
|
||||||
|
"emptystring": {
|
||||||
|
"in": "",
|
||||||
|
"out": "80"
|
||||||
|
},
|
||||||
|
"shortstring": {
|
||||||
|
"in": "dog",
|
||||||
|
"out": "83646f67"
|
||||||
|
},
|
||||||
|
"shortstring2": {
|
||||||
|
"in": "Lorem ipsum dolor sit amet, consectetur adipisicing eli",
|
||||||
|
"out": "b74c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e7365637465747572206164697069736963696e6720656c69"
|
||||||
|
},
|
||||||
|
"longstring": {
|
||||||
|
"in": "Lorem ipsum dolor sit amet, consectetur adipisicing elit",
|
||||||
|
"out": "b8384c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e7365637465747572206164697069736963696e6720656c6974"
|
||||||
|
},
|
||||||
|
"longstring2": {
|
||||||
|
"in": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur mauris magna, suscipit sed vehicula non, iaculis faucibus tortor. Proin suscipit ultricies malesuada. Duis tortor elit, dictum quis tristique eu, ultrices at risus. Morbi a est imperdiet mi ullamcorper aliquet suscipit nec lorem. Aenean quis leo mollis, vulputate elit varius, consequat enim. Nulla ultrices turpis justo, et posuere urna consectetur nec. Proin non convallis metus. Donec tempor ipsum in mauris congue sollicitudin. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse convallis sem vel massa faucibus, eget lacinia lacus tempor. Nulla quis ultricies purus. Proin auctor rhoncus nibh condimentum mollis. Aliquam consequat enim at metus luctus, a eleifend purus egestas. Curabitur at nibh metus. Nam bibendum, neque at auctor tristique, lorem libero aliquet arcu, non interdum tellus lectus sit amet eros. Cras rhoncus, metus ac ornare cursus, dolor justo ultrices metus, at ullamcorper volutpat",
|
||||||
|
"out": "b904004c6f72656d20697073756d20646f6c6f722073697420616d65742c20636f6e73656374657475722061646970697363696e6720656c69742e20437572616269747572206d6175726973206d61676e612c20737573636970697420736564207665686963756c61206e6f6e2c20696163756c697320666175636962757320746f72746f722e2050726f696e20737573636970697420756c74726963696573206d616c6573756164612e204475697320746f72746f7220656c69742c2064696374756d2071756973207472697374697175652065752c20756c7472696365732061742072697375732e204d6f72626920612065737420696d70657264696574206d6920756c6c616d636f7270657220616c6971756574207375736369706974206e6563206c6f72656d2e2041656e65616e2071756973206c656f206d6f6c6c69732c2076756c70757461746520656c6974207661726975732c20636f6e73657175617420656e696d2e204e756c6c6120756c74726963657320747572706973206a7573746f2c20657420706f73756572652075726e6120636f6e7365637465747572206e65632e2050726f696e206e6f6e20636f6e76616c6c6973206d657475732e20446f6e65632074656d706f7220697073756d20696e206d617572697320636f6e67756520736f6c6c696369747564696e2e20566573746962756c756d20616e746520697073756d207072696d697320696e206661756369627573206f726369206c756374757320657420756c74726963657320706f737565726520637562696c69612043757261653b2053757370656e646973736520636f6e76616c6c69732073656d2076656c206d617373612066617563696275732c2065676574206c6163696e6961206c616375732074656d706f722e204e756c6c61207175697320756c747269636965732070757275732e2050726f696e20617563746f722072686f6e637573206e69626820636f6e64696d656e74756d206d6f6c6c69732e20416c697175616d20636f6e73657175617420656e696d206174206d65747573206c75637475732c206120656c656966656e6420707572757320656765737461732e20437572616269747572206174206e696268206d657475732e204e616d20626962656e64756d2c206e6571756520617420617563746f72207472697374697175652c206c6f72656d206c696265726f20616c697175657420617263752c206e6f6e20696e74657264756d2074656c6c7573206c65637475732073697420616d65742065726f732e20437261732072686f6e6375732c206d65747573206163206f726e617265206375727375732c20646f6c6f72206a7573746f20756c747269636573206d657475732c20617420756c6c616d636f7270657220766f6c7574706174"
|
||||||
|
},
|
||||||
|
"zero": {
|
||||||
|
"in": 0,
|
||||||
|
"out": "80"
|
||||||
|
},
|
||||||
|
"smallint": {
|
||||||
|
"in": 1,
|
||||||
|
"out": "01"
|
||||||
|
},
|
||||||
|
"smallint2": {
|
||||||
|
"in": 16,
|
||||||
|
"out": "10"
|
||||||
|
},
|
||||||
|
"smallint3": {
|
||||||
|
"in": 79,
|
||||||
|
"out": "4f"
|
||||||
|
},
|
||||||
|
"smallint4": {
|
||||||
|
"in": 127,
|
||||||
|
"out": "7f"
|
||||||
|
},
|
||||||
|
"mediumint1": {
|
||||||
|
"in": 128,
|
||||||
|
"out": "8180"
|
||||||
|
},
|
||||||
|
"mediumint2": {
|
||||||
|
"in": 1000,
|
||||||
|
"out": "8203e8"
|
||||||
|
},
|
||||||
|
"mediumint3": {
|
||||||
|
"in": 100000,
|
||||||
|
"out": "830186a0"
|
||||||
|
},
|
||||||
|
"mediumint4": {
|
||||||
|
"in": "#83729609699884896815286331701780722",
|
||||||
|
"out": "8F102030405060708090A0B0C0D0E0F2"
|
||||||
|
},
|
||||||
|
"mediumint5": {
|
||||||
|
"in": "#105315505618206987246253880190783558935785933862974822347068935681",
|
||||||
|
"out": "9C0100020003000400050006000700080009000A000B000C000D000E01"
|
||||||
|
},
|
||||||
|
"emptylist": {
|
||||||
|
"in": [],
|
||||||
|
"out": "c0"
|
||||||
|
},
|
||||||
|
"stringlist": {
|
||||||
|
"in": [ "dog", "god", "cat" ],
|
||||||
|
"out": "cc83646f6783676f6483636174"
|
||||||
|
},
|
||||||
|
"multilist": {
|
||||||
|
"in": [ "zw", [ 4 ], 1 ],
|
||||||
|
"out": "c6827a77c10401"
|
||||||
|
},
|
||||||
|
"shortListMax1": {
|
||||||
|
"in": [ "asdf", "qwer", "zxcv", "asdf","qwer", "zxcv", "asdf", "qwer", "zxcv", "asdf", "qwer"],
|
||||||
|
"out": "F784617364668471776572847a78637684617364668471776572847a78637684617364668471776572847a78637684617364668471776572"
|
||||||
|
},
|
||||||
|
"longList1" : {
|
||||||
|
"in" : [
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"]
|
||||||
|
],
|
||||||
|
"out": "F840CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376"
|
||||||
|
},
|
||||||
|
"longList2" : {
|
||||||
|
"in" : [
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"],
|
||||||
|
["asdf","qwer","zxcv"]
|
||||||
|
],
|
||||||
|
"out": "F90200CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376CF84617364668471776572847a786376"
|
||||||
|
},
|
||||||
|
|
||||||
|
"listsoflists": {
|
||||||
|
"in": [ [ [], [] ], [] ],
|
||||||
|
"out": "c4c2c0c0c0"
|
||||||
|
},
|
||||||
|
"listsoflists2": {
|
||||||
|
"in": [ [], [[]], [ [], [[]] ] ],
|
||||||
|
"out": "c7c0c1c0c3c0c1c0"
|
||||||
|
},
|
||||||
|
"dictTest1" : {
|
||||||
|
"in" : [
|
||||||
|
["key1", "val1"],
|
||||||
|
["key2", "val2"],
|
||||||
|
["key3", "val3"],
|
||||||
|
["key4", "val4"]
|
||||||
|
],
|
||||||
|
"out" : "ECCA846b6579318476616c31CA846b6579328476616c32CA846b6579338476616c33CA846b6579348476616c34"
|
||||||
|
},
|
||||||
|
"bigint": {
|
||||||
|
"in": "#115792089237316195423570985008687907853269984665640564039457584007913129639936",
|
||||||
|
"out": "a1010000000000000000000000000000000000000000000000000000000000000000"
|
||||||
|
}
|
||||||
|
}
|
84
tests/vm/files/trietest.json
Normal file
84
tests/vm/files/trietest.json
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
{
|
||||||
|
"singleItem": {
|
||||||
|
"in": {
|
||||||
|
"A": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||||
|
},
|
||||||
|
"root": "d23786fb4a010da3ce639d66d5e904a11dbc02746d1ce25029e53290cabf28ab"
|
||||||
|
},
|
||||||
|
"dogs": {
|
||||||
|
"in": {
|
||||||
|
"doe": "reindeer",
|
||||||
|
"dog": "puppy",
|
||||||
|
"dogglesworth": "cat"
|
||||||
|
},
|
||||||
|
"root": "8aad789dff2f538bca5d8ea56e8abe10f4c7ba3a5dea95fea4cd6e7c3a1168d3"
|
||||||
|
},
|
||||||
|
"puppy": {
|
||||||
|
"in": {
|
||||||
|
"do": "verb",
|
||||||
|
"horse": "stallion",
|
||||||
|
"doge": "coin",
|
||||||
|
"dog": "puppy"
|
||||||
|
},
|
||||||
|
"root": "5991bb8c6514148a29db676a14ac506cd2cd5775ace63c30a4fe457715e9ac84"
|
||||||
|
},
|
||||||
|
"emptyValues": {
|
||||||
|
"in": {
|
||||||
|
"do": "verb",
|
||||||
|
"ether": "wookiedoo",
|
||||||
|
"horse": "stallion",
|
||||||
|
"shaman": "horse",
|
||||||
|
"doge": "coin",
|
||||||
|
"ether": "",
|
||||||
|
"dog": "puppy",
|
||||||
|
"shaman": ""
|
||||||
|
},
|
||||||
|
"root": "4505cb6d817068bcd68fb225ab4d5ab70860461d3b35738bf6bcf7b44d702d0d"
|
||||||
|
},
|
||||||
|
"foo": {
|
||||||
|
"in": {
|
||||||
|
"foo": "bar",
|
||||||
|
"food": "bat",
|
||||||
|
"food": "bass"
|
||||||
|
},
|
||||||
|
"root": "17beaa1648bafa633cda809c90c04af50fc8aed3cb40d16efbddee6fdf63c4c3"
|
||||||
|
},
|
||||||
|
"smallValues": {
|
||||||
|
"in": {
|
||||||
|
"be": "e",
|
||||||
|
"dog": "puppy",
|
||||||
|
"bed": "d"
|
||||||
|
},
|
||||||
|
"root": "3f67c7a47520f79faa29255d2d3c084a7a6df0453116ed7232ff10277a8be68b"
|
||||||
|
},
|
||||||
|
"testy": {
|
||||||
|
"in": {
|
||||||
|
"test": "test",
|
||||||
|
"te": "testy"
|
||||||
|
},
|
||||||
|
"root": "8452568af70d8d140f58d941338542f645fcca50094b20f3c3d8c3df49337928"
|
||||||
|
},
|
||||||
|
"hex": {
|
||||||
|
"in": {
|
||||||
|
"0x0045": "0x0123456789",
|
||||||
|
"0x4500": "0x9876543210"
|
||||||
|
},
|
||||||
|
"root": "285505fcabe84badc8aa310e2aae17eddc7d120aabec8a476902c8184b3a3503"
|
||||||
|
},
|
||||||
|
"jeff": {
|
||||||
|
"in": {
|
||||||
|
"0x0000000000000000000000000000000000000000000000000000000000000045": "0x22b224a1420a802ab51d326e29fa98e34c4f24ea",
|
||||||
|
"0x0000000000000000000000000000000000000000000000000000000000000046": "0x67706c2076330000000000000000000000000000000000000000000000000000",
|
||||||
|
"0x0000000000000000000000000000000000000000000000000000001234567890": "0x697c7b8c961b56f675d570498424ac8de1a918f6",
|
||||||
|
"0x000000000000000000000000697c7b8c961b56f675d570498424ac8de1a918f6": "0x1234567890",
|
||||||
|
"0x0000000000000000000000007ef9e639e2733cb34e4dfc576d4b23f72db776b2": "0x4655474156000000000000000000000000000000000000000000000000000000",
|
||||||
|
"0x000000000000000000000000ec4f34c97e43fbb2816cfd95e388353c7181dab1": "0x4e616d6552656700000000000000000000000000000000000000000000000000",
|
||||||
|
"0x4655474156000000000000000000000000000000000000000000000000000000": "0x7ef9e639e2733cb34e4dfc576d4b23f72db776b2",
|
||||||
|
"0x4e616d6552656700000000000000000000000000000000000000000000000000": "0xec4f34c97e43fbb2816cfd95e388353c7181dab1",
|
||||||
|
"0x0000000000000000000000000000000000000000000000000000001234567890": "",
|
||||||
|
"0x000000000000000000000000697c7b8c961b56f675d570498424ac8de1a918f6": "0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000",
|
||||||
|
"0x6f6f6f6820736f2067726561742c207265616c6c6c793f000000000000000000": "0x697c7b8c961b56f675d570498424ac8de1a918f6"
|
||||||
|
},
|
||||||
|
"root": "088c8e162c91c75ca9efa63f21530bbc6964cff7453a5d6af8404d090292a3e7"
|
||||||
|
}
|
||||||
|
}
|
19
tests/vm/files/trietestnextprev.json
Normal file
19
tests/vm/files/trietestnextprev.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"basic": {
|
||||||
|
"in": [ "cat", "doge", "wallace" ],
|
||||||
|
"tests": [
|
||||||
|
[ "", "", "cat" ],
|
||||||
|
[ "bobo", "", "cat" ],
|
||||||
|
[ "c", "", "cat" ],
|
||||||
|
[ "car", "", "cat" ],
|
||||||
|
[ "cat", "", "doge" ],
|
||||||
|
[ "catering", "cat", "doge" ],
|
||||||
|
[ "d", "cat", "doge" ],
|
||||||
|
[ "doge", "cat", "wallace" ],
|
||||||
|
[ "dogerton", "doge", "wallace" ],
|
||||||
|
[ "w", "doge", "wallace" ],
|
||||||
|
[ "wallace", "doge", "" ],
|
||||||
|
[ "wallace123", "wallace", ""]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
24
tests/vm/files/txtest.json
Normal file
24
tests/vm/files/txtest.json
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"key": "c85ef7d79691fe79573b1a7064c19c1a9819ebdbd1faaab1a8ec92344438aaf4",
|
||||||
|
"nonce": 0,
|
||||||
|
"gasprice": 1000000000000,
|
||||||
|
"startgas": 10000,
|
||||||
|
"to": "13978aee95f38490e9769c39b2773ed763d9cd5f",
|
||||||
|
"value": 10000000000000000,
|
||||||
|
"data": "",
|
||||||
|
"unsigned": "eb8085e8d4a510008227109413978aee95f38490e9769c39b2773ed763d9cd5f872386f26fc1000080808080",
|
||||||
|
"signed": "f86b8085e8d4a510008227109413978aee95f38490e9769c39b2773ed763d9cd5f872386f26fc10000801ba0eab47c1a49bf2fe5d40e01d313900e19ca485867d462fe06e139e3a536c6d4f4a014a569d327dcda4b29f74f93c0e9729d2f49ad726e703f9cd90dbb0fbf6649f1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "c87f65ff3f271bf5dc8643484f66b200109caffe4bf98c4cb393dc35740b28c0",
|
||||||
|
"nonce": 0,
|
||||||
|
"gasprice": 1000000000000,
|
||||||
|
"startgas": 10000,
|
||||||
|
"to": "",
|
||||||
|
"value": 0,
|
||||||
|
"data": "6025515b525b600a37f260003556601b596020356000355760015b525b54602052f260255860005b525b54602052f2",
|
||||||
|
"unsigned": "f83f8085e8d4a510008227108080af6025515b525b600a37f260003556601b596020356000355760015b525b54602052f260255860005b525b54602052f2808080",
|
||||||
|
"signed": "f87f8085e8d4a510008227108080af6025515b525b600a37f260003556601b596020356000355760015b525b54602052f260255860005b525b54602052f21ba05afed0244d0da90b67cf8979b0f246432a5112c0d31e8d5eedd2bc17b171c694a0bb1035c834677c2e1185b8dc90ca6d1fa585ab3d7ef23707e1a497a98e752d1b"
|
||||||
|
}
|
||||||
|
]
|
59
tests/vm/files/vmtests/random.json
Normal file
59
tests/vm/files/vmtests/random.json
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"random": {
|
||||||
|
"pre": {
|
||||||
|
"7d577a597b2742b498cb5cf0c26cdcd726d39e6e": {
|
||||||
|
"nonce": "0",
|
||||||
|
"balance": "1",
|
||||||
|
"storage": {},
|
||||||
|
"code": "0x"
|
||||||
|
},
|
||||||
|
"82a978b3f5962a5b0957d9ee9eef472ee55b42f1": {
|
||||||
|
"nonce": "0",
|
||||||
|
"balance": "2500000000000000000",
|
||||||
|
"storage": {},
|
||||||
|
"code": "0x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"exec": {
|
||||||
|
"origin": "82a978b3f5962a5b0957d9ee9eef472ee55b42f1",
|
||||||
|
"code": "0x60f86363f011b260c16324413d44608e633688a34a6043637657ab003809060b0cff0aff00070f413041f234344542020f0043393104590c09325c13383458f137f0600845f205300a0d36030b35402011393635395454593a015940",
|
||||||
|
"value": "0",
|
||||||
|
"address": "7d577a597b2742b498cb5cf0c26cdcd726d39e6e",
|
||||||
|
"gas": "10000",
|
||||||
|
"caller": "82a978b3f5962a5b0957d9ee9eef472ee55b42f1",
|
||||||
|
"data": "0x604e63f12f6b0c60426319bcb28060986330a233e8604463265e809d0104600a3af0f10ff10d0c1336114408583a33f05135410160540f524057201313440d585513f25c54115c433a0d37045a5212094109f10108125c35100f535a",
|
||||||
|
"gasPrice": "1000000000000"
|
||||||
|
},
|
||||||
|
"callcreates": [],
|
||||||
|
"gas": "9987",
|
||||||
|
"env": {
|
||||||
|
"currentTimestamp": "1405320512",
|
||||||
|
"currentGasLimit": "999023",
|
||||||
|
"previousHash": "112a6e7995fcb66376f44e52f011c38d328a9ed3a1dac6eebb1376fccd055fad",
|
||||||
|
"currentCoinbase": "82a978b3f5962a5b0957d9ee9eef472ee55b42f1",
|
||||||
|
"currentDifficulty": "4190208",
|
||||||
|
"currentNumber": "1"
|
||||||
|
},
|
||||||
|
"post": {
|
||||||
|
"0000000000000000000000000000000000000001": {
|
||||||
|
"nonce": "0",
|
||||||
|
"balance": "1",
|
||||||
|
"storage": {},
|
||||||
|
"code": "0x"
|
||||||
|
},
|
||||||
|
"7d577a597b2742b498cb5cf0c26cdcd726d39e6e": {
|
||||||
|
"nonce": "0",
|
||||||
|
"balance": "0",
|
||||||
|
"storage": {},
|
||||||
|
"code": "0x"
|
||||||
|
},
|
||||||
|
"82a978b3f5962a5b0957d9ee9eef472ee55b42f1": {
|
||||||
|
"nonce": "0",
|
||||||
|
"balance": "2500000000000000000",
|
||||||
|
"storage": {},
|
||||||
|
"code": "0x"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"out": "0x"
|
||||||
|
}
|
||||||
|
}
|
3239
tests/vm/files/vmtests/vmArithmeticTest.json
Normal file
3239
tests/vm/files/vmtests/vmArithmeticTest.json
Normal file
File diff suppressed because it is too large
Load Diff
1882
tests/vm/files/vmtests/vmBitwiseLogicOperationTest.json
Normal file
1882
tests/vm/files/vmtests/vmBitwiseLogicOperationTest.json
Normal file
File diff suppressed because it is too large
Load Diff
259
tests/vm/files/vmtests/vmBlockInfoTest.json
Normal file
259
tests/vm/files/vmtests/vmBlockInfoTest.json
Normal file
@ -0,0 +1,259 @@
|
|||||||
|
{
|
||||||
|
"coinbase" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x41600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9798",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x41600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
"0x" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x41600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"difficulty" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x44600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9798",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x44600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
"0x" : "0x0100"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x44600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gaslimit" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x45600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9798",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x45600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
"0x" : "0x0f4240"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x45600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"number" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x43600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9898",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x43600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x43600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"prevhash" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x40600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9798",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x40600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
"0x" : "0x5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x40600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"timestamp" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x42600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9798",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x42600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
"0x" : "0x01"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x42600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1131
tests/vm/files/vmtests/vmEnvironmentalInfoTest.json
Normal file
1131
tests/vm/files/vmtests/vmEnvironmentalInfoTest.json
Normal file
File diff suppressed because it is too large
Load Diff
1372
tests/vm/files/vmtests/vmIOandFlowOperationsTest.json
Normal file
1372
tests/vm/files/vmtests/vmIOandFlowOperationsTest.json
Normal file
File diff suppressed because it is too large
Load Diff
2880
tests/vm/files/vmtests/vmPushDupSwapTest.json
Normal file
2880
tests/vm/files/vmtests/vmPushDupSwapTest.json
Normal file
File diff suppressed because it is too large
Load Diff
173
tests/vm/files/vmtests/vmSha3Test.json
Normal file
173
tests/vm/files/vmtests/vmSha3Test.json
Normal file
@ -0,0 +1,173 @@
|
|||||||
|
{
|
||||||
|
"sha3_0" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x6000600020600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "100000000000",
|
||||||
|
"gasPrice" : "1000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "99999999777",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x6000600020600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
"0x" : "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x6000600020600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sha3_1" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x6005600420600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9776",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x6005600420600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
"0x" : "0xc41589e7559804ea4a2080dad19d876a024ccb05117835447d72ce08c1d020ec"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x6005600420600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sha3_2" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x600a600a20600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9776",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x600a600a20600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
"0x" : "0x6bd2dd6bd408cbee33429358bf24fdc64612fbf8b1b4db604518f40ffd34b607"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x600a600a20600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sha3_3" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x6064640fffffffff20600057",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "0",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x6064640fffffffff20600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x6064640fffffffff20600057",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1650
tests/vm/files/vmtests/vmSystemOperationsTest.json
Normal file
1650
tests/vm/files/vmtests/vmSystemOperationsTest.json
Normal file
File diff suppressed because it is too large
Load Diff
206
tests/vm/files/vmtests/vmtests.json
Normal file
206
tests/vm/files/vmtests/vmtests.json
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
{
|
||||||
|
"arith" : {
|
||||||
|
"callcreates" : [
|
||||||
|
{
|
||||||
|
"data" : "0x",
|
||||||
|
"destination" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"gasLimit" : "9770",
|
||||||
|
"value" : "74"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x600060006000600060026002600803036002600306600260020460046004600402026002600201010101013360c85c03f1",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9949",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "999999999999999926",
|
||||||
|
"code" : "0x600060006000600060026002600803036002600306600260020460046004600402026002600201010101013360c85c03f1",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x600060006000600060026002600803036002600306600260020460046004600402026002600201010101013360c85c03f1",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"boolean" : {
|
||||||
|
"callcreates" : [
|
||||||
|
{
|
||||||
|
"data" : "0x",
|
||||||
|
"destination" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"gasLimit" : "9786",
|
||||||
|
"value" : "2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data" : "0x",
|
||||||
|
"destination" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"gasLimit" : "9731",
|
||||||
|
"value" : "12"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data" : "0x",
|
||||||
|
"destination" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"gasLimit" : "9694",
|
||||||
|
"value" : "13"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data" : "0x",
|
||||||
|
"destination" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"gasLimit" : "9657",
|
||||||
|
"value" : "14"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x60016001100f601b59600060006000600060023360c85c03f1505d60006001100f603659600060006000600060033360c85c03f1505d60016000100f605159600060006000600060043360c85c03f1505d60006000100f606c59600060006000600060053360c85c03f1505d60016001110f6087596000600060006000600c3360c85c03f1505d60006001110f60a2596000600060006000600d3360c85c03f1505d60016000110f60bd596000600060006000600e3360c85c03f1505d60006000110f60d8596000600060006000600f3360c85c03f1505d",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9828",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "999999999999999959",
|
||||||
|
"code" : "0x60016001100f601b59600060006000600060023360c85c03f1505d60006001100f603659600060006000600060033360c85c03f1505d60016000100f605159600060006000600060043360c85c03f1505d60006000100f606c59600060006000600060053360c85c03f1505d60016001110f6087596000600060006000600c3360c85c03f1505d60006001110f60a2596000600060006000600d3360c85c03f1505d60016000110f60bd596000600060006000600e3360c85c03f1505d60006000110f60d8596000600060006000600f3360c85c03f1505d",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x60016001100f601b59600060006000600060023360c85c03f1505d60006001100f603659600060006000600060033360c85c03f1505d60016000100f605159600060006000600060043360c85c03f1505d60006000100f606c59600060006000600060053360c85c03f1505d60016001110f6087596000600060006000600c3360c85c03f1505d60006001110f60a2596000600060006000600d3360c85c03f1505d60016000110f60bd596000600060006000600e3360c85c03f1505d60006000110f60d8596000600060006000600f3360c85c03f1505d",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mktx" : {
|
||||||
|
"callcreates" : [
|
||||||
|
{
|
||||||
|
"data" : "0x",
|
||||||
|
"destination" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"gasLimit" : "9792",
|
||||||
|
"value" : "500000000000000000"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x60006000600060006706f05b59d3b200003360c85c03f1",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9971",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "500000000000000000",
|
||||||
|
"code" : "0x60006000600060006706f05b59d3b200003360c85c03f1",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x60006000600060006706f05b59d3b200003360c85c03f1",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"suicide" : {
|
||||||
|
"callcreates" : [
|
||||||
|
],
|
||||||
|
"env" : {
|
||||||
|
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
|
||||||
|
"currentDifficulty" : "256",
|
||||||
|
"currentGasLimit" : "1000000",
|
||||||
|
"currentNumber" : "0",
|
||||||
|
"currentTimestamp" : "1",
|
||||||
|
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
|
||||||
|
},
|
||||||
|
"exec" : {
|
||||||
|
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
|
||||||
|
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"code" : "0x33ff",
|
||||||
|
"data" : "0x",
|
||||||
|
"gas" : "10000",
|
||||||
|
"gasPrice" : "100000000000000",
|
||||||
|
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
|
||||||
|
"value" : "1000000000000000000"
|
||||||
|
},
|
||||||
|
"gas" : "9999",
|
||||||
|
"out" : "0x",
|
||||||
|
"post" : {
|
||||||
|
"cd1722f3947def4cf144679da39c4c32bdc35681" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre" : {
|
||||||
|
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
|
||||||
|
"balance" : "1000000000000000000",
|
||||||
|
"code" : "0x33ff",
|
||||||
|
"nonce" : "0",
|
||||||
|
"storage" : {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -39,9 +39,9 @@ type VmTest struct {
|
|||||||
Pre map[string]Account
|
Pre map[string]Account
|
||||||
}
|
}
|
||||||
|
|
||||||
func RunVmTest(url string, t *testing.T) {
|
func RunVmTest(p string, t *testing.T) {
|
||||||
tests := make(map[string]VmTest)
|
tests := make(map[string]VmTest)
|
||||||
helper.CreateHttpTests(t, url, &tests)
|
helper.CreateFileTests(t, p, &tests)
|
||||||
|
|
||||||
for name, test := range tests {
|
for name, test := range tests {
|
||||||
state := ethstate.New(helper.NewTrie())
|
state := ethstate.New(helper.NewTrie())
|
||||||
@ -89,46 +89,46 @@ func RunVmTest(url string, t *testing.T) {
|
|||||||
// I've created a new function for each tests so it's easier to identify where the problem lies if any of them fail.
|
// I've created a new function for each tests so it's easier to identify where the problem lies if any of them fail.
|
||||||
func TestVMArithmetic(t *testing.T) {
|
func TestVMArithmetic(t *testing.T) {
|
||||||
//helper.Logger.SetLogLevel(5)
|
//helper.Logger.SetLogLevel(5)
|
||||||
const url = "https://raw.githubusercontent.com/ethereum/tests/develop/vmtests/vmArithmeticTest.json"
|
const fn = "files/vmtests/vmArithmeticTest.json"
|
||||||
RunVmTest(url, t)
|
RunVmTest(fn, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestVMSystemOperation(t *testing.T) {
|
func TestVMSystemOperation(t *testing.T) {
|
||||||
const url = "https://raw.githubusercontent.com/ethereum/tests/develop/vmtests/vmSystemOperationsTest.json"
|
const fn = "files/vmtests/vmSystemOperationsTest.json"
|
||||||
RunVmTest(url, t)
|
RunVmTest(fn, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestBitwiseLogicOperation(t *testing.T) {
|
func TestBitwiseLogicOperation(t *testing.T) {
|
||||||
const url = "https://raw.githubusercontent.com/ethereum/tests/develop/vmtests/vmBitwiseLogicOperationTest.json"
|
const fn = "files/vmtests/vmBitwiseLogicOperationTest.json"
|
||||||
RunVmTest(url, t)
|
RunVmTest(fn, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestBlockInfo(t *testing.T) {
|
func TestBlockInfo(t *testing.T) {
|
||||||
const url = "https://raw.githubusercontent.com/ethereum/tests/develop/vmtests/vmBlockInfoTest.json"
|
const fn = "files/vmtests/vmBlockInfoTest.json"
|
||||||
RunVmTest(url, t)
|
RunVmTest(fn, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEnvironmentalInfo(t *testing.T) {
|
func TestEnvironmentalInfo(t *testing.T) {
|
||||||
const url = "https://raw.githubusercontent.com/ethereum/tests/develop/vmtests/vmEnvironmentalInfoTest.json"
|
const fn = "files/vmtests/vmEnvironmentalInfoTest.json"
|
||||||
RunVmTest(url, t)
|
RunVmTest(fn, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFlowOperation(t *testing.T) {
|
func TestFlowOperation(t *testing.T) {
|
||||||
const url = "https://raw.githubusercontent.com/ethereum/tests/develop/vmtests/vmIOandFlowOperationsTest.json"
|
const fn = "files/vmtests/vmIOandFlowOperationsTest.json"
|
||||||
RunVmTest(url, t)
|
RunVmTest(fn, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPushDupSwap(t *testing.T) {
|
func TestPushDupSwap(t *testing.T) {
|
||||||
const url = "https://raw.githubusercontent.com/ethereum/tests/develop/vmtests/vmPushDupSwapTest.json"
|
const fn = "files/vmtests/vmPushDupSwapTest.json"
|
||||||
RunVmTest(url, t)
|
RunVmTest(fn, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestVMSha3(t *testing.T) {
|
func TestVMSha3(t *testing.T) {
|
||||||
const url = "https://raw.githubusercontent.com/ethereum/tests/develop/vmtests/vmSha3Test.json"
|
const fn = "files/vmtests/vmSha3Test.json"
|
||||||
RunVmTest(url, t)
|
RunVmTest(fn, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestVm(t *testing.T) {
|
func TestVm(t *testing.T) {
|
||||||
const url = "https://raw.githubusercontent.com/ethereum/tests/develop/vmtests/vmtests.json"
|
const fn = "files/vmtests/vmtests.json"
|
||||||
RunVmTest(url, t)
|
RunVmTest(fn, t)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user