diff --git a/Makefile b/Makefile index b979f5b861..8aec003f84 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ export LUA_PATH split-tests \ test test-all test-conformance test-rest-conformance test-all-conformance \ test-vm test-rest-vm test-all-vm test-bchain test-rest-bchain test-all-bchain \ - test-web3 \ + test-web3 test-all-web3 test-failing-web3 \ test-prove test-prove-benchmarks test-prove-functional test-prove-opcodes test-prove-erc20 test-prove-bihu test-prove-examples test-klab-prove \ test-parse test-failure \ test-interactive test-interactive-help test-interactive-run test-interactive-prove test-interactive-search test-interactive-firefly \ @@ -471,10 +471,13 @@ test-all-bchain: $(all_bchain_tests:=.run) test-rest-bchain: $(rest_bchain_tests:=.run) test-bchain: $(passing_bchain_tests:=.run) -web3_tests=$(wildcard tests/web3/*.in.json) \ - $(wildcard tests/web3/no-shutdown/*.in.json) +all_web3_tests = $(wildcard tests/web3/*.in.json) $(wildcard tests/web3/*/*.in.json) +failing_web3_tests = $(shell cat tests/failing.web3) +passing_web3_tests = $(filter-out $(failing_web3_tests), $(all_web3_tests)) -test-web3: $(web3_tests:.in.json=.run-web3) +test-all-web3: $(all_web3_tests:.in.json=.run-web3) +test-failing-web3: $(failing_web3_tests:.in.json=.run-web3) +test-web3: $(passing_web3_tests:.in.json=.run-web3) # Proof Tests diff --git a/tests/failing.web3 b/tests/failing.web3 new file mode 100644 index 0000000000..4a0e57a158 --- /dev/null +++ b/tests/failing.web3 @@ -0,0 +1,13 @@ +tests/web3/erc20/erc20capped.in.json +tests/web3/erc20/erc20capped-partial.in.json +tests/web3/erc20/erc20detailed.in.json +tests/web3/erc20/erc20detailed-partial.in.json +tests/web3/erc20/tokentimelock.in.json +tests/web3/erc20/tokentimelock-partial.in.json +tests/web3/eth_getBlockByNumber1Tx-2.in.json +tests/web3/eth_getBlockByNumberNoTx-2.in.json +tests/web3/eth_getTransactionReceipt.in.json +tests/web3/getBlock_multipleAccounts.in.json +tests/web3/getBlock_multipleTransactions.in.json +tests/web3/getBlock_singleAccount.in.json +tests/web3/getBlock_singleTransaction.in.json diff --git a/tests/web3/failing/eth_getBlockByNumber1Tx.expected.json b/tests/web3/eth_getBlockByNumber1Tx-2.expected.json similarity index 100% rename from tests/web3/failing/eth_getBlockByNumber1Tx.expected.json rename to tests/web3/eth_getBlockByNumber1Tx-2.expected.json diff --git a/tests/web3/failing/eth_getBlockByNumber1Tx.in.json b/tests/web3/eth_getBlockByNumber1Tx-2.in.json similarity index 100% rename from tests/web3/failing/eth_getBlockByNumber1Tx.in.json rename to tests/web3/eth_getBlockByNumber1Tx-2.in.json diff --git a/tests/web3/failing/eth_getBlockByNumberNoTx.expected.json b/tests/web3/eth_getBlockByNumberNoTx-2.expected.json similarity index 100% rename from tests/web3/failing/eth_getBlockByNumberNoTx.expected.json rename to tests/web3/eth_getBlockByNumberNoTx-2.expected.json diff --git a/tests/web3/failing/eth_getBlockByNumberNoTx.in.json b/tests/web3/eth_getBlockByNumberNoTx-2.in.json similarity index 100% rename from tests/web3/failing/eth_getBlockByNumberNoTx.in.json rename to tests/web3/eth_getBlockByNumberNoTx-2.in.json diff --git a/tests/web3/eth_getTransactionReceipt.expected.json b/tests/web3/eth_getTransactionReceipt.expected.json new file mode 100644 index 0000000000..6f0b290386 --- /dev/null +++ b/tests/web3/eth_getTransactionReceipt.expected.json @@ -0,0 +1,33 @@ +[ + { + "jsonrpc": "2.0", + "id": 1, + "result": true + }, + { + "jsonrpc": "2.0", + "id": 2, + "result": "0x48b3bce222588aff4329c7c7aebaa39ffb66045254c1ca16b9b1a5482463682b" + }, + { + "jsonrpc": "2.0", + "id": 3, + "result": { + "transactionHash": "0x48b3bce222588aff4329c7c7aebaa39ffb66045254c1ca16b9b1a5482463682b", + "transactionIndex": "0x0", + "blockHash": "0xef122182b5260879e82a5495c5dbe57ebcf6f8b2cb8b6cf50dbfc96a1d39b776", + "blockNumber": "0x1", + "from": "0x79a59cf0083efdf696befda81655104787f938d0", + "to": null, + "gasUsed": "0xeaca", + "cumulativeGasUsed": "0xeaca", + "contractAddress": "0xe7f1941dc335305fc2799b72417243dc3f375179", + "logs": [], + "status": "0x1", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "v": "0x1b", + "r": "0xb6b98a3170b0ad5db2792d2314aa3435b8bdbb26c35d495a2aab893113904a41", + "s": "0x5bade5f3b478a7986d8933911866c324a1e5fb7839207c6cc631dead3f88063b" + } + } +] diff --git a/tests/web3/failing/eth_getTransactionReceipt.in.json b/tests/web3/eth_getTransactionReceipt.in.json similarity index 100% rename from tests/web3/failing/eth_getTransactionReceipt.in.json rename to tests/web3/eth_getTransactionReceipt.in.json diff --git a/tests/web3/failing/eth_getTransactionReceipt.expected.json b/tests/web3/failing/eth_getTransactionReceipt.expected.json deleted file mode 100644 index 70fc419d11..0000000000 --- a/tests/web3/failing/eth_getTransactionReceipt.expected.json +++ /dev/null @@ -1 +0,0 @@ -[{"jsonrpc":"2.0","id":1,"result":true},{"jsonrpc":"2.0","id":2,"result":"0x48b3bce222588aff4329c7c7aebaa39ffb66045254c1ca16b9b1a5482463682b"},{"jsonrpc":"2.0","id":3,"result":{"transactionHash":"0x48b3bce222588aff4329c7c7aebaa39ffb66045254c1ca16b9b1a5482463682b","transactionIndex":"0x0","blockHash":"0xef122182b5260879e82a5495c5dbe57ebcf6f8b2cb8b6cf50dbfc96a1d39b776","blockNumber":"0x1","from":"0x79a59cf0083efdf696befda81655104787f938d0","to":null,"gasUsed":"0xeaca","cumulativeGasUsed":"0xeaca","contractAddress":"0xe7f1941dc335305fc2799b72417243dc3f375179","logs":[],"status":"0x1","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","v":"0x1b","r":"0xb6b98a3170b0ad5db2792d2314aa3435b8bdbb26c35d495a2aab893113904a41","s":"0x5bade5f3b478a7986d8933911866c324a1e5fb7839207c6cc631dead3f88063b"}}] \ No newline at end of file diff --git a/tests/web3/failing/getBlock_multipleAccounts.expected.json b/tests/web3/failing/getBlock_multipleAccounts.expected.json deleted file mode 100644 index b50e6f58d0..0000000000 --- a/tests/web3/failing/getBlock_multipleAccounts.expected.json +++ /dev/null @@ -1 +0,0 @@ -[{"jsonrpc":"2.0","id":1,"result":true},{"jsonrpc":"2.0","id":2,"result":true},{"jsonrpc":"2.0","id":3,"result":{"number":"0x0","hash":"0xa16e3b7ec1959f20a3fec6fb9c1b891fb3b5b95e4d1c7d91d77531b4a7d53be1","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","stateRoot":"0x8d914a687f983939880cfccb33737d490fbdb01256b1e053f93c93aa0463cf4c","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","miner":"0x0000000000000000000000000000000000000000","difficulty":"0x0","totalDifficulty":"0x0","extraData":"0x","size":"0x3e8","gasLimit":"0x6691b7","gasUsed":"0x0","timestamp":"0x0","transactions":[],"uncles":[]}}] diff --git a/tests/web3/failing/getBlock_multipleTransactions.expected.json b/tests/web3/failing/getBlock_multipleTransactions.expected.json deleted file mode 100644 index 8f3e00c496..0000000000 --- a/tests/web3/failing/getBlock_multipleTransactions.expected.json +++ /dev/null @@ -1,4 +0,0 @@ -[{"jsonrpc":"2.0","id":1,"result":true},{"jsonrpc":"2.0","id":2,"result":true},{"jsonrpc":"2.0","id":3,"result":"0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7"},{"jsonrpc":"2.0","id":4,"result":"0x2c5e04b53a8a4ad2c02d4541f23459a0381c60a73a96cdfd07a0d2c343911b34"},{"jsonrpc":"2.0","id":5,"result":{"number":"0x1","hash":"0x49bfc1db5249c2cae6f4939ff48f3729d210c7223a5306c7c41de12a4e0bdfd9","parentHash":"0xa16e3b7ec1959f20a3fec6fb9c1b891fb3b5b95e4d1c7d91d77531b4a7d53be1","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x5ce4c8c27ecb3784bfcd8e128b01c3e6c90c0264d579d9f7232f53421c6e3109","stateRoot":"0x45fb450be0f9542426acf1a81c513ae9d1a2226d4b3ab7afe88f566ab2dcdd6b","receiptsRoot":"0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2","miner":"0x0000000000000000000000000000000000000000","difficulty":"0x0","totalDifficulty":"0x0","extraData":"0x","size":"0x3e8","gasLimit":"0x6691b7","gasUsed":"0x5208","timestamp":"0x0","transactions":["0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7"],"uncles":[]}},{"jsonrpc":"2.0","id":6,"result":{"number":"0x2","hash":"0x3b3a770d25ae5cdc930895a48a2c9b9b335cb2423fea3557b1128833ac087bb2","parentHash":"0x49bfc1db5249c2cae6f4939ff48f3729d210c7223a5306c7c41de12a4e0bdfd9","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x44feb4e2e7d6a976b56b7d8c6a180e2585ebd67c63d526c9b77c6c5795af3cb2","stateRoot":"0x3f310a0070d7ff288bb2345cf86fbaa3538cfec53a12a273e58bd842779c8714","receiptsRoot":"0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2","miner":"0x0000000000000000000000000000000000000000","difficulty":"0x0","totalDifficulty":"0x0","extraData":"0x","size":"0x3e8","gasLimit":"0x6691b7","gasUsed":"0x5208","timestamp":"0x0","transactions":["0x2c5e04b53a8a4ad2c02d4541f23459a0381c60a73a96cdfd07a0d2c343911b34"],"uncles":[]}}] - - - diff --git a/tests/web3/failing/getBlock_singleAccount.expected.json b/tests/web3/failing/getBlock_singleAccount.expected.json deleted file mode 100644 index 52ca1a0b9e..0000000000 --- a/tests/web3/failing/getBlock_singleAccount.expected.json +++ /dev/null @@ -1 +0,0 @@ -[{"jsonrpc":"2.0","id":1,"result":true},{"jsonrpc":"2.0","id":2,"result":{"number":"0x0","hash":"0xe998e5aaa06cabb50fec8e836a6f76d0b32cf0f1ba7909f2a03fed2986323061","parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","stateRoot":"0x7d2e1366af81a3b4b8d0723f64918039971d20e8de73556428b0fbc63aa44d7e","receiptsRoot":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","miner":"0x0000000000000000000000000000000000000000","difficulty":"0x0","totalDifficulty":"0x0","extraData":"0x","size":"0x3e8","gasLimit":"0x6691b7","gasUsed":"0x0","timestamp":"0x0","transactions":[],"uncles":[]}}] diff --git a/tests/web3/failing/getBlock_singleTransaction.expected.json b/tests/web3/failing/getBlock_singleTransaction.expected.json deleted file mode 100644 index c5cffc308b..0000000000 --- a/tests/web3/failing/getBlock_singleTransaction.expected.json +++ /dev/null @@ -1 +0,0 @@ -[{"jsonrpc":"2.0","id":1,"result":true},{"jsonrpc":"2.0","id":2,"result":true},{"jsonrpc":"2.0","id":3,"result":"0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7"},{"jsonrpc":"2.0","id":2,"result":{"number":"0x1","hash":"0x49bfc1db5249c2cae6f4939ff48f3729d210c7223a5306c7c41de12a4e0bdfd9","parentHash":"0xa16e3b7ec1959f20a3fec6fb9c1b891fb3b5b95e4d1c7d91d77531b4a7d53be1","mixHash":"0x0000000000000000000000000000000000000000000000000000000000000000","nonce":"0x0000000000000000","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","transactionsRoot":"0x5ce4c8c27ecb3784bfcd8e128b01c3e6c90c0264d579d9f7232f53421c6e3109","stateRoot":"0x45fb450be0f9542426acf1a81c513ae9d1a2226d4b3ab7afe88f566ab2dcdd6b","receiptsRoot":"0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2","miner":"0x0000000000000000000000000000000000000000","difficulty":"0x0","totalDifficulty":"0x0","extraData":"0x","size":"0x3e8","gasLimit":"0x6691b7","gasUsed":"0x5208","timestamp":"0x0","transactions":["0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7"],"uncles":[]}}] diff --git a/tests/web3/getBlock_multipleAccounts.expected.json b/tests/web3/getBlock_multipleAccounts.expected.json new file mode 100644 index 0000000000..020867d3aa --- /dev/null +++ b/tests/web3/getBlock_multipleAccounts.expected.json @@ -0,0 +1,38 @@ +[ + { + "jsonrpc": "2.0", + "id": 1, + "result": true + }, + { + "jsonrpc": "2.0", + "id": 2, + "result": true + }, + { + "jsonrpc": "2.0", + "id": 3, + "result": { + "number": "0x0", + "hash": "0xa16e3b7ec1959f20a3fec6fb9c1b891fb3b5b95e4d1c7d91d77531b4a7d53be1", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0x8d914a687f983939880cfccb33737d490fbdb01256b1e053f93c93aa0463cf4c", + "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "miner": "0x0000000000000000000000000000000000000000", + "difficulty": "0x0", + "totalDifficulty": "0x0", + "extraData": "0x", + "size": "0x3e8", + "gasLimit": "0x6691b7", + "gasUsed": "0x0", + "timestamp": "0x0", + "transactions": [], + "uncles": [] + } + } +] diff --git a/tests/web3/failing/getBlock_multipleAccounts.in.json b/tests/web3/getBlock_multipleAccounts.in.json similarity index 100% rename from tests/web3/failing/getBlock_multipleAccounts.in.json rename to tests/web3/getBlock_multipleAccounts.in.json diff --git a/tests/web3/getBlock_multipleTransactions.expected.json b/tests/web3/getBlock_multipleTransactions.expected.json new file mode 100644 index 0000000000..e922f30a23 --- /dev/null +++ b/tests/web3/getBlock_multipleTransactions.expected.json @@ -0,0 +1,78 @@ +[ + { + "jsonrpc": "2.0", + "id": 1, + "result": true + }, + { + "jsonrpc": "2.0", + "id": 2, + "result": true + }, + { + "jsonrpc": "2.0", + "id": 3, + "result": "0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7" + }, + { + "jsonrpc": "2.0", + "id": 4, + "result": "0x2c5e04b53a8a4ad2c02d4541f23459a0381c60a73a96cdfd07a0d2c343911b34" + }, + { + "jsonrpc": "2.0", + "id": 5, + "result": { + "number": "0x1", + "hash": "0x49bfc1db5249c2cae6f4939ff48f3729d210c7223a5306c7c41de12a4e0bdfd9", + "parentHash": "0xa16e3b7ec1959f20a3fec6fb9c1b891fb3b5b95e4d1c7d91d77531b4a7d53be1", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "transactionsRoot": "0x5ce4c8c27ecb3784bfcd8e128b01c3e6c90c0264d579d9f7232f53421c6e3109", + "stateRoot": "0x45fb450be0f9542426acf1a81c513ae9d1a2226d4b3ab7afe88f566ab2dcdd6b", + "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", + "miner": "0x0000000000000000000000000000000000000000", + "difficulty": "0x0", + "totalDifficulty": "0x0", + "extraData": "0x", + "size": "0x3e8", + "gasLimit": "0x6691b7", + "gasUsed": "0x5208", + "timestamp": "0x0", + "transactions": [ + "0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7" + ], + "uncles": [] + } + }, + { + "jsonrpc": "2.0", + "id": 6, + "result": { + "number": "0x2", + "hash": "0x3b3a770d25ae5cdc930895a48a2c9b9b335cb2423fea3557b1128833ac087bb2", + "parentHash": "0x49bfc1db5249c2cae6f4939ff48f3729d210c7223a5306c7c41de12a4e0bdfd9", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "transactionsRoot": "0x44feb4e2e7d6a976b56b7d8c6a180e2585ebd67c63d526c9b77c6c5795af3cb2", + "stateRoot": "0x3f310a0070d7ff288bb2345cf86fbaa3538cfec53a12a273e58bd842779c8714", + "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", + "miner": "0x0000000000000000000000000000000000000000", + "difficulty": "0x0", + "totalDifficulty": "0x0", + "extraData": "0x", + "size": "0x3e8", + "gasLimit": "0x6691b7", + "gasUsed": "0x5208", + "timestamp": "0x0", + "transactions": [ + "0x2c5e04b53a8a4ad2c02d4541f23459a0381c60a73a96cdfd07a0d2c343911b34" + ], + "uncles": [] + } + } +] diff --git a/tests/web3/failing/getBlock_multipleTransactions.in.json b/tests/web3/getBlock_multipleTransactions.in.json similarity index 100% rename from tests/web3/failing/getBlock_multipleTransactions.in.json rename to tests/web3/getBlock_multipleTransactions.in.json diff --git a/tests/web3/getBlock_singleAccount.expected.json b/tests/web3/getBlock_singleAccount.expected.json new file mode 100644 index 0000000000..54d7b7927a --- /dev/null +++ b/tests/web3/getBlock_singleAccount.expected.json @@ -0,0 +1,33 @@ +[ + { + "jsonrpc": "2.0", + "id": 1, + "result": true + }, + { + "jsonrpc": "2.0", + "id": 2, + "result": { + "number": "0x0", + "hash": "0xe998e5aaa06cabb50fec8e836a6f76d0b32cf0f1ba7909f2a03fed2986323061", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0x7d2e1366af81a3b4b8d0723f64918039971d20e8de73556428b0fbc63aa44d7e", + "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "miner": "0x0000000000000000000000000000000000000000", + "difficulty": "0x0", + "totalDifficulty": "0x0", + "extraData": "0x", + "size": "0x3e8", + "gasLimit": "0x6691b7", + "gasUsed": "0x0", + "timestamp": "0x0", + "transactions": [], + "uncles": [] + } + } +] diff --git a/tests/web3/failing/getBlock_singleAccount.in.json b/tests/web3/getBlock_singleAccount.in.json similarity index 100% rename from tests/web3/failing/getBlock_singleAccount.in.json rename to tests/web3/getBlock_singleAccount.in.json diff --git a/tests/web3/getBlock_singleTransaction.expected.json b/tests/web3/getBlock_singleTransaction.expected.json new file mode 100644 index 0000000000..2aa1a50b0c --- /dev/null +++ b/tests/web3/getBlock_singleTransaction.expected.json @@ -0,0 +1,45 @@ +[ + { + "jsonrpc": "2.0", + "id": 1, + "result": true + }, + { + "jsonrpc": "2.0", + "id": 2, + "result": true + }, + { + "jsonrpc": "2.0", + "id": 3, + "result": "0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7" + }, + { + "jsonrpc": "2.0", + "id": 2, + "result": { + "number": "0x1", + "hash": "0x49bfc1db5249c2cae6f4939ff48f3729d210c7223a5306c7c41de12a4e0bdfd9", + "parentHash": "0xa16e3b7ec1959f20a3fec6fb9c1b891fb3b5b95e4d1c7d91d77531b4a7d53be1", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x0000000000000000", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "transactionsRoot": "0x5ce4c8c27ecb3784bfcd8e128b01c3e6c90c0264d579d9f7232f53421c6e3109", + "stateRoot": "0x45fb450be0f9542426acf1a81c513ae9d1a2226d4b3ab7afe88f566ab2dcdd6b", + "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2", + "miner": "0x0000000000000000000000000000000000000000", + "difficulty": "0x0", + "totalDifficulty": "0x0", + "extraData": "0x", + "size": "0x3e8", + "gasLimit": "0x6691b7", + "gasUsed": "0x5208", + "timestamp": "0x0", + "transactions": [ + "0xf4156d1e150a8d92070ac848fe10a6a994e7eb94184286e735e7437a011c63d7" + ], + "uncles": [] + } + } +] diff --git a/tests/web3/failing/getBlock_singleTransaction.in.json b/tests/web3/getBlock_singleTransaction.in.json similarity index 100% rename from tests/web3/failing/getBlock_singleTransaction.in.json rename to tests/web3/getBlock_singleTransaction.in.json