From a8c8d5ece587906f355b2ea28f0f6ce1bf9e10dd Mon Sep 17 00:00:00 2001 From: subtly Date: Sun, 5 Apr 2015 15:49:53 +0200 Subject: [PATCH 01/45] Improve addNode functionality when addNode is called during network startup. --- peer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peer.cpp b/peer.cpp index 904de0e9d..2aeb99469 100644 --- a/peer.cpp +++ b/peer.cpp @@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE(save_nodes) h->setIdealPeerCount(10); // starting host is required so listenport is available h->start(); - while (!h->isStarted()) + while (!h->haveNetwork()) this_thread::sleep_for(chrono::milliseconds(2)); hosts.push_back(h); } From 3e4a9de0b0553230822d439ffd79022fb4839b94 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Tue, 7 Apr 2015 04:50:10 +0200 Subject: [PATCH 02/45] Squashed 'libjsqrc/ethereumjs/' changes from eceeda7..73b9ed2 73b9ed2 rename to web3 c80ede5 fixed spelling in package description 67f0a75 version 0.2.4 e2990ae web3.eth.getBlockTransactionCount accepts pending/latest/earliest params 94429ff version 0.2.3 f9a5206 more tests for web3.eth.getBalance 31e046d Merge branch 'master' into develop 5e15037 fixed formatting address b7a03cd version 0.2.2 2536888 let travis check if npm package is not broken 92aba81 merge master, gulp e6a76ff Merge branch 'master' into develop 57d9f1f removed deprecated && unused lines from contract.js 5885bfe test for #128 e53f316 tests for transaction && call 31220d5 removed deprecated code in contract.js b837667 unified asBlock from filter.js with blockNumber formatter 202a8cd #140 badge 608d211 blockNumber can be earliest f0216fb fixed #149 e213551 tests for #144 21791f2 version 0.2.1 2262276 defaultBlockNumber accepts latest && pending e01bb23 fixed #148 && fixed polling test 8c39acc merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop 534e96d Merge branch 'master' of https://github.com/ethereum/ethereum.js 2f45df8 fix && tests for #147 e750fd9 fixed #147 e0d83d0 removed unecessary callformatter 9fc5575 version 0.2.0 2747f4c Merge pull request #137 from ethereum/sandbox ed2b62d add whisper, network and ethereum version aa9fc92 add whisper, network and ethereum version f4e5a99 default log formatter, improved contract test e9b5da4 updated package.js name to web3 8caf64a update package.json 07bcdb4 improved tests for contract.js, fixed few minor issues 1986c7f cleaned up web3.js 82b18c1 refactored filter.js 2133d27 filter changes in progress 0dbd68c Merge branch 'develop' into sandbox 17164be default toBlock && fromBlock is not null e928e14 Merge branch 'develop' into sandbox 1a84015 fixed events topics 0beb01f test for creating signatures a63d604 removed unused function 9d5b602 test names a1ec149 renamed few more tests cbf8ea1 test naming convention 04f0aa5 fixed filer.js complexity 722a5bc fixed eth.getTransaction.js location c065f17 Merge branch 'develop' into sandbox b78dffa small fix in filter tests 91baec2 polling tests 4f5c5fb first try to test polling f2c8a14 removed duplicate code 9f073d9 applied fixes from cpp-ethereum c01abfc add db tests b247c49 add sha3 test afd7e7b add shh tests e7304b5 add storage tests f32b8ad add runTest module to new tests c52250e add block uncle and block counts c1f5ab2 test.method.js in helpers 7df9099 moved test.utils to helpers a4e3645 Merge branch 'develop' into sandbox b3b95c5 add getBlock test abe064f add Property and passing through of RPC erro texts 0b84376 fix for otto 36fe79f another fix for otto be04c47 fixes for go otto env c7e5d0a light browser bundle 4b37137 light browser bundle without bignumber.js f13a727 add accounts test b915ceb add defaultBlock back b074a5e add check for providor async function ae76428 Merge branch 'master' into develop a34321d removed double FakeHTTPProvidor 7fb4405 add missing formatters, fixed tests 7511e4c fake providers moved to helpers directory b16982b fix for polling 126b40c fixed registering coverage on providers 2924e00 fix for toHex transforming boolean b6b809c setting up formatters for eth 99ea9cd fixed for defaultBlock formatter 33a3fc7 generic integration tests 4d1cf0b inputFormatter is an aray of functions 6b07920 add uninstall filter back 89b1ca6 first integration tests a4cf661 tests for method.js 7519fab method.js 9423b72 Merge pull request #139 from gitter-badger/gitter-badge 24a03e0 Added Gitter badge 0898669 changes in input formatters 748cda2 requestmanager tests 476023e requestmanager refactored e3faebe jsonrpc is an object cbab0ae common changes in requestmanager d408fb0 comments in requestmanager 5c1e85f requestmanager refactor in progress f604670 tests for qtsyncprovider.js 288caf3 node-sandbox, tests for httpprovider, request manager refactor in progress 8c36a10 rename getData to getCode de5de9e Merge branch 'develop' of https://github.com/ethereum/ethereum.js into develop 5cdea25 Merge branch 'getCode' of https://github.com/jorisbontje/ethereum.js into getCode 3550f91 Merge pull request #122 from frozeman/apiOverhaul fb99d10 fixed meteor package 99795e3 expose bignumber.js db7092b Merge pull request #117 from ethereum/bundle_name 5bee7be changed bundle name web3 -> ethereum.js 7ca3b40 gulp 517eff9 Merge pull request #120 from dchambers/make-browserify-compatibile b032429 rename getData to getCode 768d4bf Make changes to 'gulpfile.js' reccomended by @debris. 0267e85 Use browserify's 'browser' field instead of 'envify' & 'unreachable-branch-transform to', plus always include 'bignumber.js' since it is needed in the browser. cb7c209 removed unused property 12aed56 fixed #111 git-subtree-dir: libjsqrc/ethereumjs git-subtree-split: 73b9ed29c09531817df311c2d050dec6667197e7 --- abi.inputParser.js | 2 +- abi.outputParser.js | 2 +- contract.js | 229 +++++++++++++++++++++++ event.inputParser.js | 26 +-- event.outputParser.js | 6 +- filter.methods.js | 24 --- formatters.inputDefaultBlockFormatter.js | 24 +++ formatters.inputPostFormatter.js | 3 +- formatters.inputTransactionFormatter.js | 11 +- formatters.outputTransactionFormatter.js | 8 +- helpers/FakeHttpProvider.js | 68 +++++++ helpers/FakeQtNavigator.js | 11 ++ helpers/FakeXMLHttpRequest.js | 31 +++ helpers/test.method.js | 68 +++++++ test.utils.js => helpers/test.utils.js | 9 +- httpprovider.js | 33 ++++ jsonrpc.id.js | 23 +++ jsonrpc.isValidResponse.js | 1 + jsonrpc.toBatchPayload.js | 1 + jsonrpc.toPayload.js | 4 +- method.attachToObject.js | 44 +++++ method.extractCallback.js | 52 +++++ method.formatInput.js | 41 ++++ method.formatOutput.js | 43 +++++ method.getCall.js | 46 +++++ method.validateArgs.js | 47 +++++ mocha.opts | 3 +- net.methods.js | 10 - node/app.js | 5 + node/package.json | 14 ++ polling.js | 69 +++++++ qtsyncprovider.js | 22 +++ requestmanager.js | 44 +++++ shh.filter.js | 45 +++++ shh.hasIdentity.js | 16 ++ signature.js | 48 +++++ utils.extractDisplayName.js | 2 +- utils.extractTypeName.js | 2 +- utils.filters.js | 2 +- utils.fromDecimal.js | 2 +- utils.fromWei.js | 2 +- utils.isAddress.js | 4 +- utils.isBigNumber.js | 2 +- utils.isFunction.js | 2 +- utils.isJson.js | 26 +++ utils.isString.js | 2 +- utils.toBigNumber.js | 2 +- utils.toDecimal.js | 2 +- utils.toHex.js | 8 +- utils.toWei.js | 2 +- web3.db.getHex.js | 14 ++ web3.db.getString.js | 16 ++ db.methods.js => web3.db.methods.js | 10 +- web3.db.putHex.js | 16 ++ web3.db.putString.js | 16 ++ web3.eth.accounts.js | 38 ++++ web3.eth.blockNumber.js | 38 ++++ web3.eth.coinbase.js | 38 ++++ eth.contract.js => web3.eth.contract.js | 2 +- web3.eth.defaultBlock.js | 12 ++ web3.eth.filter.js | 55 ++++++ web3.eth.filter.methods.js | 23 +++ web3.eth.getBalance.js | 64 +++++++ web3.eth.getBlock.js | 139 ++++++++++++++ web3.eth.getBlockTransactionCount.js | 29 +++ web3.eth.getBlockUncleCount.js | 27 +++ web3.eth.getCode.js | 23 +++ web3.eth.getCompilers.js | 23 +++ web3.eth.getStorageAt.js | 35 ++++ web3.eth.getTransaction.js | 46 +++++ web3.eth.getTransactionFromBlock.js | 52 +++++ web3.eth.getUncle.js | 139 ++++++++++++++ eth.methods.js => web3.eth.methods.js | 37 +--- web3.eth.mining.js | 38 ++++ web3.methods.js | 36 ++-- web3.net.listening.js | 38 ++++ web3.net.methods.js | 11 ++ web3.net.peerCount.js | 38 ++++ web3.sha3.js | 16 ++ shh.methods.js => web3.shh.methods.js | 9 +- 80 files changed, 2127 insertions(+), 144 deletions(-) create mode 100644 contract.js delete mode 100644 filter.methods.js create mode 100644 formatters.inputDefaultBlockFormatter.js create mode 100644 helpers/FakeHttpProvider.js create mode 100644 helpers/FakeQtNavigator.js create mode 100644 helpers/FakeXMLHttpRequest.js create mode 100644 helpers/test.method.js rename test.utils.js => helpers/test.utils.js (67%) create mode 100644 httpprovider.js create mode 100644 jsonrpc.id.js create mode 100644 method.attachToObject.js create mode 100644 method.extractCallback.js create mode 100644 method.formatInput.js create mode 100644 method.formatOutput.js create mode 100644 method.getCall.js create mode 100644 method.validateArgs.js delete mode 100644 net.methods.js create mode 100644 node/app.js create mode 100644 node/package.json create mode 100644 polling.js create mode 100644 qtsyncprovider.js create mode 100644 requestmanager.js create mode 100644 shh.filter.js create mode 100644 shh.hasIdentity.js create mode 100644 signature.js create mode 100644 utils.isJson.js create mode 100644 web3.db.getHex.js create mode 100644 web3.db.getString.js rename db.methods.js => web3.db.methods.js (57%) create mode 100644 web3.db.putHex.js create mode 100644 web3.db.putString.js create mode 100644 web3.eth.accounts.js create mode 100644 web3.eth.blockNumber.js create mode 100644 web3.eth.coinbase.js rename eth.contract.js => web3.eth.contract.js (99%) create mode 100644 web3.eth.defaultBlock.js create mode 100644 web3.eth.filter.js create mode 100644 web3.eth.filter.methods.js create mode 100644 web3.eth.getBalance.js create mode 100644 web3.eth.getBlock.js create mode 100644 web3.eth.getBlockTransactionCount.js create mode 100644 web3.eth.getBlockUncleCount.js create mode 100644 web3.eth.getCode.js create mode 100644 web3.eth.getCompilers.js create mode 100644 web3.eth.getStorageAt.js create mode 100644 web3.eth.getTransaction.js create mode 100644 web3.eth.getTransactionFromBlock.js create mode 100644 web3.eth.getUncle.js rename eth.methods.js => web3.eth.methods.js (54%) create mode 100644 web3.eth.mining.js create mode 100644 web3.net.listening.js create mode 100644 web3.net.methods.js create mode 100644 web3.net.peerCount.js create mode 100644 web3.sha3.js rename shh.methods.js => web3.shh.methods.js (65%) diff --git a/abi.inputParser.js b/abi.inputParser.js index 1d3a869e3..a488bb2e5 100644 --- a/abi.inputParser.js +++ b/abi.inputParser.js @@ -19,7 +19,7 @@ var description = [{ ] }]; -describe('abi', function() { +describe('lib/solidity/abi', function() { describe('inputParser', function() { it('should parse input uint', function() { diff --git a/abi.outputParser.js b/abi.outputParser.js index 955c0d5f1..a57b84a83 100644 --- a/abi.outputParser.js +++ b/abi.outputParser.js @@ -19,7 +19,7 @@ var description = [{ ] }]; -describe('abi', function() { +describe('lib/solidity/abi', function() { describe('outputParser', function() { it('should parse output fixed bytes type', function() { diff --git a/contract.js b/contract.js new file mode 100644 index 000000000..fec9fc314 --- /dev/null +++ b/contract.js @@ -0,0 +1,229 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var utils = require('../lib/utils/utils'); + +var desc = [{ + "name": "balance(address)", + "type": "function", + "inputs": [{ + "name": "who", + "type": "address" + }], + "constant": true, + "outputs": [{ + "name": "value", + "type": "uint256" + }] +}, { + "name": "send(address,uint256)", + "type": "function", + "inputs": [{ + "name": "to", + "type": "address" + }, { + "name": "value", + "type": "uint256" + }], + "outputs": [] +}, { + "name":"Changed", + "type":"event", + "inputs": [ + {"name":"from","type":"address","indexed":true}, + {"name":"amount","type":"uint256","indexed":true}, + {"name":"t1","type":"uint256","indexed":false}, + {"name":"t2","type":"uint256","indexed":false} + ], +}]; + +var address = '0x1234567890123456789012345678901234567890'; + +describe('web3.eth.contract', function () { + describe('event', function () { + it('should create event filter', function (done) { + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); // reset different polls + var sha3 = '0x5131231231231231231231'; + provider.injectResult(sha3); + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'web3_sha3'); + assert.equal(payload.params[0], web3.fromAscii('Changed(address,uint256,uint256,uint256)')); + } else if (step === 1) { + step = 2; + provider.injectResult(3); + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_newFilter'); + assert.deepEqual(payload.params[0], { + topics: [ + sha3, + '0x1234567890123456789012345678901234567890' + ], + address: '0x1234567890123456789012345678901234567890' + }); + } else if (step === 2 && utils.isArray(payload)) { + provider.injectBatchResults([[{ + address: address, + topics: [ + sha3, + '0x0000000000000000000000001234567890123456789012345678901234567890', + '0x0000000000000000000000000000000000000000000000000000000000000001' + ], + number: 2, + data: '0x0000000000000000000000000000000000000000000000000000000000000001' + + '0000000000000000000000000000000000000000000000000000000000000008' + }]]); + var r = payload.filter(function (p) { + return p.jsonrpc === '2.0' && p.method === 'eth_getFilterChanges' && p.params[0] === 3; + }); + assert.equal(r.length > 0, true); + } + }); + + var Contract = web3.eth.contract(desc); + var contract = new Contract(address); + + contract.Changed({from: address}).watch(function(err, result) { + assert.equal(result.args.from, address); + assert.equal(result.args.amount, 1); + assert.equal(result.args.t1, 1); + assert.equal(result.args.t2, 8); + done(); + }); + }); + + it('should call constant function', function () { + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + var sha3 = '0x5131231231231231231231'; + var address = '0x1234567890123456789012345678901234567890'; + provider.injectResult(sha3); + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'web3_sha3'); + assert.equal(payload.params[0], web3.fromAscii('balance(address)')); + } else if (step === 1) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: sha3.slice(0, 10) + '0000000000000000000000001234567890123456789012345678901234567890', + to: address + }, 'latest']); + } + }); + + var Contract = web3.eth.contract(desc); + var contract = new Contract(address); + + contract.balance(address); + }); + + it('should sendTransaction to contract function', function () { + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + var sha3 = '0x5131231231231231231231'; + var address = '0x1234567890123456789012345678901234567890'; + provider.injectResult(sha3); + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'web3_sha3'); + assert.equal(payload.params[0], web3.fromAscii('send(address,uint256)')); + } else if (step === 1) { + assert.equal(payload.method, 'eth_sendTransaction'); + assert.deepEqual(payload.params, [{ + data: sha3.slice(0, 10) + + '0000000000000000000000001234567890123456789012345678901234567890' + + '0000000000000000000000000000000000000000000000000000000000000011' , + to: address + }]); + } + }); + + var Contract = web3.eth.contract(desc); + var contract = new Contract(address); + + contract.send(address, 17); + }); + + it('should make a call with optional params', function () { + + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + var sha3 = '0x5131231231231231231231'; + var address = '0x1234567890123456789012345678901234567890'; + provider.injectResult(sha3); + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'web3_sha3'); + assert.equal(payload.params[0], web3.fromAscii('balance(address)')); + } else if (step === 1) { + assert.equal(payload.method, 'eth_call'); + assert.deepEqual(payload.params, [{ + data: sha3.slice(0, 10) + '0000000000000000000000001234567890123456789012345678901234567890', + to: address, + from: address, + gas: '0xc350' + }, 'latest']); + } + }); + + var Contract = web3.eth.contract(desc); + var contract = new Contract(address); + + contract.call({from: address, gas: 50000}).balance(address); + + }); + + it('should sendTransaction with optional params', function () { + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + var sha3 = '0x5131231231231231231231'; + var address = '0x1234567890123456789012345678901234567890'; + provider.injectResult(sha3); + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'web3_sha3'); + assert.equal(payload.params[0], web3.fromAscii('send(address,uint256)')); + } else if (step === 1) { + assert.equal(payload.method, 'eth_sendTransaction'); + assert.deepEqual(payload.params, [{ + data: sha3.slice(0, 10) + + '0000000000000000000000001234567890123456789012345678901234567890' + + '0000000000000000000000000000000000000000000000000000000000000011' , + to: address, + from: address, + gas: '0xc350', + gasPrice: '0xbb8', + value: '0x2710' + }]); + } + }); + + var Contract = web3.eth.contract(desc); + var contract = new Contract(address); + + contract.sendTransaction({from: address, gas: 50000, gasPrice: 3000, value: 10000}).send(address, 17); + }); + }); +}); diff --git a/event.inputParser.js b/event.inputParser.js index a2ce27112..15e0b6d2a 100644 --- a/event.inputParser.js +++ b/event.inputParser.js @@ -2,7 +2,7 @@ var assert = require('assert'); var event = require('../lib/web3/event.js'); var f = require('../lib/solidity/formatters.js'); -describe('event', function () { +describe('lib/web3/event', function () { describe('inputParser', function () { it('should create basic filter input object', function () { @@ -33,8 +33,6 @@ describe('event', function () { var options = { fromBlock: 1, toBlock: 2, - offset: 3, - limit: 4 }; var e = { name: 'Event', @@ -51,8 +49,6 @@ describe('event', function () { assert.equal(result.topics[0], signature); assert.equal(result.fromBlock, options.fromBlock); assert.equal(result.toBlock, options.toBlock); - assert.equal(result.offset, options.offset); - assert.equal(result.limit, options.limit); }); @@ -63,9 +59,7 @@ describe('event', function () { var signature = '0x987654'; var options = { fromBlock: 1, - toBlock: 2, - offset: 3, - limit: 4 + toBlock: 2 }; var e = { name: 'Event', @@ -80,11 +74,9 @@ describe('event', function () { assert.equal(result.address, address); assert.equal(result.topics.length, 2); assert.equal(result.topics[0], signature); - assert.equal(result.topics[1], f.formatInputInt(4)); + assert.equal(result.topics[1], '0x' + f.formatInputInt(4)); assert.equal(result.fromBlock, options.fromBlock); assert.equal(result.toBlock, options.toBlock); - assert.equal(result.offset, options.offset); - assert.equal(result.limit, options.limit); }); @@ -94,10 +86,8 @@ describe('event', function () { var address = '0x012345'; var signature = '0x987654'; var options = { - earliest: 1, - latest: 2, - offset: 3, - max: 4 + fromBlock: 1, + toBlock: 2, }; var e = { name: 'Event', @@ -114,10 +104,8 @@ describe('event', function () { assert.equal(result.topics[0], signature); assert.equal(result.topics[1][0], f.formatInputInt(4)); assert.equal(result.topics[1][1], f.formatInputInt(69)); - assert.equal(result.earliest, options.earliest); - assert.equal(result.latest, options.latest); - assert.equal(result.offset, options.offset); - assert.equal(result.max, options.max); + assert.equal(result.fromBlock, options.fromBlock); + assert.equal(result.toBlock, options.toBlock); }); }); diff --git a/event.outputParser.js b/event.outputParser.js index 93b50ff2f..d31e49fa8 100644 --- a/event.outputParser.js +++ b/event.outputParser.js @@ -1,7 +1,7 @@ var assert = require('assert'); var event = require('../lib/web3/event.js'); -describe('event', function () { +describe('lib/web3/event', function () { describe('outputParser', function () { it('should parse basic event output object', function () { @@ -10,7 +10,7 @@ describe('event', function () { "address":"0x78dfc5983baecf65f73e3de3a96cee24e6b7981e", "data":"0x000000000000000000000000000000000000000000000000000000000000004b", "number":2, - "topic":[ + "topics":[ "0x6e61ef44ac2747ff8b84d353a908eb8bd5c3fb118334d57698c5cfc7041196ad", "0x0000000000000000000000000000000000000000000000000000000000000001" ] @@ -43,7 +43,7 @@ describe('event', function () { "000000000000000000000000000000000000000000000000000000000000004c" + "0000000000000000000000000000000000000000000000000000000000000001", "number":3, - "topic":[ + "topics":[ "0x6e61ef44ac2747ff8b84d353a908eb8bd5c3fb118334d57698c5cfc7041196ad", "0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000005" diff --git a/filter.methods.js b/filter.methods.js deleted file mode 100644 index d039ec9bb..000000000 --- a/filter.methods.js +++ /dev/null @@ -1,24 +0,0 @@ -var assert = require('assert'); -var filter = require('../lib/web3/filter'); -var u = require('./test.utils.js'); - -var empty = function () {}; -var implementation = { - newFilter: empty, - getLogs: empty, - uninstallFilter: empty, - startPolling: empty, - stopPolling: empty, -}; - -describe('web3', function () { - describe('eth', function () { - describe('filter', function () { - var f = filter({}, implementation); - - u.methodExists(f, 'watch'); - u.methodExists(f, 'stopWatching'); - u.methodExists(f, 'get'); - }); - }); -}); diff --git a/formatters.inputDefaultBlockFormatter.js b/formatters.inputDefaultBlockFormatter.js new file mode 100644 index 000000000..8ae5ea268 --- /dev/null +++ b/formatters.inputDefaultBlockFormatter.js @@ -0,0 +1,24 @@ +var chai = require('chai'); +var assert = chai.assert; +var formatters = require('../lib/web3/formatters'); + +var tests = [ + { value: 'latest', expected: 'latest' }, + { value: 'pending', expected: 'pending' }, + { value: 'earliest', expected: 'earliest' }, + { value: 1, expected: '0x1' }, + { value: '0x1', expected: '0x1' } +]; + +describe('lib/web3/formatters', function () { + describe('inputDefaultBlockNumberFormatter', function () { + tests.forEach(function (test) { + it('should turn ' + test.value + ' to ' + test.expected, function () { + assert.strictEqual(formatters.inputDefaultBlockNumberFormatter(test.value), test.expected); + }); + }); + }); +}); + + + diff --git a/formatters.inputPostFormatter.js b/formatters.inputPostFormatter.js index 0995d6d79..7f0ce5298 100644 --- a/formatters.inputPostFormatter.js +++ b/formatters.inputPostFormatter.js @@ -1,6 +1,6 @@ var chai = require('chai'); -var formatters = require('../lib/web3/formatters.js'); var assert = chai.assert; +var formatters = require('../lib/web3/formatters.js'); describe('formatters', function () { describe('inputPostFormatter', function () { @@ -26,3 +26,4 @@ describe('formatters', function () { }); }); }); + diff --git a/formatters.inputTransactionFormatter.js b/formatters.inputTransactionFormatter.js index 5ff0526e1..2f7f8c2e5 100644 --- a/formatters.inputTransactionFormatter.js +++ b/formatters.inputTransactionFormatter.js @@ -1,4 +1,5 @@ -var assert = require('assert'); +var chai = require('chai'); +var assert = chai.assert; var formatters = require('../lib/web3/formatters.js'); var BigNumber = require('bignumber.js'); @@ -7,19 +8,19 @@ describe('formatters', function () { it('should return the correct value', function () { assert.deepEqual(formatters.inputTransactionFormatter({ - data: '0x34234kjh23kj4234', + data: '0x34234bf23bf4234', value: new BigNumber(100), from: '0x00000', to: '0x00000', gas: 1000, - gasPrice: new BigNumber(1000), + gasPrice: new BigNumber(1000) }), { - data: '0x34234kjh23kj4234', + data: '0x34234bf23bf4234', value: '0x64', from: '0x00000', to: '0x00000', gas: '0x3e8', - gasPrice: '0x3e8', + gasPrice: '0x3e8' }); }); }); diff --git a/formatters.outputTransactionFormatter.js b/formatters.outputTransactionFormatter.js index f42ed8495..b1eaff52d 100644 --- a/formatters.outputTransactionFormatter.js +++ b/formatters.outputTransactionFormatter.js @@ -12,7 +12,10 @@ describe('formatters', function () { to: '0x00000', value: '0x3e8', gas: '0x3e8', - gasPrice: '0x3e8' + gasPrice: '0x3e8', + transactionIndex: '0x1', + blockNumber: '0x3e8', + blockHash: '0x34234bf23bf4234' }), { input: '0x34234kjh23kj4234', from: '0x00000', @@ -20,6 +23,9 @@ describe('formatters', function () { value: new BigNumber(1000), gas: 1000, gasPrice: new BigNumber(1000), + blockNumber: 1000, + blockHash: '0x34234bf23bf4234', + transactionIndex: 1 }); }); }); diff --git a/helpers/FakeHttpProvider.js b/helpers/FakeHttpProvider.js new file mode 100644 index 000000000..20d1f2580 --- /dev/null +++ b/helpers/FakeHttpProvider.js @@ -0,0 +1,68 @@ +var chai = require('chai'); +var assert = require('assert'); +var utils = require('../../lib/utils/utils'); + +var getResponseStub = function () { + return { + jsonrpc: '2.0', + id: 1, + result: 0 + }; +}; + +var FakeHttpProvider = function () { + this.response = getResponseStub(); + this.error = null; + this.validation = null; +}; + +FakeHttpProvider.prototype.send = function (payload) { + assert.equal(utils.isArray(payload) || utils.isObject(payload), true); + // TODO: validate jsonrpc request + if (this.error) { + throw this.error; + } + if (this.validation) { + // imitate plain json object + this.validation(JSON.parse(JSON.stringify(payload))); + } + return this.response; +}; + +FakeHttpProvider.prototype.sendAsync = function (payload, callback) { + assert.equal(utils.isArray(payload) || utils.isObject(payload), true); + assert.equal(utils.isFunction(callback), true); + if (this.validation) { + // imitate plain json object + this.validation(JSON.parse(JSON.stringify(payload)), callback); + } + callback(this.error, this.response); +}; + +FakeHttpProvider.prototype.injectResponse = function (response) { + this.response = response; +}; + +FakeHttpProvider.prototype.injectResult = function (result) { + this.response = getResponseStub(); + this.response.result = result; +}; + +FakeHttpProvider.prototype.injectBatchResults = function (results) { + this.response = results.map(function (r) { + var response = getResponseStub(); + response.result = r; + return response; + }); +}; + +FakeHttpProvider.prototype.injectError = function (error) { + this.error = error; +}; + +FakeHttpProvider.prototype.injectValidation = function (callback) { + this.validation = callback; +}; + +module.exports = FakeHttpProvider; + diff --git a/helpers/FakeQtNavigator.js b/helpers/FakeQtNavigator.js new file mode 100644 index 000000000..fb251d239 --- /dev/null +++ b/helpers/FakeQtNavigator.js @@ -0,0 +1,11 @@ + +var navigator = { + qt: { + callMethod: function (payload) { + return "{}"; + } + } +}; + +module.exports = navigator; + diff --git a/helpers/FakeXMLHttpRequest.js b/helpers/FakeXMLHttpRequest.js new file mode 100644 index 000000000..a67d7f74a --- /dev/null +++ b/helpers/FakeXMLHttpRequest.js @@ -0,0 +1,31 @@ +var chai = require('chai'); +var assert = chai.assert; + +var FakeXMLHttpRequest = function () { + this.responseText = "{}"; + this.readyState = 4; + this.onreadystatechange = null; + this.async = false; +}; + +FakeXMLHttpRequest.prototype.open = function (method, host, async) { + assert.equal(method, 'POST'); + assert.notEqual(host, null); + assert.equal(async === false || async === true, true); + this.async = async; +}; + +FakeXMLHttpRequest.prototype.send = function (payload) { + assert.equal(typeof payload, 'string'); + if (this.async) { + assert.equal(typeof this.onreadystatechange, 'function'); + this.onreadystatechange(); + return; + } + return this.responseText; +}; + +module.exports = { + XMLHttpRequest: FakeXMLHttpRequest +}; + diff --git a/helpers/test.method.js b/helpers/test.method.js new file mode 100644 index 000000000..8de318d8c --- /dev/null +++ b/helpers/test.method.js @@ -0,0 +1,68 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../../index'); +var FakeHttpProvider = require('./FakeHttpProvider'); + +var runTests = function (obj, method, tests) { + + var testName = obj ? 'web3.' + obj : 'web'; + + describe(testName, function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('sync test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, test.formattedArgs); + }); + + // when + var result = (obj) + ? web3[obj][method].apply(null, test.args.slice(0)) + : web3[method].apply(null, test.args.slice(0)); + + // then + assert.deepEqual(test.formattedResult, result); + }); + + it('async test: ' + index, function (done) { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, test.formattedArgs); + }); + + var args = test.args.slice(0); + // add callback + args.push(function (err, result) { + assert.deepEqual(test.formattedResult, result); + done(); + }); + + // when + if(obj) + web3[obj][method].apply(null, args); + else + web3[method].apply(null, args); + }); + }); + }); + }); + +}; + +module.exports = { + runTests: runTests +} + diff --git a/test.utils.js b/helpers/test.utils.js similarity index 67% rename from test.utils.js rename to helpers/test.utils.js index 8a1e9a0b6..ea710fdca 100644 --- a/test.utils.js +++ b/helpers/test.utils.js @@ -1,13 +1,20 @@ -var assert = require('assert'); +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../../index'); + +var FakeHttpProvider = require('./FakeHttpProvider'); var methodExists = function (object, method) { it('should have method ' + method + ' implemented', function() { + web3.setProvider(null); assert.equal('function', typeof object[method], 'method ' + method + ' is not implemented'); }); }; var propertyExists = function (object, property) { it('should have property ' + property + ' implemented', function() { + // set dummy providor, to prevent error + web3.setProvider(new FakeHttpProvider()); assert.notEqual('undefined', typeof object[property], 'property ' + property + ' is not implemented'); }); }; diff --git a/httpprovider.js b/httpprovider.js new file mode 100644 index 000000000..6205a16d2 --- /dev/null +++ b/httpprovider.js @@ -0,0 +1,33 @@ +var chai = require('chai'); +var assert = chai.assert; +var SandboxedModule = require('sandboxed-module'); + +SandboxedModule.registerBuiltInSourceTransformer('istanbul'); +var HttpProvider = SandboxedModule.require('../lib/web3/httpprovider', { + requires: { + 'xmlhttprequest': require('./helpers/FakeXMLHttpRequest') + } +}); + +describe('lib/web3/httpprovider', function () { + describe('send', function () { + it('should send basic request', function () { + var provider = new HttpProvider(); + var result = provider.send({}); + + assert.equal(typeof result, 'object'); + }); + }); + + describe('sendAsync', function () { + it('should send basic async request', function (done) { + var provider = new HttpProvider(); + + provider.sendAsync({}, function (err, result) { + assert.equal(typeof result, 'object'); + done(); + }); + }); + }); +}); + diff --git a/jsonrpc.id.js b/jsonrpc.id.js new file mode 100644 index 000000000..07ede281e --- /dev/null +++ b/jsonrpc.id.js @@ -0,0 +1,23 @@ +var chai = require('chai'); +var assert = chai.assert; +var Jsonrpc = require('../lib/web3/jsonrpc'); + +describe('lib/web3/jsonrpc', function () { + describe('id', function () { + it('should increment the id', function () { + + // given + var a = Jsonrpc.getInstance(); + var b = Jsonrpc.getInstance(); + var method = 'm'; + + // when + var p1 = a.toPayload(method); + var p2 = b.toPayload(method); + + // then + assert.equal(p2.id, p1.id + 1); + }); + }); +}); + diff --git a/jsonrpc.isValidResponse.js b/jsonrpc.isValidResponse.js index 78388a443..fc42f505d 100644 --- a/jsonrpc.isValidResponse.js +++ b/jsonrpc.isValidResponse.js @@ -1,5 +1,6 @@ var assert = require('assert'); var jsonrpc = require('../lib/web3/jsonrpc'); +jsonrpc = new jsonrpc(); describe('jsonrpc', function () { describe('isValidResponse', function () { diff --git a/jsonrpc.toBatchPayload.js b/jsonrpc.toBatchPayload.js index c9a1e51e0..b1b523f4e 100644 --- a/jsonrpc.toBatchPayload.js +++ b/jsonrpc.toBatchPayload.js @@ -1,5 +1,6 @@ var assert = require('assert'); var jsonrpc = require('../lib/web3/jsonrpc'); +jsonrpc = new jsonrpc(); describe('jsonrpc', function () { describe('toBatchPayload', function () { diff --git a/jsonrpc.toPayload.js b/jsonrpc.toPayload.js index a79501d73..dbec9afd1 100644 --- a/jsonrpc.toPayload.js +++ b/jsonrpc.toPayload.js @@ -1,5 +1,7 @@ -var assert = require('assert'); +var chai = require('chai'); +var assert = chai.assert; var jsonrpc = require('../lib/web3/jsonrpc'); +jsonrpc = new jsonrpc(); describe('jsonrpc', function () { describe('toPayload', function () { diff --git a/method.attachToObject.js b/method.attachToObject.js new file mode 100644 index 000000000..a27a3e821 --- /dev/null +++ b/method.attachToObject.js @@ -0,0 +1,44 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); +var utils = require('../lib/utils/utils'); + +describe('lib/web3/method', function () { + describe('attachToObject', function () { + //it('attach simple function to an object', function () { + + //// given + //var method = new Method({ + //name: 'hello' + //}); + //var object = {}; + //var func = function () { return 1; }; + + //// when + //method.attachToObject(object, func); + + //// then + //assert.equal(utils.isFunction(object.hello), true); + //assert.equal(object.hello(), 1); + //}); + + //it('attach nested function to an object', function () { + + //// given + //var method = new Method({ + //name: 'hello.world' + //}); + //var object = {}; + //var func = function () { return 1; }; + + //// when + //method.attachToObject(object, func); + + //// then + //assert.equal(utils.isObject(object.hello), true); + //assert.equal(utils.isFunction(object.hello.world), true); + //assert.equal(object.hello.world(), 1); + //}); + }); +}); + diff --git a/method.extractCallback.js b/method.extractCallback.js new file mode 100644 index 000000000..34e480c32 --- /dev/null +++ b/method.extractCallback.js @@ -0,0 +1,52 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); + +describe('lib/web3/method', function () { + describe('extractCallback', function () { + it('should extract callback', function () { + + // given + var method = new Method({}); + var callback = function () { }; + var args = [1, callback] + + // when + var result = method.extractCallback(args); + + // then + assert.equal(args.length, 1); + assert.equal(callback, result); + }); + + it('should extract callback created using newFunction', function () { + + // given + var method = new Method({}); + var callback = new Function (); + var args = [1, callback] + + // when + var result = method.extractCallback(args); + + // then + assert.equal(args.length, 1); + assert.equal(callback, result); + }); + + it('should not extract the callback', function () { + + // given + var method = new Method({}); + var args = [1, 2] + + // when + var result = method.extractCallback(args); + + // then + assert.equal(args.length, 2); + assert.equal(result, null); + }); + }); +}); + diff --git a/method.formatInput.js b/method.formatInput.js new file mode 100644 index 000000000..c778f1059 --- /dev/null +++ b/method.formatInput.js @@ -0,0 +1,41 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); + +describe('lib/web3/method', function () { + describe('formatInput', function () { + it('should format plain input', function () { + + // given + var star = function (arg) { + return arg + '*'; + }; + + var method = new Method({ + inputFormatter: [star, star, star] + }); + var args = ['1','2','3']; + var expectedArgs = ['1*', '2*', '3*']; + + // when + var result = method.formatInput(args); + + // then + assert.deepEqual(result, expectedArgs); + }); + + it('should do nothing if there is no formatter', function () { + + // given + var method = new Method({}); + var args = [1,2,3]; + + // when + var result = method.formatInput(args); + + // then + assert.deepEqual(result, args); + }); + }); +}); + diff --git a/method.formatOutput.js b/method.formatOutput.js new file mode 100644 index 000000000..4d88e2dae --- /dev/null +++ b/method.formatOutput.js @@ -0,0 +1,43 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); + +describe('lib/web3/method', function () { + describe('formatOutput', function () { + it('should format plain output', function () { + + // given + var formatter = function (args) { + return args.map(function (arg) { + return arg + '*'; + }); + }; + + var method = new Method({ + outputFormatter: formatter + }); + var args = ['1','2','3']; + var expectedArgs = ['1*', '2*', '3*']; + + // when + var result = method.formatOutput(args); + + // then + assert.deepEqual(result, expectedArgs); + }); + + it('should do nothing if there is no formatter', function () { + + // given + var method = new Method({}); + var args = [1,2,3]; + + // when + var result = method.formatOutput(args); + + // then + assert.deepEqual(result, args); + }); + }); +}); + diff --git a/method.getCall.js b/method.getCall.js new file mode 100644 index 000000000..398de325e --- /dev/null +++ b/method.getCall.js @@ -0,0 +1,46 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); + +describe('lib/web3/method', function () { + describe('getCall', function () { + it('should return call name', function () { + + // given + var call = 'hello_call_world'; + var method = new Method({ + call: call + }); + + // when + var result = method.getCall(); + + // then + assert.equal(call, result); + }); + + it('should return call based on args', function () { + + // given + var call = function (args) { + return args ? args.length.toString() : '0'; + }; + + var method = new Method({ + call: call + }); + + // when + var r0 = method.getCall(); + var r1 = method.getCall([1]); + var r2 = method.getCall([1, 2]); + + // then + assert.equal(r0, '0'); + assert.equal(r1, '1'); + assert.equal(r2, '2'); + + }); + }); +}); + diff --git a/method.validateArgs.js b/method.validateArgs.js new file mode 100644 index 000000000..5cb16e1e0 --- /dev/null +++ b/method.validateArgs.js @@ -0,0 +1,47 @@ +var chai = require('chai'); +var assert = chai.assert; +var Method = require('../lib/web3/method'); +var errors = require('../lib/web3/errors'); + +describe('lib/web3/method', function () { + describe('validateArgs', function () { + it('should pass', function () { + + // given + var method = new Method({ + params: 1 + }); + + var args = [1]; + var args2 = ['heloas']; + + // when + var test = function () { method.validateArgs(args); }; + var test2 = function () { method.validateArgs(args2); }; + + // then + assert.doesNotThrow(test); + assert.doesNotThrow(test2); + }); + + it('should return call based on args', function () { + + // given + var method = new Method({ + params: 2 + }); + + var args = [1]; + var args2 = ['heloas', '12', 3]; + + // when + var test = function () { method.validateArgs(args); }; + var test2 = function () { method.validateArgs(args2); }; + + // then + assert.throws(test, errors.InvalidNumberOfParams); + assert.throws(test2, errors.InvalidNumberOfParams); + }); + }); +}); + diff --git a/mocha.opts b/mocha.opts index c4a633d64..5ada47be1 100644 --- a/mocha.opts +++ b/mocha.opts @@ -1,2 +1 @@ ---reporter spec - +--reporter spec diff --git a/net.methods.js b/net.methods.js deleted file mode 100644 index 26d9c224d..000000000 --- a/net.methods.js +++ /dev/null @@ -1,10 +0,0 @@ -var assert = require('assert'); -var web3 = require('../index.js'); -var u = require('./test.utils.js'); - -describe('web3', function() { - describe('net', function() { - u.propertyExists(web3.net, 'listening'); - u.propertyExists(web3.net, 'peerCount'); - }); -}); \ No newline at end of file diff --git a/node/app.js b/node/app.js new file mode 100644 index 000000000..c3fd489a0 --- /dev/null +++ b/node/app.js @@ -0,0 +1,5 @@ +var web3 = require('ethereum.js'); + +console.log(web3.version.api); + + diff --git a/node/package.json b/node/package.json new file mode 100644 index 000000000..4c56b2c10 --- /dev/null +++ b/node/package.json @@ -0,0 +1,14 @@ +{ + "name": "node", + "version": "1.0.0", + "description": "", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "ethereum.js": "ethereum/ethereum.js#master" + } +} diff --git a/polling.js b/polling.js new file mode 100644 index 000000000..ea7dd9829 --- /dev/null +++ b/polling.js @@ -0,0 +1,69 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var utils = require('../lib/utils/utils'); + +var tests = [{ + protocol: 'eth', + args: ['pending'], + firstResult: 1, + firstPayload: { + method: "eth_newBlockFilter", + params: [ + "pending" + ] + }, + secondResult: [null], + secondPayload: { + method: "eth_getFilterChanges" + } +}]; + + +var testPolling = function (tests) { + + describe('web3.eth.filter.polling', function () { + tests.forEach(function (test, index) { + it('should create && successfully poll filter', function (done) { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); + provider.injectResult(test.firstResult); + var step = 0; + provider.injectValidation(function (payload) { + if (step === 0) { + step = 1; + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.firstPayload.method); + assert.deepEqual(payload.params, test.firstPayload.params); + } else if (step === 1 && utils.isArray(payload)) { + var r = payload.filter(function (p) { + return p.jsonrpc === '2.0' && p.method === test.secondPayload.method && p.params[0] === test.firstResult; + }); + assert.equal(r.length > 0, true); + } + + }); + + // when + var filter = web3[test.protocol].filter.apply(null, test.args); + provider.injectBatchResults([test.secondResult]); + filter.watch(function (err, result) { + if (test.err) { + // todo + } else { + assert.equal(result, test.secondResult[0]); + } + done(); + + }); + }); + }); + }); +}; + +testPolling(tests); + diff --git a/qtsyncprovider.js b/qtsyncprovider.js new file mode 100644 index 000000000..ce0064414 --- /dev/null +++ b/qtsyncprovider.js @@ -0,0 +1,22 @@ +var chai = require('chai'); +var assert = chai.assert; +var SandboxedModule = require('sandboxed-module'); + +SandboxedModule.registerBuiltInSourceTransformer('istanbul'); +var QtSyncProvider = SandboxedModule.require('../lib/web3/qtsync', { + globals: { + navigator: require('./helpers/FakeQtNavigator') + } +}); + +describe('/lib/web3/qtsyncprovider', function () { + describe('send', function () { + it('should send basic request', function () { + var provider = new QtSyncProvider(); + var result = provider.send({}); + + assert.equal(typeof result, 'object'); + }); + }); +}); + diff --git a/requestmanager.js b/requestmanager.js new file mode 100644 index 000000000..5c951ded3 --- /dev/null +++ b/requestmanager.js @@ -0,0 +1,44 @@ +var chai = require('chai'); +var assert = chai.assert; +var RequestManager = require('../lib/web3/requestmanager'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +// TODO: handling errors! +// TODO: validation of params! + +describe('lib/web3/requestmanager', function () { + describe('send', function () { + it('should return expected result synchronously', function () { + var provider = new FakeHttpProvider(); + var manager = RequestManager.getInstance(); + manager.setProvider(provider); + var expected = 'hello_world'; + provider.injectResult(expected); + + var result = manager.send({ + method: 'test', + params: [1,2,3] + }); + + assert.equal(expected, result); + }); + + it('should return expected result asynchronously', function (done) { + var provider = new FakeHttpProvider(); + var manager = RequestManager.getInstance(); + manager.setProvider(provider); + var expected = 'hello_world'; + provider.injectResult(expected); + + manager.sendAsync({ + method: 'test', + params: [1,2,3] + }, function (error, result) { + assert.equal(error, null); + assert.equal(expected, result); + done(); + }); + }); + }); +}); + diff --git a/shh.filter.js b/shh.filter.js new file mode 100644 index 000000000..57df4d0c5 --- /dev/null +++ b/shh.filter.js @@ -0,0 +1,45 @@ +var chai = require('chai'); +var web3 = require('../index'); +var assert = chai.assert; +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'filter'; + +var tests = [{ + args: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['0x324f5435', '0x564b4566f3453'] + }], + formattedArgs: [{ + to: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: ['0x324f5435', '0x564b4566f3453'] + }], + result: '0xf', + formattedResult: '0xf', + call: 'shh_newFilter' +}]; + +describe('shh', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, test.formattedArgs); + }); + + // call + web3.shh[method].apply(null, test.args); + + }); + }); + }); +}); + + diff --git a/shh.hasIdentity.js b/shh.hasIdentity.js new file mode 100644 index 000000000..569247a88 --- /dev/null +++ b/shh.hasIdentity.js @@ -0,0 +1,16 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'hasIdentity'; + +var tests = [{ + args: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + formattedArgs: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + result: true, + formattedResult: true, + call: 'shh_'+ method +}]; + +testMethod.runTests('shh', method, tests); + diff --git a/signature.js b/signature.js new file mode 100644 index 000000000..709f662fd --- /dev/null +++ b/signature.js @@ -0,0 +1,48 @@ +var chai = require('chai'); +var assert = chai.assert; +var utils = require('../lib/utils/utils'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var signature = require('../lib/web3/signature'); +var web3 = require('../index'); + +var tests = [{ + method: 'functionSignatureFromAscii', + call: 'web3_sha3', + request: 'multiply', + formattedRequest: utils.fromAscii('multiply'), + result: '0x255d31552d29a21e93334e96055c6dca7cd329f5420ae74ec166d0c47f9f9843', + formattedResult: '0x255d3155' +},{ + method: 'eventSignatureFromAscii', + call: 'web3_sha3', + request: 'multiply', + formattedRequest: utils.fromAscii('multiply'), + result: '0x255d31552d29a21e93334e96055c6dca7cd329f5420ae74ec166d0c47f9f9843', + formattedResult: '0x255d31552d29a21e93334e96055c6dca7cd329f5420ae74ec166d0c47f9f9843' +}]; + +describe('lib/web3/signature', function () { + tests.forEach(function (test, index) { + describe(test.method, function () { + it('should properly format and return signature of solidity functioni ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.method, test.call); + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.params[0], test.formattedRequest); + }); + + // when + var result = signature[test.method].call(null, test.request); + + // then + assert.equal(result, test.formattedResult); + }); + }); + }); +}); + diff --git a/utils.extractDisplayName.js b/utils.extractDisplayName.js index c401b7e60..d3faef8da 100644 --- a/utils.extractDisplayName.js +++ b/utils.extractDisplayName.js @@ -1,7 +1,7 @@ var assert = require('assert'); var utils = require('../lib/utils/utils.js'); -describe('utils', function () { +describe('lib/utils/utils', function () { describe('extractDisplayName', function () { it('should extract display name from method with no params', function () { diff --git a/utils.extractTypeName.js b/utils.extractTypeName.js index 7211ff613..41099787d 100644 --- a/utils.extractTypeName.js +++ b/utils.extractTypeName.js @@ -1,7 +1,7 @@ var assert = require('assert'); var utils = require('../lib/utils/utils.js'); -describe('utils', function () { +describe('lib/utils/utils', function () { describe('extractTypeName', function () { it('should extract type name from method with no params', function () { diff --git a/utils.filters.js b/utils.filters.js index 4629e4fe8..5e6870efa 100644 --- a/utils.filters.js +++ b/utils.filters.js @@ -1,7 +1,7 @@ var assert = require('assert'); var utils = require('../lib/utils/utils.js'); -describe('utils', function() { +describe('lib/utils/utils', function() { it('should filter functions and events from input array properly', function () { // given diff --git a/utils.fromDecimal.js b/utils.fromDecimal.js index 4dc774c74..c0e5ed62f 100644 --- a/utils.fromDecimal.js +++ b/utils.fromDecimal.js @@ -31,7 +31,7 @@ var tests = [ { value: '-0x0', expected: '0x0'} ]; -describe('utils', function () { +describe('lib/utils/utils', function () { describe('fromDecimal', function () { tests.forEach(function (test) { it('should turn ' + test.value + ' to ' + test.expected, function () { diff --git a/utils.fromWei.js b/utils.fromWei.js index 735575c68..e8691eb2a 100644 --- a/utils.fromWei.js +++ b/utils.fromWei.js @@ -1,7 +1,7 @@ var assert = require('assert'); var utils = require('../lib/utils/utils.js'); -describe('utils', function () { +describe('lib/utils/utils', function () { describe('fromWei', function () { it('should return the correct value', function () { diff --git a/utils.isAddress.js b/utils.isAddress.js index d2d087ffd..3ebbce837 100644 --- a/utils.isAddress.js +++ b/utils.isAddress.js @@ -8,10 +8,10 @@ var tests = [ { value: 'function', is: false}, { value: {}, is: false}, { value: '0xc6d9d2cd449a754c494264e1809c50e34d64562b', is: true }, - { value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: true } + { value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: false } ]; -describe('utils', function () { +describe('lib/utils/utils', function () { describe('isAddress', function () { tests.forEach(function (test) { it('shoud test if value ' + test.value + ' is address: ' + test.is, function () { diff --git a/utils.isBigNumber.js b/utils.isBigNumber.js index a3de36916..d78739b8a 100644 --- a/utils.isBigNumber.js +++ b/utils.isBigNumber.js @@ -15,7 +15,7 @@ var tests = [ ]; -describe('utils', function () { +describe('lib/utils/utils', function () { describe('isBigNumber', function () { tests.forEach(function (test) { it('shoud test if value ' + test.func + ' is BigNumber: ' + test.is, function () { diff --git a/utils.isFunction.js b/utils.isFunction.js index c113bc334..05882b2c0 100644 --- a/utils.isFunction.js +++ b/utils.isFunction.js @@ -9,7 +9,7 @@ var tests = [ { func: {}, is: false} ]; -describe('utils', function () { +describe('lib/utils/utils', function () { describe('isFunction', function () { tests.forEach(function (test) { it('shoud test if value ' + test.func + ' is function: ' + test.is, function () { diff --git a/utils.isJson.js b/utils.isJson.js new file mode 100644 index 000000000..73d86d833 --- /dev/null +++ b/utils.isJson.js @@ -0,0 +1,26 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { obj: function () {}, is: false}, + { obj: new Function(), is: false}, + { obj: 'function', is: false}, + { obj: {}, is: false}, + { obj: '[]', is: true}, + { obj: '[1, 2]', is: true}, + { obj: '{}', is: true}, + { obj: '{"a": 123, "b" :3,}', is: false}, + { obj: '{"c" : 2}', is: true} +]; + +describe('lib/utils/utils', function () { + describe('isJson', function () { + tests.forEach(function (test) { + it('shoud test if value ' + test.obj + ' is json: ' + test.is, function () { + assert.equal(utils.isJson(test.obj), test.is); + }); + }); + }); +}); + diff --git a/utils.isString.js b/utils.isString.js index bb36ccd67..73b95d22b 100644 --- a/utils.isString.js +++ b/utils.isString.js @@ -10,7 +10,7 @@ var tests = [ { value: new String('hello'), is: true} ]; -describe('utils', function () { +describe('lib/utils/utils', function () { describe('isString', function () { tests.forEach(function (test) { it('shoud test if value ' + test.func + ' is string: ' + test.is, function () { diff --git a/utils.toBigNumber.js b/utils.toBigNumber.js index 2d293c12a..efe3fa714 100644 --- a/utils.toBigNumber.js +++ b/utils.toBigNumber.js @@ -34,7 +34,7 @@ var tests = [ { value: new BigNumber(0), expected: '0'} ]; -describe('utils', function () { +describe('lib/utils/utils', function () { describe('toBigNumber', function () { tests.forEach(function (test) { it('should turn ' + test.value + ' to ' + test.expected, function () { diff --git a/utils.toDecimal.js b/utils.toDecimal.js index d785b0444..74352f324 100644 --- a/utils.toDecimal.js +++ b/utils.toDecimal.js @@ -1,7 +1,7 @@ var assert = require('assert'); var utils = require('../lib/utils/utils.js'); -describe('utils', function () { +describe('lib/utils/utils', function () { describe('toDecimal', function () { it('should return the correct value', function () { diff --git a/utils.toHex.js b/utils.toHex.js index 2e9c59cb5..0a328e345 100644 --- a/utils.toHex.js +++ b/utils.toHex.js @@ -27,14 +27,16 @@ var tests = [ { value: {test: 'test'}, expected: '0x7b2274657374223a2274657374227d'}, { value: '{"test": "test"}', expected: '0x7b2274657374223a202274657374227d'}, { value: 'myString', expected: '0x6d79537472696e67'}, - { value: new BigNumber(15), expected: '0xf'} + { value: new BigNumber(15), expected: '0xf'}, + { value: true, expected: '0x1'}, + { value: false, expected: '0x0'} ]; -describe('utils', function () { +describe('lib/utils/utils', function () { describe('toHex', function () { tests.forEach(function (test) { it('should turn ' + test.value + ' to ' + test.expected, function () { - assert.equal(utils.toHex(test.value), test.expected); + assert.strictEqual(utils.toHex(test.value), test.expected); }); }); }); diff --git a/utils.toWei.js b/utils.toWei.js index 33e03ffc3..3bb0997c6 100644 --- a/utils.toWei.js +++ b/utils.toWei.js @@ -2,7 +2,7 @@ var chai = require('chai'); var utils = require('../lib/utils/utils'); var assert = chai.assert; -describe('utils', function () { +describe('lib/utils/utils', function () { describe('toWei', function () { it('should return the correct value', function () { diff --git a/web3.db.getHex.js b/web3.db.getHex.js new file mode 100644 index 000000000..7e17d0c51 --- /dev/null +++ b/web3.db.getHex.js @@ -0,0 +1,14 @@ +var testMethod = require('./helpers/test.method.js'); + +var method = 'getHex'; + +var tests = [{ + args: ['myDB', 'myKey'], + formattedArgs: ['myDB', 'myKey'], + result: '0xf', + formattedResult: '0xf', + call: 'db_'+ method +}]; + +testMethod.runTests('db', method, tests); + diff --git a/web3.db.getString.js b/web3.db.getString.js new file mode 100644 index 000000000..f9aadffa3 --- /dev/null +++ b/web3.db.getString.js @@ -0,0 +1,16 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getString'; + +var tests = [{ + args: ['myDB', 'myKey'], + formattedArgs: ['myDB', 'myKey'], + result: 'myValue', + formattedResult: 'myValue', + call: 'db_'+ method +}]; + +testMethod.runTests('db', method, tests); + diff --git a/db.methods.js b/web3.db.methods.js similarity index 57% rename from db.methods.js rename to web3.db.methods.js index aac8981d2..246ecfd0b 100644 --- a/db.methods.js +++ b/web3.db.methods.js @@ -1,10 +1,10 @@ - -var assert = require('assert'); +var chai = require('chai'); +var assert = chai.assert; var web3 = require('../index.js'); -var u = require('./test.utils.js'); +var u = require('./helpers/test.utils.js'); -describe('web3', function() { - describe('db', function() { +describe('web3.db', function() { + describe('methods', function() { u.methodExists(web3.db, 'putHex'); u.methodExists(web3.db, 'getHex'); u.methodExists(web3.db, 'putString'); diff --git a/web3.db.putHex.js b/web3.db.putHex.js new file mode 100644 index 000000000..306abaec4 --- /dev/null +++ b/web3.db.putHex.js @@ -0,0 +1,16 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'putHex'; + +var tests = [{ + args: ['myDB', 'myKey', '0xb'], + formattedArgs: ['myDB', 'myKey', '0xb'], + result: true, + formattedResult: true, + call: 'db_'+ method +}]; + +testMethod.runTests('db', method, tests); + diff --git a/web3.db.putString.js b/web3.db.putString.js new file mode 100644 index 000000000..ddd32874f --- /dev/null +++ b/web3.db.putString.js @@ -0,0 +1,16 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'putString'; + +var tests = [{ + args: ['myDB', 'myKey', 'myValue'], + formattedArgs: ['myDB', 'myKey', 'myValue'], + result: true, + formattedResult: true, + call: 'db_'+ method +}]; + +testMethod.runTests('db', method, tests); + diff --git a/web3.eth.accounts.js b/web3.eth.accounts.js new file mode 100644 index 000000000..da7da1a96 --- /dev/null +++ b/web3.eth.accounts.js @@ -0,0 +1,38 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'accounts'; + +var tests = [{ + result: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedResult: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/web3.eth.blockNumber.js b/web3.eth.blockNumber.js new file mode 100644 index 000000000..dfd73f57e --- /dev/null +++ b/web3.eth.blockNumber.js @@ -0,0 +1,38 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'blockNumber'; + +var tests = [{ + result: '0xb', + formattedResult: 11, + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.strictEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/web3.eth.coinbase.js b/web3.eth.coinbase.js new file mode 100644 index 000000000..f34c53588 --- /dev/null +++ b/web3.eth.coinbase.js @@ -0,0 +1,38 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'coinbase'; + +var tests = [{ + result: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/eth.contract.js b/web3.eth.contract.js similarity index 99% rename from eth.contract.js rename to web3.eth.contract.js index 59ad51b29..0f2fd8640 100644 --- a/eth.contract.js +++ b/web3.eth.contract.js @@ -1,7 +1,7 @@ var assert = require('assert'); var contract = require('../lib/web3/contract.js'); -describe('contract', function() { +describe('web3.eth.contract', function() { it('should create simple contract with one method from abi with explicit type name', function () { // given diff --git a/web3.eth.defaultBlock.js b/web3.eth.defaultBlock.js new file mode 100644 index 000000000..5fc60df47 --- /dev/null +++ b/web3.eth.defaultBlock.js @@ -0,0 +1,12 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); + +describe('web3.eth', function () { + describe('defaultBlock', function () { + it('should check if defaultBlock is set to proper value', function () { + assert.equal(web3.eth.defaultBlock, 'latest'); + }); + }); +}); + diff --git a/web3.eth.filter.js b/web3.eth.filter.js new file mode 100644 index 000000000..d8b37311a --- /dev/null +++ b/web3.eth.filter.js @@ -0,0 +1,55 @@ +var chai = require('chai'); +var web3 = require('../index'); +var assert = chai.assert; +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'filter'; + + +var tests = [{ + args: [{ + fromBlock: 0, + toBlock: 10, + address: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855' + }], + formattedArgs: [{ + fromBlock: '0x0', + toBlock: '0xa', + address: '0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', + topics: [] + }], + result: '0xf', + formattedResult: '0xf', + call: 'eth_newFilter' +},{ + args: ['pending'], + formattedArgs: ['pending'], + result: '0xf', + formattedResult: '0xf', + call: 'eth_newBlockFilter' +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, test.formattedArgs); + }); + + // call + web3.eth[method].apply(null, test.args); + + }); + }); + }); +}); + + diff --git a/web3.eth.filter.methods.js b/web3.eth.filter.methods.js new file mode 100644 index 000000000..f40f3d0ac --- /dev/null +++ b/web3.eth.filter.methods.js @@ -0,0 +1,23 @@ +var chai = require('chai'); +var assert = chai.assert; +var filter = require('../lib/web3/filter'); +var u = require('./helpers/test.utils.js'); + +var empty = function () {}; +var implementation = { + newFilter: empty, + getLogs: empty, + uninstallFilter: empty, + startPolling: empty, + stopPolling: empty, +}; + +describe('web3.eth.filter', function () { + describe('methods', function () { + //var f = filter({}, implementation); + + //u.methodExists(f, 'watch'); + //u.methodExists(f, 'stopWatching'); + //u.methodExists(f, 'get'); + }); +}); diff --git a/web3.eth.getBalance.js b/web3.eth.getBalance.js new file mode 100644 index 000000000..e1eb73707 --- /dev/null +++ b/web3.eth.getBalance.js @@ -0,0 +1,64 @@ +var BigNumber = require('bignumber.js'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getBalance'; + +var tests = [{ + args: [301, 2], + formattedArgs: ['0x000000000000000000000000000000000000012d', '0x2'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +},{ + args: ['0x12d', '0x1'], + formattedArgs: ['0x000000000000000000000000000000000000012d', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: [0x12d, 0x1], + formattedArgs: ['0x000000000000000000000000000000000000012d', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: [0x12d], + formattedArgs: ['0x000000000000000000000000000000000000012d', web3.eth.defaultBlock], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', 0x1], + formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', 0x1], + formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['1255171934823351805979544608257289442498956485798', 0x1], + formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', '0x1'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['1255171934823351805979544608257289442498956485798'], + formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', 'latest'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}, { + args: ['0x00000000000000000000aaaaaaaaaaaaaaaaaaa'], + formattedArgs: ['0x000000000000000000000aaaaaaaaaaaaaaaaaaa', 'latest'], + result: '0x31981', + formattedResult: new BigNumber('0x31981', 16), + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/web3.eth.getBlock.js b/web3.eth.getBlock.js new file mode 100644 index 000000000..539e433a6 --- /dev/null +++ b/web3.eth.getBlock.js @@ -0,0 +1,139 @@ +var web3 = require('../index'); +var BigNumber = require('bignumber.js'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getBlock'; + +var blockResult = { + "number": "0x1b4", + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": "0x027f07", + "totalDifficulty": "0x027f07", + "size": "0x027f07", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x9f759", + "minGasPrice": "0x9f759", + "gasUsed": "0x9f759", + "timestamp": "0x54e34e8e", + "transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var formattedBlockResult = { + "number": 436, + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": new BigNumber(163591), + "totalDifficulty": new BigNumber(163591), + "size": 163591, + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": 653145, + "minGasPrice": new BigNumber(653145), + "gasUsed": 653145, + "timestamp": 1424182926, + "transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var blockResultWithTx = { + "number": "0x1b4", + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": "0x027f07", + "totalDifficulty": "0x027f07", + "size": "0x027f07", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x9f759", + "minGasPrice": "0x9f759", + "gasUsed": "0x9f759", + "timestamp": "0x54e34e8e", + "transactions": [{ + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": "0x15df", + "transactionIndex": "0x1", + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value":"0x7f110", + "gas": "0x7f110", + "gasPrice":"0x09184e72a000", + "input":"0x603880600c6000396000f30060", + }], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var formattedBlockResultWithTx = { + "number": 436, + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": new BigNumber(163591), + "totalDifficulty": new BigNumber(163591), + "size": 163591, + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": 653145, + "minGasPrice": new BigNumber(653145), + "gasUsed": 653145, + "timestamp": 1424182926, + "transactions": [{ + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": 5599, + "transactionIndex": 1, + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value": new BigNumber(520464), + "gas": 520464, + "gasPrice": new BigNumber(10000000000000), + "input":"0x603880600c6000396000f30060", + }], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', false], + result: blockResult, + formattedResult: formattedBlockResult, + call: 'eth_'+ method + 'ByHash' +},{ + args: [436], + formattedArgs: ['0x1b4', false], + result: blockResult, + formattedResult: formattedBlockResult, + call: 'eth_'+ method + 'ByNumber' +},{ + args: [436, true], + formattedArgs: ['0x1b4', true], + result: blockResultWithTx, + formattedResult: formattedBlockResultWithTx, + call: 'eth_'+ method + 'ByNumber' +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/web3.eth.getBlockTransactionCount.js b/web3.eth.getBlockTransactionCount.js new file mode 100644 index 000000000..009b25ec5 --- /dev/null +++ b/web3.eth.getBlockTransactionCount.js @@ -0,0 +1,29 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getBlockTransactionCount'; + + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + result: '0xb', + formattedResult: 11, + call: 'eth_getBlockTransactionCountByHash' +},{ + args: [436], + formattedArgs: ['0x1b4'], + result: '0xb', + formattedResult: 11, + call: 'eth_getBlockTransactionCountByNumber' +},{ + args: ['pending'], + formattedArgs: ['pending'], + result: '0xb', + formattedResult: 11, + call: 'eth_getBlockTransactionCountByNumber' +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/web3.eth.getBlockUncleCount.js b/web3.eth.getBlockUncleCount.js new file mode 100644 index 000000000..f8193b712 --- /dev/null +++ b/web3.eth.getBlockUncleCount.js @@ -0,0 +1,27 @@ +var chai = require('chai'); +var web3 = require('../index'); +var method = 'getBlockUncleCount'; +var testMethod = require('./helpers/test.method.js'); + + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + result: '0xb', + formattedResult: 11, + call: 'eth_getUncleCountByBlockHash' +},{ + args: [436], + formattedArgs: ['0x1b4'], + result: '0xb', + formattedResult: 11, + call: 'eth_getUncleCountByBlockNumber' +},{ + args: ['pending'], + formattedArgs: ['pending'], + result: '0xb', + formattedResult: 11, + call: 'eth_getUncleCountByBlockNumber' +}]; + +testMethod.runTests('eth', method, tests); diff --git a/web3.eth.getCode.js b/web3.eth.getCode.js new file mode 100644 index 000000000..fc4f5b864 --- /dev/null +++ b/web3.eth.getCode.js @@ -0,0 +1,23 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getCode'; + + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', web3.eth.defaultBlock], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +},{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2'], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/web3.eth.getCompilers.js b/web3.eth.getCompilers.js new file mode 100644 index 000000000..ab426b228 --- /dev/null +++ b/web3.eth.getCompilers.js @@ -0,0 +1,23 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getCompilers'; + + +var tests = [{ + args: [], + formattedArgs: [], + result: ['solidity'], + formattedResult: ['solidity'], + call: 'eth_'+ method +},{ + args: [], + formattedArgs: [], + result: ['solidity'], + formattedResult: ['solidity'], + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/web3.eth.getStorageAt.js b/web3.eth.getStorageAt.js new file mode 100644 index 000000000..8973772e7 --- /dev/null +++ b/web3.eth.getStorageAt.js @@ -0,0 +1,35 @@ +var chai = require('chai'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getStorageAt'; + + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2', web3.eth.defaultBlock], + result: '0x47d33b2', + formattedResult: '0x47d33b2', + call: 'eth_'+ method +},{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2, 0], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2', '0x0'], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +},{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 0xb, 0x0], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0xb', '0x0'], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +}, { + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 0xb, 'latest'], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0xb', 'latest'], + result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855', + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/web3.eth.getTransaction.js b/web3.eth.getTransaction.js new file mode 100644 index 000000000..fb833edf3 --- /dev/null +++ b/web3.eth.getTransaction.js @@ -0,0 +1,46 @@ +var chai = require('chai'); +var web3 = require('../index'); +var BigNumber = require('bignumber.js'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getTransaction'; + +var txResult = { + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": "0x15df", + "transactionIndex": "0x1", + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value":"0x7f110", + "gas": "0x7f110", + "gasPrice":"0x09184e72a000", + "input":"0x603880600c6000396000f30060" +}; +var formattedTxResult = { + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": 5599, + "transactionIndex": 1, + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value": new BigNumber(520464), + "gas": 520464, + "gasPrice": new BigNumber(10000000000000), + "input":"0x603880600c6000396000f30060" +}; + +var tests = [{ + args: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + formattedArgs: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855'], + result: txResult, + formattedResult: formattedTxResult, + call: 'eth_'+ method + 'ByHash' +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/web3.eth.getTransactionFromBlock.js b/web3.eth.getTransactionFromBlock.js new file mode 100644 index 000000000..7b59a3ba1 --- /dev/null +++ b/web3.eth.getTransactionFromBlock.js @@ -0,0 +1,52 @@ +var chai = require('chai'); +var web3 = require('../index'); +var BigNumber = require('bignumber.js'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getTransactionFromBlock'; + +var txResult = { + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": "0x15df", + "transactionIndex": "0x1", + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value":"0x7f110", + "gas": "0x7f110", + "gasPrice":"0x09184e72a000", + "input":"0x603880600c6000396000f30060" +}; +var formattedTxResult = { + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": 5599, + "transactionIndex": 1, + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value": new BigNumber(520464), + "gas": 520464, + "gasPrice": new BigNumber(10000000000000), + "input":"0x603880600c6000396000f30060" +}; + +var tests = [{ + args: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855', 2], + formattedArgs: ['0x2dbab4c0612bf9caf4c195085547dc0612bf9caf4c1950855', '0x2'], + result: txResult, + formattedResult: formattedTxResult, + call: 'eth_getTransactionByBlockHashAndIndex' +},{ + args: [436, 11], + formattedArgs: ['0x1b4', '0xb'], + result: txResult, + formattedResult: formattedTxResult, + call: 'eth_getTransactionByBlockNumberAndIndex' +}]; + +testMethod.runTests('eth', method, tests); + diff --git a/web3.eth.getUncle.js b/web3.eth.getUncle.js new file mode 100644 index 000000000..111865355 --- /dev/null +++ b/web3.eth.getUncle.js @@ -0,0 +1,139 @@ +var chai = require('chai'); +var web3 = require('../index'); +var BigNumber = require('bignumber.js'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'getUncle'; + +var blockResult = { + "number": "0x1b4", + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": "0x027f07", + "totalDifficulty": "0x027f07", + "size": "0x027f07", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x9f759", + "minGasPrice": "0x9f759", + "gasUsed": "0x9f759", + "timestamp": "0x54e34e8e", + "transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var formattedBlockResult = { + "number": 436, + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": new BigNumber(163591), + "totalDifficulty": new BigNumber(163591), + "size": 163591, + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": 653145, + "minGasPrice": new BigNumber(653145), + "gasUsed": 653145, + "timestamp": 1424182926, + "transactions": ['0x460cfb8472af2c5fd05b5a2','0x460cfb8472af2c5fd05b5a2'], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var blockResultWithTx = { + "number": "0x1b4", + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": "0x027f07", + "totalDifficulty": "0x027f07", + "size": "0x027f07", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x9f759", + "minGasPrice": "0x9f759", + "gasUsed": "0x9f759", + "timestamp": "0x54e34e8e", + "transactions": [{ + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": "0x15df", + "transactionIndex": "0x1", + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value":"0x7f110", + "gas": "0x7f110", + "gasPrice":"0x09184e72a000", + "input":"0x603880600c6000396000f30060", + }], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; +var formattedBlockResultWithTx = { + "number": 436, + "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5", + "nonce": "0xe04d296d2460cfb8472af2c5fd05b5a214109c25688d3704aed5484f9a7792f2", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331", + "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff", + "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a", + "difficulty": new BigNumber(163591), + "totalDifficulty": new BigNumber(163591), + "size": 163591, + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": 653145, + "minGasPrice": new BigNumber(653145), + "gasUsed": 653145, + "timestamp": 1424182926, + "transactions": [{ + "status": "mined", + "hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b", + "nonce":"0x", + "blockHash": "0x6fd9e2a26ab", + "blockNumber": 5599, + "transactionIndex": 1, + "from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1", + "to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1", + "value": new BigNumber(520464), + "gas": 520464, + "gasPrice": new BigNumber(10000000000000), + "input":"0x603880600c6000396000f30060", + }], + "uncles": ["0x460cfb8472af2c5fd05b5a2", "0xd5460cfb8472af2c5fd05b5a2"] +}; + +var tests = [{ + args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2', false], + result: blockResult, + formattedResult: formattedBlockResult, + call: 'eth_getUncleByBlockHashAndIndex' +},{ + args: [436, 1], + formattedArgs: ['0x1b4', '0x1', false], + result: blockResult, + formattedResult: formattedBlockResult, + call: 'eth_getUncleByBlockNumberAndIndex' +},{ + args: [436, 1, true], + formattedArgs: ['0x1b4', '0x1', true], + result: blockResultWithTx, + formattedResult: formattedBlockResultWithTx, + call: 'eth_getUncleByBlockNumberAndIndex' +}]; + +testMethod.runTests('eth', method, tests); diff --git a/eth.methods.js b/web3.eth.methods.js similarity index 54% rename from eth.methods.js rename to web3.eth.methods.js index e1eea1ec4..8f9396866 100644 --- a/eth.methods.js +++ b/web3.eth.methods.js @@ -1,14 +1,14 @@ -var assert = require('assert'); +var chai = require('chai'); +var assert = chai.assert; var web3 = require('../index.js'); -var u = require('./test.utils.js'); +var u = require('./helpers/test.utils.js'); -describe('web3', function() { - describe('eth', function() { +describe('web3.eth', function() { + describe('methods', function() { u.methodExists(web3.eth, 'getBalance'); u.methodExists(web3.eth, 'getStorageAt'); - u.methodExists(web3.eth, 'getStorage'); u.methodExists(web3.eth, 'getTransactionCount'); - u.methodExists(web3.eth, 'getData'); + u.methodExists(web3.eth, 'getCode'); u.methodExists(web3.eth, 'sendTransaction'); u.methodExists(web3.eth, 'call'); u.methodExists(web3.eth, 'getBlock'); @@ -30,30 +30,5 @@ describe('web3', function() { u.propertyExists(web3.eth, 'defaultBlock'); u.propertyExists(web3.eth, 'blockNumber'); }); - - // Fail at the moment - // describe('eth', function(){ - // it('should be a positive balance', function() { - // // when - // var testAddress = '0x50f4ed0e83f9da907017bcfb444e3e25407f59bb'; - // var balance = web3.eth.balanceAt(testAddress); - // // then - // assert(balance > 0, 'Balance is ' + balance); - // }); - - // it('should return a block', function() { - // // when - // var block = web3.eth.block(0); - - // // then - // assert.notEqual(block, null); - // assert.equal(block.number, 0); - // assert(web3.toDecimal(block.difficulty) > 0); - // }); - // }); }); - - - - diff --git a/web3.eth.mining.js b/web3.eth.mining.js new file mode 100644 index 000000000..2c111542c --- /dev/null +++ b/web3.eth.mining.js @@ -0,0 +1,38 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'mining'; + +var tests = [{ + result: true, + formattedResult: true, + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/web3.methods.js b/web3.methods.js index 92d4e1604..d37277f40 100644 --- a/web3.methods.js +++ b/web3.methods.js @@ -1,24 +1,24 @@ -var assert = require('assert'); var web3 = require('../index.js'); -var u = require('./test.utils.js'); +var u = require('./helpers/test.utils.js'); describe('web3', function() { - u.methodExists(web3, 'sha3'); - u.methodExists(web3, 'toAscii'); - u.methodExists(web3, 'fromAscii'); - u.methodExists(web3, 'toDecimal'); - u.methodExists(web3, 'fromDecimal'); - u.methodExists(web3, 'fromWei'); - u.methodExists(web3, 'toWei'); - u.methodExists(web3, 'toBigNumber'); - u.methodExists(web3, 'isAddress'); - u.methodExists(web3, 'setProvider'); - u.methodExists(web3, 'reset'); + describe('methods', function () { + u.methodExists(web3, 'sha3'); + u.methodExists(web3, 'toAscii'); + u.methodExists(web3, 'fromAscii'); + u.methodExists(web3, 'toDecimal'); + u.methodExists(web3, 'fromDecimal'); + u.methodExists(web3, 'fromWei'); + u.methodExists(web3, 'toWei'); + u.methodExists(web3, 'toBigNumber'); + u.methodExists(web3, 'isAddress'); + u.methodExists(web3, 'setProvider'); + u.methodExists(web3, 'reset'); - u.propertyExists(web3, 'manager'); - u.propertyExists(web3, 'providers'); - u.propertyExists(web3, 'eth'); - u.propertyExists(web3, 'db'); - u.propertyExists(web3, 'shh'); + u.propertyExists(web3, 'providers'); + u.propertyExists(web3, 'eth'); + u.propertyExists(web3, 'db'); + u.propertyExists(web3, 'shh'); + }); }); diff --git a/web3.net.listening.js b/web3.net.listening.js new file mode 100644 index 000000000..38b2c8763 --- /dev/null +++ b/web3.net.listening.js @@ -0,0 +1,38 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'listening'; + +var tests = [{ + result: true, + formattedResult: true, + call: 'net_'+ method +}]; + +describe('web3.net', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.net[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/web3.net.methods.js b/web3.net.methods.js new file mode 100644 index 000000000..97fddaa12 --- /dev/null +++ b/web3.net.methods.js @@ -0,0 +1,11 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index.js'); +var u = require('./helpers/test.utils.js'); + +describe('web3.net', function() { + describe('methods', function() { + u.propertyExists(web3.net, 'listening'); + u.propertyExists(web3.net, 'peerCount'); + }); +}); diff --git a/web3.net.peerCount.js b/web3.net.peerCount.js new file mode 100644 index 000000000..eb226892a --- /dev/null +++ b/web3.net.peerCount.js @@ -0,0 +1,38 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'peerCount'; + +var tests = [{ + result: '0xf', + formattedResult: 15, + call: 'net_'+ method +}]; + +describe('web3.net', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.net[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/web3.sha3.js b/web3.sha3.js new file mode 100644 index 000000000..0ae104962 --- /dev/null +++ b/web3.sha3.js @@ -0,0 +1,16 @@ +var BigNumber = require('bignumber.js'); +var web3 = require('../index'); +var testMethod = require('./helpers/test.method.js'); + +var method = 'sha3'; + +var tests = [{ + args: ['myString'], + formattedArgs: ['myString'], + result: '0x319319f831983198319881', + formattedResult: '0x319319f831983198319881', + call: 'web3_'+ method +}]; + +testMethod.runTests(null, method, tests); + diff --git a/shh.methods.js b/web3.shh.methods.js similarity index 65% rename from shh.methods.js rename to web3.shh.methods.js index f8501d527..fc20e1d1c 100644 --- a/shh.methods.js +++ b/web3.shh.methods.js @@ -1,9 +1,10 @@ -var assert = require('assert'); +var chai = require('chai'); +var assert = chai.assert; var web3 = require('../index.js'); -var u = require('./test.utils.js'); +var u = require('./helpers/test.utils.js'); -describe('web3', function() { - describe('shh', function() { +describe('web3.shh', function() { + describe('methods', function() { u.methodExists(web3.shh, 'post'); u.methodExists(web3.shh, 'newIdentity'); u.methodExists(web3.shh, 'hasIdentity'); From c01c07e3112b070a47be366fd057a8874eb95645 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 7 Apr 2015 14:03:57 +0200 Subject: [PATCH 03/45] Retain more gas for the case that the called contract is not yet created. --- SolidityEndToEndTest.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index b169263da..5d6386cca 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -1414,8 +1414,6 @@ BOOST_AUTO_TEST_CASE(sha3) testSolidityAgainstCpp("a(bytes32)", f, u256(-1)); } -#ifdef PRECOMPILED_CONTRACTS_GAS_FIXED_IN_SOLIDITY - BOOST_AUTO_TEST_CASE(sha256) { char const* sourceCode = "contract test {\n" @@ -3631,5 +3629,3 @@ BOOST_AUTO_TEST_SUITE_END() } } } // end namespaces - -#endif From 4c656af3ec922c8db8a254d2e4a9880e9779106b Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 27 Mar 2015 20:59:49 +0100 Subject: [PATCH 04/45] SHA3 optimizations. --- SolidityOptimizer.cpp | 168 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 165 insertions(+), 3 deletions(-) diff --git a/SolidityOptimizer.cpp b/SolidityOptimizer.cpp index 4fedd642d..ca72f4fe1 100644 --- a/SolidityOptimizer.cpp +++ b/SolidityOptimizer.cpp @@ -56,8 +56,16 @@ public: m_nonOptimizedContract = m_contractAddress; m_optimize = true; bytes optimizedBytecode = compileAndRun(_sourceCode, _value, _contractName); + size_t nonOptimizedSize = 0; + eth::eachInstruction(nonOptimizedBytecode, [&](Instruction, u256 const&) { + nonOptimizedSize++; + }); + size_t optimizedSize = 0; + eth::eachInstruction(optimizedBytecode, [&](Instruction, u256 const&) { + optimizedSize++; + }); BOOST_CHECK_MESSAGE( - nonOptimizedBytecode.size() > optimizedBytecode.size(), + nonOptimizedSize > optimizedSize, "Optimizer did not reduce bytecode size." ); m_optimizedContract = m_contractAddress; @@ -75,11 +83,16 @@ public: "\nOptimized: " + toHex(optimizedOutput)); } - void checkCSE(AssemblyItems const& _input, AssemblyItems const& _expectation) + AssemblyItems getCSE(AssemblyItems const& _input) { eth::CommonSubexpressionEliminator cse; BOOST_REQUIRE(cse.feedItems(_input.begin(), _input.end()) == _input.end()); - AssemblyItems output = cse.getOptimizedItems(); + return cse.getOptimizedItems(); + } + + void checkCSE(AssemblyItems const& _input, AssemblyItems const& _expectation) + { + AssemblyItems output = getCSE(_input); BOOST_CHECK_EQUAL_COLLECTIONS(_expectation.begin(), _expectation.end(), output.begin(), output.end()); } @@ -569,6 +582,155 @@ BOOST_AUTO_TEST_CASE(cse_jumpi_jump) }); } +BOOST_AUTO_TEST_CASE(cse_empty_sha3) +{ + AssemblyItems input{ + u256(0), + Instruction::DUP2, + Instruction::SHA3 + }; + checkCSE(input, { + u256(sha3(bytesConstRef())) + }); +} + +BOOST_AUTO_TEST_CASE(cse_partial_sha3) +{ + AssemblyItems input{ + u256(0xabcd) << (256 - 16), + u256(0), + Instruction::MSTORE, + u256(2), + u256(0), + Instruction::SHA3 + }; + checkCSE(input, { + u256(0xabcd) << (256 - 16), + u256(0), + Instruction::MSTORE, + u256(sha3(bytes{0xab, 0xcd})) + }); +} + +BOOST_AUTO_TEST_CASE(cse_sha3_twice_same_location) +{ + // sha3 twice from same dynamic location + AssemblyItems input{ + Instruction::DUP2, + Instruction::DUP1, + Instruction::MSTORE, + u256(64), + Instruction::DUP2, + Instruction::SHA3, + u256(64), + Instruction::DUP3, + Instruction::SHA3 + }; + checkCSE(input, { + Instruction::DUP2, + Instruction::DUP1, + Instruction::MSTORE, + u256(64), + Instruction::DUP2, + Instruction::SHA3, + Instruction::DUP1 + }); +} + +BOOST_AUTO_TEST_CASE(cse_sha3_twice_same_content) +{ + // sha3 twice from different dynamic location but with same content + AssemblyItems input{ + Instruction::DUP1, + u256(0x80), + Instruction::MSTORE, // m[128] = DUP1 + u256(0x20), + u256(0x80), + Instruction::SHA3, // sha3(m[128..(128+32)]) + Instruction::DUP2, + u256(12), + Instruction::MSTORE, // m[12] = DUP1 + u256(0x20), + u256(12), + Instruction::SHA3 // sha3(m[12..(12+32)]) + }; + checkCSE(input, { + u256(0x80), + Instruction::DUP2, + Instruction::DUP2, + Instruction::MSTORE, + u256(0x20), + Instruction::SWAP1, + Instruction::SHA3, + u256(12), + Instruction::DUP3, + Instruction::SWAP1, + Instruction::MSTORE, + Instruction::DUP1 + }); +} + +BOOST_AUTO_TEST_CASE(cse_sha3_twice_same_content_dynamic_store_in_between) +{ + // sha3 twice from different dynamic location but with same content, + // dynamic mstore in between, which forces us to re-calculate the sha3 + AssemblyItems input{ + u256(0x80), + Instruction::DUP2, + Instruction::DUP2, + Instruction::MSTORE, // m[128] = DUP1 + u256(0x20), + Instruction::DUP1, + Instruction::DUP3, + Instruction::SHA3, // sha3(m[128..(128+32)]) + u256(12), + Instruction::DUP5, + Instruction::DUP2, + Instruction::MSTORE, // m[12] = DUP1 + Instruction::DUP12, + Instruction::DUP14, + Instruction::MSTORE, // destroys memory knowledge + Instruction::SWAP2, + Instruction::SWAP1, + Instruction::SWAP2, + Instruction::SHA3 // sha3(m[12..(12+32)]) + }; + checkCSE(input, input); +} + +BOOST_AUTO_TEST_CASE(cse_sha3_twice_same_content_noninterfering_store_in_between) +{ + // sha3 twice from different dynamic location but with same content, + // dynamic mstore in between, but does not force us to re-calculate the sha3 + AssemblyItems input{ + u256(0x80), + Instruction::DUP2, + Instruction::DUP2, + Instruction::MSTORE, // m[128] = DUP1 + u256(0x20), + Instruction::DUP1, + Instruction::DUP3, + Instruction::SHA3, // sha3(m[128..(128+32)]) + u256(12), + Instruction::DUP5, + Instruction::DUP2, + Instruction::MSTORE, // m[12] = DUP1 + Instruction::DUP12, + u256(12 + 32), + Instruction::MSTORE, // does not destoy memory knowledge + Instruction::DUP13, + u256(128 - 32), + Instruction::MSTORE, // does not destoy memory knowledge + u256(0x20), + u256(12), + Instruction::SHA3 // sha3(m[12..(12+32)]) + }; + // if this changes too often, only count the number of SHA3 and MSTORE instructions + AssemblyItems output = getCSE(input); + BOOST_CHECK_EQUAL(4, count(output.begin(), output.end(), AssemblyItem(Instruction::MSTORE))); + BOOST_CHECK_EQUAL(1, count(output.begin(), output.end(), AssemblyItem(Instruction::SHA3))); +} + BOOST_AUTO_TEST_SUITE_END() } From 68b61432aea5f99f179b74f5a7a63138a5d2b09a Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 7 Apr 2015 16:33:13 +0200 Subject: [PATCH 05/45] Typos and docs. --- SolidityOptimizer.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/SolidityOptimizer.cpp b/SolidityOptimizer.cpp index ca72f4fe1..f523847f1 100644 --- a/SolidityOptimizer.cpp +++ b/SolidityOptimizer.cpp @@ -715,15 +715,15 @@ BOOST_AUTO_TEST_CASE(cse_sha3_twice_same_content_noninterfering_store_in_between Instruction::DUP5, Instruction::DUP2, Instruction::MSTORE, // m[12] = DUP1 - Instruction::DUP12, - u256(12 + 32), - Instruction::MSTORE, // does not destoy memory knowledge - Instruction::DUP13, - u256(128 - 32), - Instruction::MSTORE, // does not destoy memory knowledge - u256(0x20), - u256(12), - Instruction::SHA3 // sha3(m[12..(12+32)]) + Instruction::DUP12, + u256(12 + 32), + Instruction::MSTORE, // does not destoy memory knowledge + Instruction::DUP13, + u256(128 - 32), + Instruction::MSTORE, // does not destoy memory knowledge + u256(0x20), + u256(12), + Instruction::SHA3 // sha3(m[12..(12+32)]) }; // if this changes too often, only count the number of SHA3 and MSTORE instructions AssemblyItems output = getCSE(input); From a14cada9dd81a263a6af2c299507f1aa9c913807 Mon Sep 17 00:00:00 2001 From: winsvega Date: Tue, 24 Mar 2015 21:36:04 +0300 Subject: [PATCH 06/45] State Test Expected state check when filling test --- TestHelper.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++++++++-- TestHelper.h | 2 ++ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index dd7c09eab..a9913c28a 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -76,7 +76,9 @@ ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller): m_TestObject(_o) { importEnv(_o["env"].get_obj()); - importState(_o["pre"].get_obj(), m_statePre); + importState(_o["pre"].get_obj(), m_statePre); + if (_o.count("expect") > 0) + importState(_o["expect"].get_obj(), m_stateExpect); importTransaction(_o["transaction"].get_obj()); if (!isFiller) @@ -176,6 +178,64 @@ void ImportTest::importTransaction(json_spirit::mObject& _o) } } +void ImportTest::checkFillTest(State const& _statePost) +{ + //TestNet Addresses + static Addresses testNetAddressList; + testNetAddressList.push_back(Address("0000000000000000000000000000000000000001")); + testNetAddressList.push_back(Address("0000000000000000000000000000000000000002")); + testNetAddressList.push_back(Address("0000000000000000000000000000000000000003")); + testNetAddressList.push_back(Address("0000000000000000000000000000000000000004")); + testNetAddressList.push_back(Address("1a26338f0d905e295fccb71fa9ea849ffa12aaf4")); + testNetAddressList.push_back(Address("2ef47100e0787b915105fd5e3f4ff6752079d5cb")); + testNetAddressList.push_back(Address("6c386a4b26f73c802f34673f7248bb118f97424a")); + testNetAddressList.push_back(Address("b9c015918bdaba24b4ff057a92a3873d6eb201be")); + testNetAddressList.push_back(Address("cd2a3d9f938e13cd947ec05abc7fe734df8dd826")); + testNetAddressList.push_back(Address("dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6")); + testNetAddressList.push_back(Address("e4157b34ea9615cfbde6b4fda419828124b70c78")); + testNetAddressList.push_back(Address("e6716f9544a56c530d868e4bfbacb172315bdead")); + + if (m_TestObject.find("expect") != m_TestObject.end()) + { + for (auto const& a: m_stateExpect.addresses()) + { + bool bFound = false; //do not count default addresses as it's not in addressInUse + for (auto const& it: testNetAddressList) + { + if (it == a.first) + { + bFound = true; + break; + } + } + + if (bFound) + continue; + + BOOST_CHECK_MESSAGE(_statePost.addressInUse(a.first), "Filling Test Error: " << a.first << " expected address not in use!"); + if (_statePost.addressInUse(a.first)) + { + BOOST_CHECK_MESSAGE(m_stateExpect.balance(a.first) == _statePost.balance(a.first), + "Filling Test Error: " << a.first << ": incorrect balance " << _statePost.balance(a.first) << ", expected " << m_stateExpect.balance(a.first)); + BOOST_CHECK_MESSAGE(m_stateExpect.transactionsFrom(a.first) == _statePost.transactionsFrom(a.first), + "Filling Test Error: " << a.first << ": incorrect nonce " << _statePost.transactionsFrom(a.first) << ", expected " << m_stateExpect.transactionsFrom(a.first)); + + map stateStorage = _statePost.storage(a.first); + for (auto const& s: m_stateExpect.storage(a.first)) + { + BOOST_CHECK_MESSAGE(stateStorage[s.first] == s.second, + "Filling Test Error: " << a.first << ": incorrect storage [" << s.first << "] = " << toHex(stateStorage[s.first]) << ", expected [" << s.first << "] = " << toHex(s.second)); + } + + BOOST_CHECK_MESSAGE(m_stateExpect.code(a.first) == _statePost.code(a.first), + "Filling Test Error: " << a.first << ": incorrect code '" << toHex(_statePost.code(a.first)) << "', expected '" << toHex(m_stateExpect.code(a.first)) << "'"); + } + } + + m_TestObject.erase(m_TestObject.find("expect")); + } +} + void ImportTest::exportTest(bytes const& _output, State const& _statePost) { // export output @@ -184,8 +244,10 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost) // export logs m_TestObject["logs"] = exportLog(_statePost.pending().size() ? _statePost.log(0) : LogEntries()); - // export post state + // compare expected state with post state + checkFillTest(_statePost); + // export post state m_TestObject["post"] = fillJsonWithState(_statePost); m_TestObject["postStateRoot"] = toHex(_statePost.rootHash().asBytes()); diff --git a/TestHelper.h b/TestHelper.h index 7f6d73365..d830ceb66 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -110,11 +110,13 @@ public: void exportTest(bytes const& _output, eth::State const& _statePost); eth::State m_statePre; + eth::State m_stateExpect; eth::State m_statePost; eth::ExtVMFace m_environment; eth::Transaction m_transaction; private: + void checkFillTest(eth::State const& _statePost); json_spirit::mObject& m_TestObject; }; From bfc4d2eceb44b07f1bbdb3b3418af39a89efc420 Mon Sep 17 00:00:00 2001 From: winsvega Date: Wed, 25 Mar 2015 15:47:28 +0300 Subject: [PATCH 07/45] Expect State Check state and vmtests --- TestHelper.cpp | 102 +++++++++++++++++++++++++------------------------ TestHelper.h | 5 +-- vm.cpp | 10 +++++ 3 files changed, 64 insertions(+), 53 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index a9913c28a..31672563b 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -76,9 +77,7 @@ ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller): m_TestObject(_o) { importEnv(_o["env"].get_obj()); - importState(_o["pre"].get_obj(), m_statePre); - if (_o.count("expect") > 0) - importState(_o["expect"].get_obj(), m_stateExpect); + importState(_o["pre"].get_obj(), m_statePre); importTransaction(_o["transaction"].get_obj()); if (!isFiller) @@ -178,62 +177,59 @@ void ImportTest::importTransaction(json_spirit::mObject& _o) } } -void ImportTest::checkFillTest(State const& _statePost) +bool ImportTest::compareStates(State const& _stateExpect, State const& _statePost) { //TestNet Addresses - static Addresses testNetAddressList; - testNetAddressList.push_back(Address("0000000000000000000000000000000000000001")); - testNetAddressList.push_back(Address("0000000000000000000000000000000000000002")); - testNetAddressList.push_back(Address("0000000000000000000000000000000000000003")); - testNetAddressList.push_back(Address("0000000000000000000000000000000000000004")); - testNetAddressList.push_back(Address("1a26338f0d905e295fccb71fa9ea849ffa12aaf4")); - testNetAddressList.push_back(Address("2ef47100e0787b915105fd5e3f4ff6752079d5cb")); - testNetAddressList.push_back(Address("6c386a4b26f73c802f34673f7248bb118f97424a")); - testNetAddressList.push_back(Address("b9c015918bdaba24b4ff057a92a3873d6eb201be")); - testNetAddressList.push_back(Address("cd2a3d9f938e13cd947ec05abc7fe734df8dd826")); - testNetAddressList.push_back(Address("dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6")); - testNetAddressList.push_back(Address("e4157b34ea9615cfbde6b4fda419828124b70c78")); - testNetAddressList.push_back(Address("e6716f9544a56c530d868e4bfbacb172315bdead")); + static Addresses testNetAddressList = boost::assign::list_of + (Address("0000000000000000000000000000000000000001")) + (Address("0000000000000000000000000000000000000002")) + (Address("0000000000000000000000000000000000000003")) + (Address("0000000000000000000000000000000000000004")) + (Address("1a26338f0d905e295fccb71fa9ea849ffa12aaf4")) + (Address("2ef47100e0787b915105fd5e3f4ff6752079d5cb")) + (Address("6c386a4b26f73c802f34673f7248bb118f97424a")) + (Address("b9c015918bdaba24b4ff057a92a3873d6eb201be")) + (Address("cd2a3d9f938e13cd947ec05abc7fe734df8dd826")) + (Address("dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6")) + (Address("e4157b34ea9615cfbde6b4fda419828124b70c78")) + (Address("e6716f9544a56c530d868e4bfbacb172315bdead")); - if (m_TestObject.find("expect") != m_TestObject.end()) + for (auto const& a: _stateExpect.addresses()) { - for (auto const& a: m_stateExpect.addresses()) + bool bFound = false; //do not count default addresses as it's not in addressInUse + for (auto const& it: testNetAddressList) { - bool bFound = false; //do not count default addresses as it's not in addressInUse - for (auto const& it: testNetAddressList) + if (it == a.first) { - if (it == a.first) - { - bFound = true; - break; - } - } - - if (bFound) - continue; - - BOOST_CHECK_MESSAGE(_statePost.addressInUse(a.first), "Filling Test Error: " << a.first << " expected address not in use!"); - if (_statePost.addressInUse(a.first)) - { - BOOST_CHECK_MESSAGE(m_stateExpect.balance(a.first) == _statePost.balance(a.first), - "Filling Test Error: " << a.first << ": incorrect balance " << _statePost.balance(a.first) << ", expected " << m_stateExpect.balance(a.first)); - BOOST_CHECK_MESSAGE(m_stateExpect.transactionsFrom(a.first) == _statePost.transactionsFrom(a.first), - "Filling Test Error: " << a.first << ": incorrect nonce " << _statePost.transactionsFrom(a.first) << ", expected " << m_stateExpect.transactionsFrom(a.first)); - - map stateStorage = _statePost.storage(a.first); - for (auto const& s: m_stateExpect.storage(a.first)) - { - BOOST_CHECK_MESSAGE(stateStorage[s.first] == s.second, - "Filling Test Error: " << a.first << ": incorrect storage [" << s.first << "] = " << toHex(stateStorage[s.first]) << ", expected [" << s.first << "] = " << toHex(s.second)); - } - - BOOST_CHECK_MESSAGE(m_stateExpect.code(a.first) == _statePost.code(a.first), - "Filling Test Error: " << a.first << ": incorrect code '" << toHex(_statePost.code(a.first)) << "', expected '" << toHex(m_stateExpect.code(a.first)) << "'"); + bFound = true; + break; } } - m_TestObject.erase(m_TestObject.find("expect")); + if (bFound) + continue; + + BOOST_CHECK_MESSAGE(_statePost.addressInUse(a.first), "Filling Test Error: " << a.first << " expected address not in use!"); + if (_statePost.addressInUse(a.first)) + { + BOOST_CHECK_MESSAGE(_stateExpect.balance(a.first) == _statePost.balance(a.first), + "Filling Test Error: " << a.first << ": incorrect balance " << _statePost.balance(a.first) << ", expected " << _stateExpect.balance(a.first)); + BOOST_CHECK_MESSAGE(_stateExpect.transactionsFrom(a.first) == _statePost.transactionsFrom(a.first), + "Filling Test Error: " << a.first << ": incorrect nonce " << _statePost.transactionsFrom(a.first) << ", expected " << _stateExpect.transactionsFrom(a.first)); + + map stateStorage = _statePost.storage(a.first); + for (auto const& s: _stateExpect.storage(a.first)) + { + BOOST_CHECK_MESSAGE(stateStorage[s.first] == s.second, + "Filling Test Error: " << a.first << ": incorrect storage [" << s.first << "] = " << toHex(stateStorage[s.first]) << ", expected [" << s.first << "] = " << toHex(s.second)); + } + + BOOST_CHECK_MESSAGE(_stateExpect.code(a.first) == _statePost.code(a.first), + "Filling Test Error: " << a.first << ": incorrect code '" << toHex(_statePost.code(a.first)) << "', expected '" << toHex(_stateExpect.code(a.first)) << "'"); + } } + + return true; } void ImportTest::exportTest(bytes const& _output, State const& _statePost) @@ -245,7 +241,13 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost) m_TestObject["logs"] = exportLog(_statePost.pending().size() ? _statePost.log(0) : LogEntries()); // compare expected state with post state - checkFillTest(_statePost); + if (m_TestObject.count("expect") > 0) + { + State expectState; + importState(m_TestObject["expect"].get_obj(), expectState); + compareStates(expectState, _statePost); + m_TestObject.erase(m_TestObject.find("expect")); + } // export post state m_TestObject["post"] = fillJsonWithState(_statePost); diff --git a/TestHelper.h b/TestHelper.h index d830ceb66..4e205378d 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -105,18 +105,17 @@ public: ImportTest(json_spirit::mObject& _o, bool isFiller); // imports void importEnv(json_spirit::mObject& _o); - void importState(json_spirit::mObject& _o, eth::State& _state); + static void importState(json_spirit::mObject& _o, eth::State& _state); void importTransaction(json_spirit::mObject& _o); void exportTest(bytes const& _output, eth::State const& _statePost); + static bool compareStates(eth::State const& _stateExpect, eth::State const& _statePost); eth::State m_statePre; - eth::State m_stateExpect; eth::State m_statePost; eth::ExtVMFace m_environment; eth::Transaction m_transaction; private: - void checkFillTest(eth::State const& _statePost); json_spirit::mObject& m_TestObject; }; diff --git a/vm.cpp b/vm.cpp index ff8903523..4c1874cb9 100644 --- a/vm.cpp +++ b/vm.cpp @@ -388,6 +388,16 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) if (!vmExceptionOccured) { o["post"] = mValue(fev.exportState()); + + if (o.count("expect") > 0) + { + State postState, expectState; + ImportTest::importState(o["post"].get_obj(), postState); + ImportTest::importState(o["expect"].get_obj(), expectState); + ImportTest::compareStates(expectState, postState); + o.erase(o.find("expect")); + } + o["callcreates"] = fev.exportCallCreates(); o["out"] = "0x" + toHex(output); fev.push(o, "gas", gas); From 7ed2db70a7ebaaa661f4fabf73f19d17dd5f8f51 Mon Sep 17 00:00:00 2001 From: winsvega Date: Wed, 25 Mar 2015 23:33:22 +0300 Subject: [PATCH 08/45] Expected State some test demo --- stInitCodeTestFiller.json | 369 +++++++++++++++++++++++++++++++++++- vmArithmeticTestFiller.json | 9 + 2 files changed, 374 insertions(+), 4 deletions(-) diff --git a/stInitCodeTestFiller.json b/stInitCodeTestFiller.json index 2c155468f..bcb5514fa 100644 --- a/stInitCodeTestFiller.json +++ b/stInitCodeTestFiller.json @@ -8,6 +8,22 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "32599", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "67401", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -30,7 +46,6 @@ } }, - "NotEnoughCashContractCreation" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -40,6 +55,15 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "22177", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -71,6 +95,15 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -101,6 +134,22 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "40000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -132,6 +181,29 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000000" : { + "balance" : "15", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "11198", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "88787", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -163,6 +235,29 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "22204", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "1", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "77795", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -194,6 +289,22 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "23000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "77000", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -225,6 +336,36 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1", + "code" : "0x602060006000f0", + "nonce" : "1", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "53016", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "946983", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { @@ -263,6 +404,39 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1", + "code" : "0x3060025560206000600039602060006000f0", + "nonce" : "41", + "storage" : { + "0x02" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" + } + }, + "1a4c83e1a9834cdc7e4a905ff7f0cf44aed73180" : { + "balance" : "0", + "code" : "0x", + "nonce" : "1", + "storage" : { + "0x02" : "0x1a4c83e1a9834cdc7e4a905ff7f0cf44aed73180" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "400000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "8e3411c91d5dd4081b4846fa2f93808f5ad19686" : { + "balance" : "0", + "code" : "0x", + "nonce" : "1", + "storage" : { + "0x02" : "0x8e3411c91d5dd4081b4846fa2f93808f5ad19686" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { @@ -301,6 +475,44 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1", + "code" : "0x6b600c600055602060406000f0600052600c60146000f0", + "nonce" : "1", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "105049", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "62c01474f089b07dae603491675dc5b5748f7049" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99894951", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "0", + "code" : "0x", + "nonce" : "1", + "storage" : { + "0x" : "0x0c" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { @@ -340,6 +552,45 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "998", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f06000556000600060006000600160005461c350f1", + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "133284", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "62c01474f089b07dae603491675dc5b5748f7049" : { + "balance" : "0", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99866716", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "2", + "code" : "0x602060406000f0", + "nonce" : "1", + "storage" : { + "0x" : "0x0c" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { @@ -380,6 +631,38 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "111", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f06000556000600060006000600c6000546000f1", + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "103566", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99896434", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "1", + "code" : "0x602060406000f0", + "nonce" : "0", + "storage" : { + "0x" : "0x0c" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { @@ -420,6 +703,29 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "0", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060006000546000f1", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "83139", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99916861", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { @@ -461,6 +767,38 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "999", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060006000546103e8f1", + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "95566", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99904434", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "1", + "code" : "0x602060406000f0", + "nonce" : "0", + "storage" : { + "0x" : "0x0c" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { @@ -468,7 +806,7 @@ "nonce": "0", "//": "(CREATE 0 64 32)", "//": "{[[0]] 12 (MSTORE 32 0x602060406000f0)(RETURN 57 7)}", - "code": "{(MSTORE 0 0x600c60005566602060406000f060205260076039f3)[[0]](CREATE 1 11 21)(CALL 100000 (SLOAD 0) 1 0 0 0 0)}", + "code": "{(MSTORE 0 0x600c60005566602060406000f060205260076039f3)[[0]](CREATE 1 11 21)(CALL 1000 (SLOAD 0) 0 0 0 0 0)}", "storage": {} }, @@ -483,7 +821,7 @@ "transaction" : { "data" : "0x00", - "gasLimit" : "1000000", + "gasLimit" : "203000", "gasPrice" : "1", "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -501,6 +839,29 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "10000", + "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b620186a0f0600055", + "nonce" : "0", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "58028", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99941972", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { @@ -584,7 +945,7 @@ { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "1000000", - "code" : "{(MSTORE 0 0x15)(CALL 7000 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 32 32 32) (RETURN 0 64)}", + "code" : "{(MSTORE 0 0x15)(CALL 7000 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 32 32 32) (SSTORE 0 (MLOAD 0 64))(RETURN 0 64)}", "nonce" : "0", "storage" : { } diff --git a/vmArithmeticTestFiller.json b/vmArithmeticTestFiller.json index 1af2964f6..7f5b1db52 100644 --- a/vmArithmeticTestFiller.json +++ b/vmArithmeticTestFiller.json @@ -8,6 +8,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "10000000000000000000", + "code" : "0x00", + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", From b0c8babf0e76ffa1fc5cb21642f3ac2fc3d1cb55 Mon Sep 17 00:00:00 2001 From: winsvega Date: Thu, 26 Mar 2015 03:12:25 +0300 Subject: [PATCH 09/45] Check State Refactoring --- TestHelper.cpp | 61 +++++++++++++++++--------------------------------- TestHelper.h | 3 ++- state.cpp | 16 +------------ vm.cpp | 27 +++++----------------- 4 files changed, 29 insertions(+), 78 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index 31672563b..ca7caf3d4 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -177,59 +177,35 @@ void ImportTest::importTransaction(json_spirit::mObject& _o) } } -bool ImportTest::compareStates(State const& _stateExpect, State const& _statePost) +void ImportTest::checkExpectedState(State const& _stateExpect, State const& _statePost, WhenError _throw) { - //TestNet Addresses - static Addresses testNetAddressList = boost::assign::list_of - (Address("0000000000000000000000000000000000000001")) - (Address("0000000000000000000000000000000000000002")) - (Address("0000000000000000000000000000000000000003")) - (Address("0000000000000000000000000000000000000004")) - (Address("1a26338f0d905e295fccb71fa9ea849ffa12aaf4")) - (Address("2ef47100e0787b915105fd5e3f4ff6752079d5cb")) - (Address("6c386a4b26f73c802f34673f7248bb118f97424a")) - (Address("b9c015918bdaba24b4ff057a92a3873d6eb201be")) - (Address("cd2a3d9f938e13cd947ec05abc7fe734df8dd826")) - (Address("dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6")) - (Address("e4157b34ea9615cfbde6b4fda419828124b70c78")) - (Address("e6716f9544a56c530d868e4bfbacb172315bdead")); + #define CHECK(a,b) \ + if (_throw == WhenError::Throw) \ + BOOST_CHECK_MESSAGE(a,b); \ + else \ + BOOST_WARN_MESSAGE(a,b); for (auto const& a: _stateExpect.addresses()) { - bool bFound = false; //do not count default addresses as it's not in addressInUse - for (auto const& it: testNetAddressList) - { - if (it == a.first) - { - bFound = true; - break; - } - } - - if (bFound) - continue; - - BOOST_CHECK_MESSAGE(_statePost.addressInUse(a.first), "Filling Test Error: " << a.first << " expected address not in use!"); + CHECK(_statePost.addressInUse(a.first), "Filling Test: " << a.first << " missing expected address!"); if (_statePost.addressInUse(a.first)) { - BOOST_CHECK_MESSAGE(_stateExpect.balance(a.first) == _statePost.balance(a.first), - "Filling Test Error: " << a.first << ": incorrect balance " << _statePost.balance(a.first) << ", expected " << _stateExpect.balance(a.first)); - BOOST_CHECK_MESSAGE(_stateExpect.transactionsFrom(a.first) == _statePost.transactionsFrom(a.first), - "Filling Test Error: " << a.first << ": incorrect nonce " << _statePost.transactionsFrom(a.first) << ", expected " << _stateExpect.transactionsFrom(a.first)); + CHECK(_stateExpect.balance(a.first) == _statePost.balance(a.first), + "Check State: " << a.first << ": incorrect balance " << _statePost.balance(a.first) << ", expected " << _stateExpect.balance(a.first)); + CHECK(_stateExpect.transactionsFrom(a.first) == _statePost.transactionsFrom(a.first), + "Check State: " << a.first << ": incorrect nonce " << _statePost.transactionsFrom(a.first) << ", expected " << _stateExpect.transactionsFrom(a.first)); map stateStorage = _statePost.storage(a.first); for (auto const& s: _stateExpect.storage(a.first)) { - BOOST_CHECK_MESSAGE(stateStorage[s.first] == s.second, - "Filling Test Error: " << a.first << ": incorrect storage [" << s.first << "] = " << toHex(stateStorage[s.first]) << ", expected [" << s.first << "] = " << toHex(s.second)); + CHECK(stateStorage[s.first] == s.second, + "Check State: " << a.first << ": incorrect storage [" << s.first << "] = " << toHex(stateStorage[s.first]) << ", expected [" << s.first << "] = " << toHex(s.second)); } - BOOST_CHECK_MESSAGE(_stateExpect.code(a.first) == _statePost.code(a.first), - "Filling Test Error: " << a.first << ": incorrect code '" << toHex(_statePost.code(a.first)) << "', expected '" << toHex(_stateExpect.code(a.first)) << "'"); + CHECK(_stateExpect.code(a.first) == _statePost.code(a.first), + "Check State: " << a.first << ": incorrect code '" << toHex(_statePost.code(a.first)) << "', expected '" << toHex(_stateExpect.code(a.first)) << "'"); } } - - return true; } void ImportTest::exportTest(bytes const& _output, State const& _statePost) @@ -243,9 +219,9 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost) // compare expected state with post state if (m_TestObject.count("expect") > 0) { - State expectState; + State expectState(Address(), OverlayDB(), eth::BaseState::Empty); importState(m_TestObject["expect"].get_obj(), expectState); - compareStates(expectState, _statePost); + checkExpectedState(expectState, _statePost, Options::get().checkState ? WhenError::Throw : WhenError::DontThrow); m_TestObject.erase(m_TestObject.find("expect")); } @@ -623,6 +599,8 @@ Options::Options() inputLimits = true; else if (arg == "--bigdata") bigData = true; + else if (arg == "--checkstate") + checkState = true; else if (arg == "--all") { performance = true; @@ -630,6 +608,7 @@ Options::Options() memory = true; inputLimits = true; bigData = true; + checkState = true; } } } diff --git a/TestHelper.h b/TestHelper.h index 4e205378d..b4002aebe 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -108,7 +108,7 @@ public: static void importState(json_spirit::mObject& _o, eth::State& _state); void importTransaction(json_spirit::mObject& _o); void exportTest(bytes const& _output, eth::State const& _statePost); - static bool compareStates(eth::State const& _stateExpect, eth::State const& _statePost); + static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, WhenError _throw = WhenError::Throw); eth::State m_statePre; eth::State m_statePost; @@ -166,6 +166,7 @@ public: bool fillTests = false; ///< Create JSON test files from execution results bool stats = false; ///< Execution time stats std::string statsOutFile; ///< Stats output file. "out" for standard output + bool checkState = false;///< Throw error when checking test states /// Test selection /// @{ diff --git a/state.cpp b/state.cpp index e4bf06bdc..813c3b4d7 100644 --- a/state.cpp +++ b/state.cpp @@ -91,23 +91,9 @@ void doStateTests(json_spirit::mValue& v, bool _fillin) // check addresses #if ETH_FATDB + ImportTest::checkExpectedState(importer.m_statePost, theState); auto expectedAddrs = importer.m_statePost.addresses(); auto resultAddrs = theState.addresses(); - for (auto& expectedPair : expectedAddrs) - { - auto& expectedAddr = expectedPair.first; - auto resultAddrIt = resultAddrs.find(expectedAddr); - if (resultAddrIt == resultAddrs.end()) - BOOST_ERROR("Missing expected address " << expectedAddr); - else - { - BOOST_CHECK_MESSAGE(importer.m_statePost.balance(expectedAddr) == theState.balance(expectedAddr), expectedAddr << ": incorrect balance " << theState.balance(expectedAddr) << ", expected " << importer.m_statePost.balance(expectedAddr)); - BOOST_CHECK_MESSAGE(importer.m_statePost.transactionsFrom(expectedAddr) == theState.transactionsFrom(expectedAddr), expectedAddr << ": incorrect txCount " << theState.transactionsFrom(expectedAddr) << ", expected " << importer.m_statePost.transactionsFrom(expectedAddr)); - BOOST_CHECK_MESSAGE(importer.m_statePost.code(expectedAddr) == theState.code(expectedAddr), expectedAddr << ": incorrect code"); - - checkStorage(importer.m_statePost.storage(expectedAddr), theState.storage(expectedAddr), expectedAddr); - } - } checkAddresses >(expectedAddrs, resultAddrs); #endif BOOST_CHECK_MESSAGE(theState.rootHash() == h256(o["postStateRoot"].get_str()), "wrong post state root"); diff --git a/vm.cpp b/vm.cpp index 4c1874cb9..b6ebece16 100644 --- a/vm.cpp +++ b/vm.cpp @@ -380,7 +380,6 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) } } - if (_fillin) { o["env"] = mValue(fev.exportEnv()); @@ -394,7 +393,7 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) State postState, expectState; ImportTest::importState(o["post"].get_obj(), postState); ImportTest::importState(o["expect"].get_obj(), expectState); - ImportTest::compareStates(expectState, postState); + ImportTest::checkExpectedState(expectState, postState, Options::get().checkState ? WhenError::Throw : WhenError::DontThrow); o.erase(o.find("expect")); } @@ -425,25 +424,11 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) BOOST_CHECK_EQUAL(toInt(o["gas"]), gas); - auto& expectedAddrs = test.addresses; - auto& resultAddrs = fev.addresses; - for (auto&& expectedPair : expectedAddrs) - { - auto& expectedAddr = expectedPair.first; - auto resultAddrIt = resultAddrs.find(expectedAddr); - if (resultAddrIt == resultAddrs.end()) - BOOST_ERROR("Missing expected address " << expectedAddr); - else - { - auto& expectedState = expectedPair.second; - auto& resultState = resultAddrIt->second; - BOOST_CHECK_MESSAGE(std::get<0>(expectedState) == std::get<0>(resultState), expectedAddr << ": incorrect balance " << std::get<0>(resultState) << ", expected " << std::get<0>(expectedState)); - BOOST_CHECK_MESSAGE(std::get<1>(expectedState) == std::get<1>(resultState), expectedAddr << ": incorrect txCount " << std::get<1>(resultState) << ", expected " << std::get<1>(expectedState)); - BOOST_CHECK_MESSAGE(std::get<3>(expectedState) == std::get<3>(resultState), expectedAddr << ": incorrect code"); - - checkStorage(std::get<2>(expectedState), std::get<2>(resultState), expectedAddr); - } - } + State postState, expectState; + mObject mPostState = fev.exportState(); + ImportTest::importState(mPostState, postState); + ImportTest::importState(o["post"].get_obj(), expectState); + ImportTest::checkExpectedState(expectState, postState); checkAddresses, bytes> > >(test.addresses, fev.addresses); From adba4fb9a136ec27d6fc3e295c43a6f0f04ae865 Mon Sep 17 00:00:00 2001 From: winsvega Date: Fri, 27 Mar 2015 01:05:45 +0300 Subject: [PATCH 10/45] Check State Incomplete State Support --- TestHelper.cpp | 124 +++++++++++++++++++++++++++++++++++++------------ TestHelper.h | 14 ++++++ 2 files changed, 108 insertions(+), 30 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index ca7caf3d4..a830636de 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -107,41 +106,72 @@ void ImportTest::importEnv(json_spirit::mObject& _o) m_statePre.m_currentBlock = m_environment.currentBlock; } -void ImportTest::importState(json_spirit::mObject& _o, State& _state) +// import state from not fully declared json_spirit::mObject, writing to _stateOptionsMap which fields were defined in json + +void ImportTest::importState(json_spirit::mObject& _o, State& _state, stateOptionsMap& _stateOptionsMap) { for (auto& i: _o) { json_spirit::mObject o = i.second.get_obj(); - assert(o.count("balance") > 0); - assert(o.count("nonce") > 0); - assert(o.count("storage") > 0); - assert(o.count("code") > 0); + ImportStateOptions stateOptions; + u256 iBalance = 0, iNonce = 0; - if (bigint(o["balance"].get_str()) >= c_max256plus1) - BOOST_THROW_EXCEPTION(ValueTooLarge() << errinfo_comment("State 'balance' is equal or greater than 2**256") ); - if (bigint(o["nonce"].get_str()) >= c_max256plus1) - BOOST_THROW_EXCEPTION(ValueTooLarge() << errinfo_comment("State 'nonce' is equal or greater than 2**256") ); + if (o.count("balance") > 0) + { + stateOptions.m_bHasBalance = true; + if (bigint(o["balance"].get_str()) >= c_max256plus1) + BOOST_THROW_EXCEPTION(ValueTooLarge() << errinfo_comment("State 'balance' is equal or greater than 2**256") ); + iBalance = toInt(o["balance"]); + } + + if (o.count("nonce") > 0) + { + stateOptions.m_bHasNonce = true; + if (bigint(o["nonce"].get_str()) >= c_max256plus1) + BOOST_THROW_EXCEPTION(ValueTooLarge() << errinfo_comment("State 'nonce' is equal or greater than 2**256") ); + iNonce = toInt(o["nonce"]); + } Address address = Address(i.first); - bytes code = importCode(o); + bytes code; + if (o.count("code") > 0) + { + code = importCode(o); + stateOptions.m_bHasCode = true; + } if (code.size()) { - _state.m_cache[address] = Account(toInt(o["balance"]), Account::ContractConception); + _state.m_cache[address] = Account(iBalance, Account::ContractConception); _state.m_cache[address].setCode(code); } else - _state.m_cache[address] = Account(toInt(o["balance"]), Account::NormalCreation); + _state.m_cache[address] = Account(iBalance, Account::NormalCreation); - for (auto const& j: o["storage"].get_obj()) - _state.setStorage(address, toInt(j.first), toInt(j.second)); + if (o.count("storage") > 0) + { + stateOptions.m_bHasStorage = true; + for (auto const& j: o["storage"].get_obj()) + _state.setStorage(address, toInt(j.first), toInt(j.second)); + } - for(int i=0; i stateStorage = _statePost.storage(a.first); - for (auto const& s: _stateExpect.storage(a.first)) + ImportStateOptions addressOptions(true); + if(_expectedStateOptions.size()) { - CHECK(stateStorage[s.first] == s.second, - "Check State: " << a.first << ": incorrect storage [" << s.first << "] = " << toHex(stateStorage[s.first]) << ", expected [" << s.first << "] = " << toHex(s.second)); + try + { + addressOptions = _expectedStateOptions.at(a.first); + } + catch(std::out_of_range) + { + BOOST_ERROR("expectedStateOptions map does not match expectedState in checkExpectedState!"); + break; + } } - CHECK(_stateExpect.code(a.first) == _statePost.code(a.first), - "Check State: " << a.first << ": incorrect code '" << toHex(_statePost.code(a.first)) << "', expected '" << toHex(_stateExpect.code(a.first)) << "'"); + if (addressOptions.m_bHasBalance) + { + CHECK(_stateExpect.balance(a.first) == _statePost.balance(a.first), + "Check State: " << a.first << ": incorrect balance " << _statePost.balance(a.first) << ", expected " << _stateExpect.balance(a.first)); + } + + if (addressOptions.m_bHasNonce) + { + CHECK(_stateExpect.transactionsFrom(a.first) == _statePost.transactionsFrom(a.first), + "Check State: " << a.first << ": incorrect nonce " << _statePost.transactionsFrom(a.first) << ", expected " << _stateExpect.transactionsFrom(a.first)); + } + + if (addressOptions.m_bHasStorage) + { + map stateStorage = _statePost.storage(a.first); + for (auto const& s: _stateExpect.storage(a.first)) + { + CHECK(stateStorage[s.first] == s.second, + "Check State: " << a.first << ": incorrect storage [" << s.first << "] = " << toHex(stateStorage[s.first]) << ", expected [" << s.first << "] = " << toHex(s.second)); + } + } + + if (addressOptions.m_bHasCode) + { + CHECK(_stateExpect.code(a.first) == _statePost.code(a.first), + "Check State: " << a.first << ": incorrect code '" << toHex(_statePost.code(a.first)) << "', expected '" << toHex(_stateExpect.code(a.first)) << "'"); + } } } } @@ -219,9 +282,10 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost) // compare expected state with post state if (m_TestObject.count("expect") > 0) { - State expectState(Address(), OverlayDB(), eth::BaseState::Empty); - importState(m_TestObject["expect"].get_obj(), expectState); - checkExpectedState(expectState, _statePost, Options::get().checkState ? WhenError::Throw : WhenError::DontThrow); + stateOptionsMap stateMap; + State expectState(Address(), OverlayDB(), eth::BaseState::Empty); + importState(m_TestObject["expect"].get_obj(), expectState, stateMap); + checkExpectedState(expectState, _statePost, stateMap, Options::get().checkState ? WhenError::Throw : WhenError::DontThrow); m_TestObject.erase(m_TestObject.find("expect")); } diff --git a/TestHelper.h b/TestHelper.h index b4002aebe..81251649a 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -97,6 +97,17 @@ namespace test } \ while (0) +struct ImportStateOptions +{ + ImportStateOptions():m_bHasBalance(false), m_bHasNonce(false), m_bHasCode(false), m_bHasStorage(false) {} + ImportStateOptions(bool _bSetAll):m_bHasBalance(_bSetAll), m_bHasNonce(_bSetAll), m_bHasCode(_bSetAll), m_bHasStorage(_bSetAll) {} + bool isAllSet() {return m_bHasBalance && m_bHasNonce && m_bHasCode && m_bHasStorage;} + bool m_bHasBalance; + bool m_bHasNonce; + bool m_bHasCode; + bool m_bHasStorage; +}; +typedef std::map stateOptionsMap; class ImportTest { @@ -106,9 +117,12 @@ public: // imports void importEnv(json_spirit::mObject& _o); static void importState(json_spirit::mObject& _o, eth::State& _state); + static void importState(json_spirit::mObject& _o, eth::State& _state, stateOptionsMap& _stateOptionsMap); void importTransaction(json_spirit::mObject& _o); + void exportTest(bytes const& _output, eth::State const& _statePost); static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, WhenError _throw = WhenError::Throw); + static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, stateOptionsMap const& _expectedStateOptions, WhenError _throw = WhenError::Throw); eth::State m_statePre; eth::State m_statePost; From 2e71a91323124df1ecc7ca2e201f0b64ac9ef892 Mon Sep 17 00:00:00 2001 From: winsvega Date: Sat, 28 Mar 2015 00:48:51 +0300 Subject: [PATCH 11/45] Check State State tests with expect section --- TestHelper.cpp | 10 +- stBlockHashTestFiller.json | 25 +- stCallCreateCallCodeTestFiller.json | 90 +++++- stExampleFiller.json | 28 ++ stInitCodeTestFiller.json | 286 ++++-------------- stLogTestsFiller.json | 335 +++++++++++++++++++-- stMemoryStressTestFiller.json | 31 ++ stPreCompiledContractsFiller.json | 193 +++++++++++- stRefundTestFiller.json | 268 ++++++++++++++++- stSolidityTestFiller.json | 66 ++-- stSpecialTestFiller.json | 16 + stSystemOperationsTestFiller.json | 446 +++++++++++++++++++++++++++- stTransactionTestFiller.json | 344 ++++++++++++++++++++- 13 files changed, 1833 insertions(+), 305 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index a830636de..0061b2ee8 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -170,9 +170,7 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state) stateOptionsMap importedMap; importState(_o, _state, importedMap); for (auto& stateOptionMap: importedMap) - { assert(stateOptionMap.second.isAllSet()); //check that every parameter was declared in state object - } } void ImportTest::importTransaction(json_spirit::mObject& _o) @@ -256,10 +254,14 @@ void ImportTest::checkExpectedState(State const& _stateExpect, State const& _sta { map stateStorage = _statePost.storage(a.first); for (auto const& s: _stateExpect.storage(a.first)) - { CHECK(stateStorage[s.first] == s.second, "Check State: " << a.first << ": incorrect storage [" << s.first << "] = " << toHex(stateStorage[s.first]) << ", expected [" << s.first << "] = " << toHex(s.second)); - } + + //Check for unexpected storage values + stateStorage = _stateExpect.storage(a.first); + for (auto const& s: _statePost.storage(a.first)) + CHECK(stateStorage[s.first] == s.second, + "Check State: " << a.first << ": incorrect storage [" << s.first << "] = " << toHex(s.second) << ", expected [" << s.first << "] = " << toHex(stateStorage[s.first])); } if (addressOptions.m_bHasCode) diff --git a/stBlockHashTestFiller.json b/stBlockHashTestFiller.json index 32745e89b..3f32282e0 100644 --- a/stBlockHashTestFiller.json +++ b/stBlockHashTestFiller.json @@ -8,6 +8,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "0x02" : "0x13600b294191fc92924bb3ce4b969c1e7e2bab8f4c93c3fc6d0a51733df3c060" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -42,6 +50,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -59,7 +73,7 @@ "transaction" : { "nonce" : "0", "gasPrice" : "1", - "gasLimit" : "285000", + "gasLimit" : "2850000", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", "value" : "10", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -76,6 +90,15 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "0x01" : "0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5", + "0x02" : "0x6ca54da2c4784ea43fd88b3402de07ae4bced597cbb19f323b7595857a6720ae" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", diff --git a/stCallCreateCallCodeTestFiller.json b/stCallCreateCallCodeTestFiller.json index 26765eb8b..1fd91b91a 100644 --- a/stCallCreateCallCodeTestFiller.json +++ b/stCallCreateCallCodeTestFiller.json @@ -8,6 +8,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -50,6 +56,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -92,6 +104,15 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "3000000" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "100000", @@ -176,6 +197,13 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -224,6 +252,15 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x" : "0x0401", + "0x01" : "0x01", + "0x02" : "0x0fa3e9" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -271,6 +308,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x" : "0x01", + "0x02" : "0x03e9" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -298,7 +343,6 @@ } }, - "transaction" : { "data" : "", @@ -320,6 +364,13 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -368,6 +419,15 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x" : "0x0401", + "0x01" : "0x01", + "0x02" : "0x0fa3e9" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -415,6 +475,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x" : "0x01", + "0x02" : "0x03e9" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -442,7 +510,6 @@ } }, - "transaction" : { "data" : "", @@ -465,6 +532,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -485,7 +558,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -507,6 +579,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -549,6 +627,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", diff --git a/stExampleFiller.json b/stExampleFiller.json index 9daefbd54..991cbe905 100644 --- a/stExampleFiller.json +++ b/stExampleFiller.json @@ -1,5 +1,6 @@ { "add11" : { + "env" : "Environment parameters for test execution", "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", "currentDifficulty" : "256", @@ -8,6 +9,32 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : "Expected post state result (may be not defined at all)", + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000100000", + "code" : "0x6001600101600055", + "nonce" : "0", + "storage" : { + "0x" : "0x02" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "41012", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999858988", + "code" : "0x", + "nonce" : "1", + "storage" : { + } + } + }, + "pre" : "Previous state before execution", "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -24,6 +51,7 @@ } } }, + "transaction" : "could also be defiend via v,r,s instead of secretKey", "transaction" : { "data" : "", "gasLimit" : "400000", diff --git a/stInitCodeTestFiller.json b/stInitCodeTestFiller.json index bcb5514fa..d8a03bcea 100644 --- a/stInitCodeTestFiller.json +++ b/stInitCodeTestFiller.json @@ -10,19 +10,12 @@ }, "expect" : { "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "32599", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, + "balance" : "32599" + }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "67401", - "code" : "0x", - "nonce" : "1", - "storage" : { - } - } + "nonce" : "1" + } }, "pre" : { @@ -57,11 +50,7 @@ }, "expect" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "22177", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "balance" : "22177" } }, "pre" : @@ -97,11 +86,7 @@ }, "expect" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "1000000", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "balance" : "1000000" } }, "pre" : @@ -136,18 +121,11 @@ }, "expect" : { "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "40000", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "balance" : "40000" }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" } }, "pre" : @@ -183,25 +161,7 @@ }, "expect" : { "0000000000000000000000000000000000000000" : { - "balance" : "15", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "11198", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "88787", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "balance" : "15" } }, "pre" : @@ -236,26 +196,11 @@ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, "expect" : { - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "22204", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { - "balance" : "1", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "balance" : "1" }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "77795", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" } }, "pre" : @@ -291,18 +236,10 @@ }, "expect" : { "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "23000", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "balance" : "23000" }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "77000", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" } }, "pre" : @@ -339,24 +276,10 @@ "expect" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1", - "code" : "0x602060006000f0", - "nonce" : "1", - "storage" : { - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "53016", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "nonce" : "1" }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "946983", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" }, "d2571607e241ecf590ed94b12d87c94babe36db6" : { "balance" : "0", @@ -407,30 +330,18 @@ "expect" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1", - "code" : "0x3060025560206000600039602060006000f0", "nonce" : "41", "storage" : { "0x02" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" } }, "1a4c83e1a9834cdc7e4a905ff7f0cf44aed73180" : { - "balance" : "0", - "code" : "0x", "nonce" : "1", "storage" : { "0x02" : "0x1a4c83e1a9834cdc7e4a905ff7f0cf44aed73180" } }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "400000", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, "8e3411c91d5dd4081b4846fa2f93808f5ad19686" : { - "balance" : "0", - "code" : "0x", "nonce" : "1", "storage" : { "0x02" : "0x8e3411c91d5dd4081b4846fa2f93808f5ad19686" @@ -478,35 +389,15 @@ "expect" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1", - "code" : "0x6b600c600055602060406000f0600052600c60146000f0", - "nonce" : "1", - "storage" : { - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "105049", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "nonce" : "1" }, "62c01474f089b07dae603491675dc5b5748f7049" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "nonce" : "0" }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "99894951", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" }, "d2571607e241ecf590ed94b12d87c94babe36db6" : { - "balance" : "0", - "code" : "0x", "nonce" : "1", "storage" : { "0x" : "0x0c" @@ -554,37 +445,19 @@ }, "expect" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "998", - "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f06000556000600060006000600160005461c350f1", "nonce" : "1", "storage" : { "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" } }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "133284", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, "62c01474f089b07dae603491675dc5b5748f7049" : { - "balance" : "0", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "nonce" : "0" }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "99866716", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" }, "d2571607e241ecf590ed94b12d87c94babe36db6" : { "balance" : "2", - "code" : "0x602060406000f0", "nonce" : "1", "storage" : { "0x" : "0x0c" @@ -633,30 +506,16 @@ }, "expect" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "111", - "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f06000556000600060006000600c6000546000f1", "nonce" : "1", "storage" : { "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" } }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "103566", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "99896434", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" }, "d2571607e241ecf590ed94b12d87c94babe36db6" : { "balance" : "1", - "code" : "0x602060406000f0", "nonce" : "0", "storage" : { "0x" : "0x0c" @@ -705,25 +564,10 @@ }, "expect" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "0", - "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060006000546000f1", - "nonce" : "0", - "storage" : { - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "83139", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "nonce" : "0" }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "99916861", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" } }, "pre" : @@ -769,30 +613,16 @@ }, "expect" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "999", - "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b6001f0600055600060006000600060006000546103e8f1", "nonce" : "1", "storage" : { "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" } }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "95566", - "code" : "0x", - "nonce" : "0", - "storage" : { - } - }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "99904434", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" }, "d2571607e241ecf590ed94b12d87c94babe36db6" : { "balance" : "1", - "code" : "0x602060406000f0", "nonce" : "0", "storage" : { "0x" : "0x0c" @@ -841,25 +671,10 @@ }, "expect" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { - "balance" : "10000", - "code" : "0x74600c60005566602060406000f060205260076039f36000526015600b620186a0f0600055", - "nonce" : "0", - "storage" : { - } - }, - "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { - "balance" : "58028", - "code" : "0x", - "nonce" : "0", - "storage" : { - } + "nonce" : "0" }, "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "99941972", - "code" : "0x", - "nonce" : "1", - "storage" : { - } + "nonce" : "1" } }, "pre" : @@ -902,11 +717,25 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "194f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x" : "0x15" + } + } + }, "pre" : { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "100000", - "code" : "{(CALL 2000 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 30 1 31 1) (RETURN 30 2)}", + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "194f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "code" : "{(CALL 2000 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 30 1 31 1) [[0]](MLOAD 0) (RETURN 30 2)}", "nonce" : "0", "storage" : { } @@ -923,12 +752,12 @@ "transaction" : { "data" : "", - "gasLimit" : "41000", + "gasLimit" : "300000", "gasPrice" : "1", "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "a94f5374fce5edbc8e2a8697c15331677e6ebf0b", - "value" : "1" + "to" : "194f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : "0" } }, @@ -941,11 +770,26 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "194f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x" : "0x15", + "0x01" : "0x3f" + } + } + }, "pre" : { - "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "1000000", - "code" : "{(MSTORE 0 0x15)(CALL 7000 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 32 32 32) (SSTORE 0 (MLOAD 0 64))(RETURN 0 64)}", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "194f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "code" : "{(MSTORE 0 0x15)(CALL 7000 0xb94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 32 32 32) [[0]](MLOAD 0) [[1]](MLOAD 32) (RETURN 0 64)}", "nonce" : "0", "storage" : { } @@ -966,8 +810,8 @@ "gasPrice" : "1", "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", - "to" : "a94f5374fce5edbc8e2a8697c15331677e6ebf0b", - "value" : "1" + "to" : "194f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : "0" } } } diff --git a/stLogTestsFiller.json b/stLogTestsFiller.json index 3b13698cf..142f7b714 100644 --- a/stLogTestsFiller.json +++ b/stLogTestsFiller.json @@ -8,6 +8,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -49,6 +56,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -90,6 +104,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -132,6 +153,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -151,7 +179,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -173,6 +200,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -214,6 +247,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -255,6 +294,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -296,6 +342,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -337,6 +390,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -378,6 +438,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -420,6 +487,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -461,6 +535,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -502,6 +582,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -543,6 +629,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -584,6 +677,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -603,7 +703,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -625,6 +724,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -644,7 +750,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -666,6 +771,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -685,7 +797,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -707,6 +818,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -726,7 +844,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -748,6 +865,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -780,7 +904,6 @@ } }, - "log2_nonEmptyMem_logMemSize1_logMemStart31": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", @@ -790,6 +913,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -809,7 +939,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -831,6 +960,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -850,7 +985,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -872,6 +1006,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -891,7 +1031,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -913,6 +1052,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -954,6 +1100,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -995,6 +1148,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1014,7 +1174,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1036,6 +1195,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1055,7 +1221,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1077,6 +1242,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1096,7 +1268,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1118,6 +1289,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1160,6 +1338,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1179,7 +1364,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1201,6 +1385,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1220,7 +1410,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1242,6 +1431,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1261,7 +1456,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1283,6 +1477,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1302,7 +1503,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1324,6 +1524,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1343,7 +1550,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1365,6 +1571,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1384,7 +1597,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1406,6 +1618,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1425,7 +1644,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1447,6 +1665,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1466,7 +1691,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1488,6 +1712,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1507,7 +1738,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1529,6 +1759,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1548,7 +1785,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1561,7 +1797,6 @@ } }, - "log4_nonEmptyMem_logMemSize1_logMemStart31": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", @@ -1571,6 +1806,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1590,7 +1832,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1612,6 +1853,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1631,7 +1878,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1653,6 +1899,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1672,7 +1924,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1694,6 +1945,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1713,7 +1971,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1735,6 +1992,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1754,7 +2018,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1776,6 +2039,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1795,7 +2065,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -1817,6 +2086,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1836,7 +2112,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", diff --git a/stMemoryStressTestFiller.json b/stMemoryStressTestFiller.json index 2589191c5..2ed6c9b6d 100644 --- a/stMemoryStressTestFiller.json +++ b/stMemoryStressTestFiller.json @@ -8,6 +8,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -42,6 +48,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -76,6 +88,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -110,6 +128,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000020" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -144,6 +169,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", diff --git a/stPreCompiledContractsFiller.json b/stPreCompiledContractsFiller.json index ff0cda3f5..69e2456fb 100644 --- a/stPreCompiledContractsFiller.json +++ b/stPreCompiledContractsFiller.json @@ -8,6 +8,15 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x01" : "0x01", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -42,6 +51,15 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x01" : "0x01", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -77,6 +95,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -111,6 +137,15 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x01" : "0x01", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -145,6 +180,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -179,6 +220,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -213,6 +260,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -247,6 +301,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -281,6 +342,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -315,6 +383,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xe4319f4b631c6d0fcfc84045dbcb676865fe5e13", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -349,6 +425,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xec4916dd28fc4c10d78e287ca5d9cc51ee1ae73cbfde08c6b37324cbfaac8bc5" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -383,6 +466,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -417,6 +508,17 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0000000000000000000000000000000000000002" : { + "balance" : "19" + }, + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "200000000", @@ -451,6 +553,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xcb39b3bde22925b2f931111130c774761d8895e0e08437c9b396c1e97d10f34d", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -485,6 +595,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x7392925565d67be8e9620aacbcfaecd8cb6ec58d709d25da9eccf1d08a41ce35", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -519,6 +637,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xaf9613760f72635fbdb44a5a0a63c39f12af30f950a6ee5c971be188e89c4051", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -553,6 +679,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xaf9613760f72635fbdb44a5a0a63c39f12af30f950a6ee5c971be188e89c4051", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -587,6 +721,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -621,6 +762,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -655,6 +803,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x9c1185a5c5e9fc54612808977ee8f548b2258d31", + "0x02" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -689,6 +845,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -723,6 +885,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xf34578907f" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -757,6 +926,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -791,6 +967,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -825,6 +1008,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -848,7 +1038,6 @@ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "data" : "" } - }, - + } } diff --git a/stRefundTestFiller.json b/stRefundTestFiller.json index 5fb040f50..9119fd2d8 100644 --- a/stRefundTestFiller.json +++ b/stRefundTestFiller.json @@ -8,6 +8,20 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "13003" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "2271987", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -44,6 +58,21 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "storage" : { + "0x01" : "0x17" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "26006" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "973984", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -80,6 +109,21 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "storage" : { + "0x01" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "26005" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "473995", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -101,7 +145,7 @@ "gasPrice" : "1", "gasLimit" : "26005", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "0", + "value" : "10", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "data" : "" } @@ -116,6 +160,19 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "13003" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "37197", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -152,6 +209,19 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "23015" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "76985", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -192,6 +262,21 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x0a" : "0x01", + "0x0b" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "43021" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "56979", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -232,6 +317,20 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x0a" : "0x8000000000000000000000000000000000000000000000000000000000000000", + "0x0b" : "0x0de0b6b3a7640000" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "45600" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "54400" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -273,6 +372,19 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x0b" : "0x0de0b6b3a7640000" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "38105" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "61895" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -314,6 +426,23 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x0a" : "0x01", + "0x0b" : "0x01", + "0x16" : "0x984476", + "0x17" : "0x96bd58" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "70566" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "9929434", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -363,6 +492,22 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "2000000000000000010", + "storage" : { + "0x" : "0x01", + "0x01" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "20534" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99979456", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -407,6 +552,22 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "2000000000000000010", + "storage" : { + "0x" : "0x01", + "0x01" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "20534" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99979456", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -449,6 +610,20 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "storage" : { + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "10502" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99989488", + "nonce" : "1" + } + }, "pre" : { "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { "balance" : "1000000000000000000", @@ -485,6 +660,21 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "21002" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99978998", + "nonce" : "1" + }, + "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { + "balance" : "1000000000000000000", + "storage" : { + "0x01" : "0x01" + } + } + }, "pre" : { "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { "balance" : "1000000000000000000", @@ -521,6 +711,22 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "2000000000000000010", + "storage" : { + "0x" : "0x01", + "0x01" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "20566" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "99979424", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -565,6 +771,26 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "storage" : { + "0x" : "0x01", + "0x01" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "31070" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1968920", + "nonce" : "1" + }, + "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -609,6 +835,26 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000010", + "storage" : { + "0x01" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "31069" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "68921", + "nonce" : "1" + }, + "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { + "storage" : { + "0x01" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -653,6 +899,26 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000", + "storage" : { + "0x01" : "0x01" + } + }, + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "31069" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "268931", + "nonce" : "1" + }, + "aaae7baea6a6c7c4c2dfeb977efac326af552aaa" : { + "storage" : { + "0x01" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", diff --git a/stSolidityTestFiller.json b/stSolidityTestFiller.json index 253a90c14..cb99d4aa9 100644 --- a/stSolidityTestFiller.json +++ b/stSolidityTestFiller.json @@ -12,28 +12,28 @@ { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "100000", - "//" : "contract main ", - "//" : "{ ", - "//" : " function run() returns (bool) ", - "//" : " { ", - "//" : " return testCryptographicFunctions(); ", - "//" : " } ", - "//" : " ", - "//" : " function testCryptographicFunctions() returns (bool res) ", - "//" : " { ", - "//" : " res = true; ", - "//" : " if (sha3('teststring') != 0x43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (sha256('teststring') != 0x3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d111) ", - "//" : " return false; ", - "//" : " ", - "//" : " if (ripemd160('teststring') != 0xcd566972b5e50104011a92b59fa8e0b1234851ae) ", - "//" : " return false; ", - "//" : " ", - "//" : " //ecrecover ", - "//" : " } ", - "//" : "} ", + "//" : "contract main ", + "//" : "{ ", + "//" : " function run() returns (bool) ", + "//" : " { ", + "//" : " return testCryptographicFunctions(); ", + "//" : " } ", + "//" : " ", + "//" : " function testCryptographicFunctions() returns (bool res) ", + "//" : " { ", + "//" : " res = true; ", + "//" : " if (sha3('teststring') != 0x43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (sha256('teststring') != 0x3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d111) ", + "//" : " return false; ", + "//" : " ", + "//" : " if (ripemd160('teststring') != 0xcd566972b5e50104011a92b59fa8e0b1234851ae) ", + "//" : " return false; ", + "//" : " ", + "//" : " //ecrecover ", + "//" : " } ", + "//" : "} ", "code" : "0x60003560e060020a90048063c040622614610021578063e0a9fd281461003357005b610029610045565b8060005260206000f35b61003b610054565b8060005260206000f35b600061004f610054565b905090565b60006001905060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d40000000000000000000000000000000000000000000000000000000000081526003016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156100d7576100e0565b60009050610218565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d4000000000000000000000000000000000000000000000000000000000008152600301600060008560325a03f161014457005b506000517f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d11114156101745761017d565b60009050610218565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d4000000000000000000000000000000000000000000000000000000000008152600301600060008560325a03f16101e157005b50600051600160a060020a031673cd566972b5e50104011a92b59fa8e0b1234851ae141561020e57610217565b60009050610218565b5b9056", "nonce" : "0", "storage" : { @@ -206,7 +206,7 @@ }, "transaction" : { - "//" : "run()", + "data" : "run()", "data" : "0xc0406226", "gasLimit" : "350000", "gasPrice" : "1", @@ -272,7 +272,7 @@ }, "transaction" : { - "//" : "run()", + "data" : "run()", "data" : "0xc0406226", "gasLimit" : "350000", "gasPrice" : "1", @@ -337,7 +337,7 @@ }, "transaction" : { - "//" : "run()", + "data" : "run()", "data" : "0xc0406226", "gasLimit" : "350000", "gasPrice" : "1", @@ -416,7 +416,7 @@ }, "transaction" : { - "//" : "run()", + "data" : "run()", "data" : "0xc0406226", "gasLimit" : "350000", "gasPrice" : "1", @@ -479,7 +479,7 @@ }, "transaction" : { - "//" : "run()", + "data" : "run()", "data" : "0xc0406226", "gasLimit" : "350000", "gasPrice" : "1", @@ -543,7 +543,7 @@ }, "transaction" : { - "//" : "run()", + "data" : "run()", "data" : "0xc0406226", "gasLimit" : "350000", "gasPrice" : "1", @@ -598,7 +598,7 @@ }, "transaction" : { - "//" : "testRecursiveMethods()", + "data" : "testRecursiveMethods()", "data" : "0x981a3165", "gasLimit" : "30000", "gasPrice" : "1", @@ -653,7 +653,7 @@ }, "transaction" : { - "//" : "testInfiniteLoop()", + "data" : "testInfiniteLoop()", "data" : "0x296df0df", "gasLimit" : "300000", "gasPrice" : "1", @@ -732,7 +732,7 @@ }, "transaction" : { - "//" : "run(uint256)", + "data" : "run(uint256)", "data" : "0xa444f5e90000000000000000000000000000000000000000000000000000000000000004", "gasLimit" : "300000", "gasPrice" : "1", @@ -811,7 +811,7 @@ }, "transaction" : { - "//" : "run(uint256)", + "data" : "run(uint256)", "data" : "0xa444f5e90000000000000000000000000000000000000000000000000000000000000204", "gasLimit" : "300000", "gasPrice" : "1", @@ -866,7 +866,7 @@ }, "transaction" : { - "//" : "run()", + "data" : "run()", "data" : "0xc0406226", "gasLimit" : "300000", "gasPrice" : "1", diff --git a/stSpecialTestFiller.json b/stSpecialTestFiller.json index b6552923f..440e37a17 100644 --- a/stSpecialTestFiller.json +++ b/stSpecialTestFiller.json @@ -8,6 +8,17 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "1000000000000000000" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "771500" + }, + "aaaaaaaaace5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -49,6 +60,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "1000", diff --git a/stSystemOperationsTestFiller.json b/stSystemOperationsTestFiller.json index 03275e8bb..e59f6bce8 100644 --- a/stSystemOperationsTestFiller.json +++ b/stSystemOperationsTestFiller.json @@ -8,6 +8,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -42,6 +50,14 @@ "currentTimestamp" : "2", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "nonce" : "2", + "storage" : { + "0xebcce5f60530275ee9318ce1eff9e4bfee810172" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -78,6 +94,13 @@ "currentTimestamp" : "2", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -112,6 +135,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "10000", @@ -146,6 +176,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -180,6 +218,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -205,7 +251,6 @@ } }, - "createNameRegistratorZeroMemExpansion": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", @@ -215,6 +260,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -249,6 +302,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1", + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -283,6 +344,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -317,6 +385,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -351,6 +426,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -385,6 +467,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -405,7 +495,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -427,6 +516,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -447,7 +543,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -469,6 +564,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -489,7 +591,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -511,6 +612,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -531,7 +640,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -553,6 +661,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -595,6 +710,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -636,6 +758,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -677,6 +806,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -760,6 +896,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + "0x" : "0x80" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -802,6 +946,15 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + "0x" : "0x01", + "0x01" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -822,7 +975,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -844,6 +996,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -857,7 +1017,6 @@ "code" : "", "storage": {} } - }, "transaction" : { "nonce" : "0", @@ -879,6 +1038,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -921,6 +1087,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -962,6 +1135,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1003,6 +1183,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1045,6 +1232,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1086,6 +1280,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1127,6 +1328,15 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -1167,6 +1377,15 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -1207,6 +1426,15 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -1247,6 +1475,14 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x0401", + "0x01" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -1281,6 +1517,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -1315,6 +1557,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -1349,6 +1597,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "20000000", @@ -1383,6 +1637,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1999999999999979496", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1417,6 +1677,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1999999999999979496", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1451,6 +1717,11 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "4f5374fce5edbc8e2a8697c15331677e6ebf0baa" : { + "balance" : "1000000000000100000" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1485,6 +1756,11 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1999999999999979496" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1519,6 +1795,11 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999879496" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1553,6 +1834,11 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "aa1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "1000000000000100000" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1587,6 +1873,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "999999999999889499", + "nonce" : "1" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1726,6 +2018,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1767,6 +2065,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1808,6 +2112,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1849,6 +2160,12 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1890,6 +2207,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1924,6 +2248,18 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x24" : "0x01" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + "0x26" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -1965,6 +2301,18 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x26" : "0x01" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + "0x29" : "0x02" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -2006,6 +2354,18 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x30" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + "0x" : "0x2f" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -2047,6 +2407,18 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x30" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + "0x" : "0x2f" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1025000", @@ -2088,6 +2460,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + "0x26" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -2129,6 +2508,17 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x24" : "0x01" + } + }, + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -2170,6 +2560,13 @@ "currentTimestamp" : 1, "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x0186a0" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -2204,6 +2601,13 @@ "currentTimestamp": 1, "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x0de0b6b3a76586a0" + } + } + }, "pre": { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { "balance": "1000000000000000000", @@ -2238,6 +2642,13 @@ "currentTimestamp": 1, "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x0de0b6b3a6c9e2e0" + } + } + }, "pre": { "095e7baea6a6c7c4c2dfeb977efac326af552d87": { "balance": "1000000000000000000", @@ -2272,6 +2683,19 @@ "currentTimestamp": 1, "currentCoinbase": "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0xd2571607e241ecf590ed94b12d87c94babe36db6" + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "65", + "code" : "0x6000355415600957005b602035600035", + "storage" : { + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "1000000000000000000", @@ -2313,6 +2737,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "bbbf5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x" : "0x01", + "0x01" : "0x0a" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { diff --git a/stTransactionTestFiller.json b/stTransactionTestFiller.json index 26a69f187..d936646cd 100644 --- a/stTransactionTestFiller.json +++ b/stTransactionTestFiller.json @@ -8,6 +8,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "nonce" : "0" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -39,6 +45,18 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "0" + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "code" : "0x" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "nonce" : "1" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -70,6 +88,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "code" : "0x" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -92,7 +118,6 @@ } }, - "TransactionSendingToZero" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -102,6 +127,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000000" : { + "balance" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -134,6 +167,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "79000", + "nonce" : "1" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -156,7 +195,6 @@ } }, - "TransactionToItselfNotEnoughFounds" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -166,6 +204,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "22000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -188,7 +231,6 @@ } }, - "TransactionFromCoinbaseNotEnoughFounds" : { "env" : { "currentCoinbase" : "a94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -198,6 +240,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "22000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -229,6 +276,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -276,6 +329,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -323,6 +382,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1", + "storage" : { + "0x01" : "0x37" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -370,6 +437,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -401,6 +473,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "nonce" : "0" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -432,6 +510,13 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "10", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -482,6 +567,25 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "storage" : { + "0x" : "0x0c", + "0x01" : "0x0c", + "0x02" : "0x0c", + "0x03" : "0x0c", + "0x04" : "0x0c", + "0x05" : "0x0c", + "0x06" : "0x0c", + "0x07" : "0x0c", + "0x08" : "0x0c", + "0x09" : "0x0c" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -532,6 +636,28 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000000" : { + "storage" : { + "0x" : "0x0c", + "0x01" : "0x0c", + "0x02" : "0x0c", + "0x03" : "0x0c", + "0x04" : "0x0c", + "0x05" : "0x0c", + "0x06" : "0x0c", + "0x07" : "0x0c", + "0x08" : "0x0c", + "0x09" : "0x0c" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "20" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -592,6 +718,19 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000000" : { + "balance" : "1", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "19" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -652,6 +791,31 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000000" : { + "storage" : { + "0x" : "0x0c", + "0x01" : "0x0c", + "0x02" : "0x0c", + "0x03" : "0x0c", + "0x04" : "0x0c", + "0x05" : "0x0c", + "0x06" : "0x0c", + "0x07" : "0x0c", + "0x08" : "0x0c", + "0x09" : "0x0c" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "20", + "storage" : { + "0x04" : "0x0c" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -717,6 +881,19 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000000" : { + "balance" : "1", + "storage" : { + } + }, + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "19", + "storage" : { + "0x04" : "0x0c" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -782,6 +959,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -830,6 +1012,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000000" : { + "balance" : "20", + "code" : "0x6001ff" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -878,6 +1066,18 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000000" : { + "balance" : "0", + "code" : "0x6001ff" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -926,6 +1126,13 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000001" : { + "balance" : "1", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -975,6 +1182,16 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0000000000000000000000000000000000000000" : { + "code" : "0x6001ff", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1023,6 +1240,15 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "111488", + "nonce" : "1" + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10502" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1063,6 +1289,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "post" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1010" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1103,6 +1337,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "10" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1134,6 +1373,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "0" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1165,6 +1409,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "21652" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1197,6 +1446,18 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "0" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "42100", + "nonce" : "1" + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "900" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1228,6 +1489,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "33000", + "nonce" : "0" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1259,6 +1526,17 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "0" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "900" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1291,6 +1569,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "900" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1325,6 +1611,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", + "nonce" : "0" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1359,6 +1651,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "400", + "nonce" : "0" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1391,6 +1689,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "ffffffffffffffffffffffffffffffffffffffff" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1422,6 +1725,12 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "132000", + "nonce" : "0" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1453,6 +1762,15 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "100", + "code" : "0x60e060020a600035048063f8a8fd6d14601457005b601a6020565b60006000f35b56", + "nonce" : "0", + "storage" : { + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1484,6 +1802,15 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", + "nonce" : "0" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { @@ -1523,6 +1850,17 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "b94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100", + "nonce" : "1" + }, + "f1ecf98489fa9ed60a664fc4998db699cfa39d40" : { + "storage" : { + "0x" : "0x0c" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { From d90dc70bb8484461eaff19e3b50a2ca16f518d72 Mon Sep 17 00:00:00 2001 From: winsvega Date: Sat, 28 Mar 2015 18:31:03 +0300 Subject: [PATCH 12/45] Check State stSolidityTest --- stSolidityTestFiller.json | 168 ++++++++++++++++++++++++++++++++++---- 1 file changed, 151 insertions(+), 17 deletions(-) diff --git a/stSolidityTestFiller.json b/stSolidityTestFiller.json index cb99d4aa9..17866622d 100644 --- a/stSolidityTestFiller.json +++ b/stSolidityTestFiller.json @@ -8,15 +8,24 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "100000", "//" : "contract main ", "//" : "{ ", + "//" : " bool returnValue; ", "//" : " function run() returns (bool) ", "//" : " { ", - "//" : " return testCryptographicFunctions(); ", + "//" : " returnValue = testCryptographicFunctions(); ", + "//" : " return returnValue; ", "//" : " } ", "//" : " ", "//" : " function testCryptographicFunctions() returns (bool res) ", @@ -34,7 +43,7 @@ "//" : " //ecrecover ", "//" : " } ", "//" : "} ", - "code" : "0x60003560e060020a90048063c040622614610021578063e0a9fd281461003357005b610029610045565b8060005260206000f35b61003b610054565b8060005260206000f35b600061004f610054565b905090565b60006001905060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d40000000000000000000000000000000000000000000000000000000000081526003016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156100d7576100e0565b60009050610218565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d4000000000000000000000000000000000000000000000000000000000008152600301600060008560325a03f161014457005b506000517f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d11114156101745761017d565b60009050610218565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d4000000000000000000000000000000000000000000000000000000000008152600301600060008560325a03f16101e157005b50600051600160a060020a031673cd566972b5e50104011a92b59fa8e0b1234851ae141561020e57610217565b60009050610218565b5b9056", + "code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463c04062268114610039578063e0a9fd281461004b57005b61004161005d565b8060005260206000f35b61005361008c565b8060005260206000f35b600061006761008c565b600060006101000a81548160ff0219169083021790555060ff60016000540416905090565b600160007f74657374737472696e67000000000000000000000000000000000000000000008152600a016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156100e5576100ed565b5060006101da565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f161012b57005b507f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d111600051141561015b57610163565b5060006101da565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f16101a157005b507fcd566972b5e50104011a92b59fa8e0b1234851ae00000000000000000000000060005114156101d1576101d9565b5060006101da565b5b9056", "nonce" : "0", "storage" : { } @@ -48,7 +57,7 @@ }, "transaction" : { - "//" : "run()", + "data" : "run()", "data" : "0xc0406226", "gasLimit" : "35000000", "gasPrice" : "1", @@ -68,6 +77,18 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01", + "0x01" : "0xff", + "0x02" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x03" : "0xff", + "0x04" : "0x676c6f62616c2064617461203332206c656e67746820737472696e6700000000", + "0x05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { @@ -78,10 +99,11 @@ "//" : " { ", "//" : " address addr; ", "//" : " int amount; ", - "//" : " string32 str; ", + "//" : " bytes32 str; ", "//" : " mapping (uint => address) funders; ", "//" : " } ", "//" : " ", + "//" : " bool returnValue; ", "//" : " int globalValue; ", "//" : " StructTest globalData; ", "//" : " function run() returns (bool) ", @@ -91,7 +113,8 @@ "//" : " globalData.amount = 255; ", "//" : " globalData.str = 'global data 32 length string'; ", "//" : " globalData.funders[0] = 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b; ", - "//" : " return testStructuresAndVariabless(); ", + "//" : " returnValue = testStructuresAndVariabless(); ", + "//" : " return returnValue; ", "//" : " } ", "//" : " ", "//" : " function testStructuresAndVariabless() returns (bool res) ", @@ -113,7 +136,7 @@ "//" : " return false; ", "//" : " } ", "//" : "} ", - "code" : "0x60003560e060020a900480632a9afb8314610021578063c04062261461003357005b610029610045565b8060005260206000f35b61003b610136565b8060005260206000f35b60006001905060005460ff141561005b57610064565b60009050610133565b60025460005414156100755761007e565b60009050610133565b600154600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156100aa576100b3565b60009050610133565b6003547f676c6f62616c2064617461203332206c656e67746820737472696e670000000014156100e2576100eb565b60009050610133565b600460006000815260200190815260200160002054600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561012957610132565b60009050610133565b5b90565b600060ff60008190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b60018190555060ff6002819055507f676c6f62616c2064617461203332206c656e67746820737472696e670000000060038190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6004600060008152602001908152602001600020819055506101bf610045565b90509056", + "code" : "0x7c010000000000000000000000000000000000000000000000000000000060003504632a9afb838114610039578063c04062261461004b57005b61004161005d565b8060005260206000f35b61005361016c565b8060005260206000f35b600160ff8154141561006e57610076565b506000610169565b60015460035414156100875761008f565b506000610169565b73a94f5374fce5edbc8e2a8697c15331677e6ebf0b73ffffffffffffffffffffffffffffffffffffffff60016002540481161614156100cd576100d5565b506000610169565b7f676c6f62616c2064617461203332206c656e67746820737472696e670000000060045414156101045761010c565b506000610169565b6005600080815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561016057610168565b506000610169565b5b90565b600060ff806001555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6002805473ffffffffffffffffffffffffffffffffffffffff1916821790555060ff80600355507f676c6f62616c2064617461203332206c656e67746820737472696e6700000000806004555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6005600080815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555061022f61005d565b600060006101000a81548160ff0219169083021790555060ff6001600054041690509056", "nonce" : "0", "storage" : { } @@ -127,7 +150,7 @@ }, "transaction" : { - "//" : "run()", + "data" : "run()", "data" : "0xc0406226", "gasLimit" : "350000", "gasPrice" : "1", @@ -147,15 +170,24 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "100000", "//" : "contract main ", "//" : "{ ", + "//" : " bool returnValue; ", "//" : " function run() returns (bool) ", "//" : " { ", - "//" : " return testBlockAndTransactionProperties(); ", + "//" : " returnValue = testBlockAndTransactionProperties(); ", + "//" : " return returnValue; ", "//" : " } ", "//" : " ", "//" : " function testBlockAndTransactionProperties() returns (bool res) ", @@ -192,7 +224,7 @@ "//" : " ", "//" : " } ", "//" : "} ", - "code" : "0x60003560e060020a90048063c040622614610021578063e97384dc1461003357005b610029610045565b8060005260206000f35b61003b610054565b8060005260206000f35b600061004f610054565b905090565b60006001905041600160a060020a0316732adc25665018aa1fe0e6bc666dac8fc2697ff9ba14156100845761008d565b60009050610172565b446302b8feb0141561009e576100a7565b60009050610172565b45683635c9adc5dea0000014156100bd576100c6565b60009050610172565b43607814156100d4576100dd565b60009050610172565b33600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561010757610110565b60009050610172565b346064141561011e57610127565b60009050610172565b3a600114156101355761013e565b60009050610172565b32600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561016857610171565b60009050610172565b5b9056", + "code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463c04062268114610039578063e97384dc1461004b57005b61004161005d565b8060005260206000f35b61005361008c565b8060005260206000f35b600061006761008c565b600060006101000a81548160ff0219169083021790555060ff60016000540416905090565b6001732adc25665018aa1fe0e6bc666dac8fc2697ff9ba73ffffffffffffffffffffffffffffffffffffffff411614156100c5576100cd565b5060006101c7565b446302b8feb014156100de576100e6565b5060006101c7565b45683635c9adc5dea0000014156100fc57610104565b5060006101c7565b43607814156101125761011a565b5060006101c7565b5a503373ffffffffffffffffffffffffffffffffffffffff1673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156101535761015b565b5060006101c7565b346064141561016957610171565b5060006101c7565b3a6001141561017f57610187565b5060006101c7565b3273ffffffffffffffffffffffffffffffffffffffff1673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156101be576101c6565b5060006101c7565b5b9056", "nonce" : "0", "storage" : { } @@ -226,6 +258,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1", + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { @@ -244,9 +284,11 @@ "//": "} ", "//": "contract main ", "//": "{ ", + "//": " bool returnValue; ", "//": " function run() returns (bool) ", "//": " { ", - "//": " return testContractSuicide(); ", + "//": " returnValue = testContractSuicide(); ", + "//": " return returnValue; ", "//": " } ", "//": " ", "//": " function testContractSuicide() returns (bool res) ", @@ -258,7 +300,7 @@ "//": " return false; ", "//": " } ", "//": "} ", - "code" : "0x60003560e060020a90048063a60eedda14610021578063c04062261461003357005b610029610045565b8060005260206000f35b61003b6100eb565b8060005260206000f35b6000600060606100fb600039606060006000f0905080600160a060020a031662f55d9d600060008260e060020a02600052600441600160a060020a03168152602001600060008660325a03f161009757005b505080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f16100c857005b505060005160e1146100d9576100e2565b600191506100e7565b600091505b5090565b60006100f5610045565b9050905600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b60276004356046565b60006000f35b6033603d565b8060005260206000f35b600060e1905090565b80600160a060020a0316ff5056", + "code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463a60eedda8114610039578063c04062261461004b57005b61004161005d565b8060005260206000f35b61005361015a565b8060005260206000f35b60006000608161018a600039608160006000f0905073ffffffffffffffffffffffffffffffffffffffff811662f55d9d6000807ef55d9d00000000000000000000000000000000000000000000000000000000825260044173ffffffffffffffffffffffffffffffffffffffff168152602001600060008660325a03f16100e057005b505073ffffffffffffffffffffffffffffffffffffffff811663b9c3d0a5602060007fb9c3d0a50000000000000000000000000000000000000000000000000000000081526004600060008660325a03f161013757005b505060005160e11461014857610151565b60019150610156565b600091505b5090565b600061016461005d565b600060006101000a81548160ff0219169083021790555060ff600160005404169050905600607580600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350462f55d9d81146036578063b9c3d0a514604557005b603f600435605a565b60006000f35b604b6055565b8060005260206000f35b60e190565b8073ffffffffffffffffffffffffffffffffffffffff16ff5056", "nonce" : "0", "storage" : { } @@ -292,6 +334,14 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1", + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { @@ -310,9 +360,11 @@ "//": "} ", "//": "contract main ", "//": "{ ", + "//": " bool returnValue; ", "//": " function run() returns (bool) ", "//": " { ", - "//": " return testContractInteraction(); ", + "//": " returnValue = testContractInteraction(); ", + "//": " return returnValue; ", "//": " } ", "//": " ", "//" : " function testContractInteraction() returns (bool res) ", @@ -323,7 +375,7 @@ "//" : " return false; ", "//" : " } ", "//": "} ", - "code" : "0x60003560e060020a90048063c040622614610021578063ed973fe91461003357005b6100296100ac565b8060005260206000f35b61003b610045565b8060005260206000f35b6000600060606100bc600039606060006000f0905080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f161008957005b505060005160e11461009a576100a3565b600191506100a8565b600091505b5090565b60006100b6610045565b9050905600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b6027600435603d565b60006000f35b6033604b565b8060005260206000f35b80600160a060020a0316ff50565b600060e190509056", + "code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463c04062268114610039578063ed973fe91461004b57005b6100416100ea565b8060005260206000f35b61005361005d565b8060005260206000f35b60006000608161011a600039608160006000f0905073ffffffffffffffffffffffffffffffffffffffff811663b9c3d0a5602060007fb9c3d0a50000000000000000000000000000000000000000000000000000000081526004600060008660325a03f16100c757005b505060005160e1146100d8576100e1565b600191506100e6565b600091505b5090565b60006100f461005d565b600060006101000a81548160ff0219169083021790555060ff600160005404169050905600607580600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350462f55d9d81146036578063b9c3d0a514604557005b603f6004356055565b60006000f35b604b6070565b8060005260206000f35b8073ffffffffffffffffffffffffffffffffffffffff16ff50565b60e19056", "nonce" : "0", "storage" : { } @@ -357,15 +409,24 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { "balance" : "100000", "//": "contract main ", "//": "{ ", + "//": " bool returnValue; ", "//": " function run() returns (bool) ", "//": " { ", - "//": " return testKeywords(); ", + "//": " returnValue = testKeywords(); ", + "//": " return returnValue; ", "//": " } ", "//": " ", "//": " function testKeywords() returns (bool res) ", @@ -402,7 +463,7 @@ "//": " return false; ", "//": " } ", "//": "} ", - "code" : "0x60003560e060020a90048063380e439614601f578063c040622614602f57005b6025603f565b8060005260206000f35b603560f0565b8060005260206000f35b60006000600060009150600092508160001460585760d3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe782131560ca575b600a82121560945781806001019250506080565b81600a14609f5760c6565b600a90505b60008160ff16111560c55781806001900392505080806001900391505060a4565b5b60d2565b6000925060eb565b5b8160001460de5760e6565b6001925060eb565b600092505b505090565b600060f8603f565b90509056", + "code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463380e439681146037578063c040622614604757005b603d6084565b8060005260206000f35b604d6057565b8060005260206000f35b6000605f6084565b600060006101000a81548160ff0219169083021790555060ff60016000540416905090565b6000808160011560cd575b600a82121560a157600190910190608f565b81600a1460ac5760c9565b50600a5b60008160ff16111560c85760019182900391900360b0565b5b60d5565b6000925060ed565b8160001460e05760e8565b6001925060ed565b600092505b50509056", "nonce" : "0", "storage" : { } @@ -435,6 +496,18 @@ "currentNumber" : "0", "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1" + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "balance" : "0", + "code" : "0x60003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b60276004356046565b60006000f35b6033603d565b8060005260206000f35b600060e1905090565b80600160a060020a0316ff5056", + "nonce" : "0", + "storage" : { + } + } }, "pre" : { @@ -499,6 +572,15 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "1", + "storage" : { + "0x" : "0xe1", + "0x01" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { @@ -563,6 +645,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "60000" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { @@ -584,7 +671,7 @@ "//" : " testRecursiveMethods(); ", "//" : " } ", "//" : "}", - "code" : "0x60003560e060020a90048063296df0df1460295780634893d88a146035578063981a316514604157005b602f604d565b60006000f35b603b6062565b60006000f35b6047605a565b60006000f35b5b600115605857604e565b565b60606062565b565b6068605a565b56", + "code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463296df0df811460415780634893d88a14604d578063981a316514605957005b60476065565b60006000f35b6053607a565b60006000f35b605f6072565b60006000f35b5b6001156070576066565b565b6078607a565b565b60806072565b56", "nonce" : "0", "storage" : { } @@ -600,7 +687,7 @@ { "data" : "testRecursiveMethods()", "data" : "0x981a3165", - "gasLimit" : "30000", + "gasLimit" : "60000", "gasPrice" : "1", "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", @@ -618,6 +705,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "300000" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { @@ -673,6 +765,36 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "nonce" : "3", + "storage" : { + "0x" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87", + "0x01" : "0x04" + } + }, + "5d35480c6e7f8952363fa280a0a96906da981f63" : { + "balance" : "2" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "b88de88b35ecbf3c141e3caae2baf35834d18f63" : { + "storage" : { + "0x" : "0x02" + } + }, + "c506eeab8810e0b592686a218b889284e45b2c35" : { + "storage" : { + "0x" : "0x01" + } + }, + "d2571607e241ecf590ed94b12d87c94babe36db6" : { + "storage" : { + "0x" : "0x03" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { @@ -752,6 +874,11 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "300000" + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { @@ -831,6 +958,13 @@ "currentTimestamp" : 1, "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x014f" + } + } + }, "pre" : { "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { From fd1cccaf89a1c95a8ff1563d88d3e420d6db4a0a Mon Sep 17 00:00:00 2001 From: winsvega Date: Mon, 30 Mar 2015 19:30:36 +0300 Subject: [PATCH 13/45] Check State vmArithmeticTestFiller, memory test fix --- stMemoryStressTestFiller.json | 2 +- vm.cpp | 8 +- vmArithmeticTestFiller.json | 1524 ++++++++++++++++++++++++++++++++- 3 files changed, 1525 insertions(+), 9 deletions(-) diff --git a/stMemoryStressTestFiller.json b/stMemoryStressTestFiller.json index 2ed6c9b6d..3893223eb 100644 --- a/stMemoryStressTestFiller.json +++ b/stMemoryStressTestFiller.json @@ -131,7 +131,7 @@ "expect" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "storage" : { - "0x" : "0x0100000020" + "0x" : "0x20" } } }, diff --git a/vm.cpp b/vm.cpp index b6ebece16..a36a57070 100644 --- a/vm.cpp +++ b/vm.cpp @@ -390,10 +390,12 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) if (o.count("expect") > 0) { - State postState, expectState; + State postState(Address(), OverlayDB(), eth::BaseState::Empty); + State expectState(Address(), OverlayDB(), eth::BaseState::Empty); + stateOptionsMap expectStateMap; ImportTest::importState(o["post"].get_obj(), postState); - ImportTest::importState(o["expect"].get_obj(), expectState); - ImportTest::checkExpectedState(expectState, postState, Options::get().checkState ? WhenError::Throw : WhenError::DontThrow); + ImportTest::importState(o["expect"].get_obj(), expectState, expectStateMap); + ImportTest::checkExpectedState(expectState, postState, expectStateMap, Options::get().checkState ? WhenError::Throw : WhenError::DontThrow); o.erase(o.find("expect")); } diff --git a/vmArithmeticTestFiller.json b/vmArithmeticTestFiller.json index 7f5b1db52..c06a429e0 100644 --- a/vmArithmeticTestFiller.json +++ b/vmArithmeticTestFiller.json @@ -10,8 +10,7 @@ }, "expect" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "10000000000000000000", - "code" : "0x00", + "balance" : "1000000000000000000", "nonce" : "0", "storage" : { } @@ -45,6 +44,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -73,6 +79,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x03" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -101,6 +114,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -129,6 +149,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -157,6 +184,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -186,6 +220,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x06" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -205,7 +246,6 @@ } }, - "mul1": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", @@ -215,6 +255,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -243,6 +290,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -271,6 +325,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x17" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -299,6 +360,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x8000000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -327,6 +395,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -355,6 +430,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -383,6 +465,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -439,6 +528,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x16" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -467,6 +563,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -495,6 +598,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe9" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -523,6 +633,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -551,6 +668,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -579,6 +703,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -607,6 +738,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -635,6 +773,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -663,6 +808,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -691,6 +843,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -719,6 +878,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -747,6 +913,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -775,6 +948,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -803,6 +983,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -831,6 +1018,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -859,6 +1053,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -887,6 +1088,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -915,6 +1123,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -943,6 +1158,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x8000000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -971,6 +1193,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -999,6 +1228,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1027,6 +1263,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1055,6 +1298,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1083,6 +1333,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1111,6 +1368,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x8000000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1139,6 +1403,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1167,6 +1438,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1195,6 +1473,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1223,6 +1508,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1251,6 +1543,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1279,6 +1578,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1307,6 +1613,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1335,6 +1648,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1363,6 +1683,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1391,6 +1718,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1419,6 +1753,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1447,6 +1788,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1475,6 +1823,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1531,6 +1886,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1559,6 +1921,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1587,6 +1956,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1643,6 +2019,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1671,6 +2054,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1718,7 +2108,7 @@ } }, - "addmod1_overflow3": { + "addmod1_overflow4": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", "currentNumber" : "0", @@ -1755,6 +2145,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1783,6 +2180,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1811,6 +2215,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1839,6 +2250,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x05" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1867,6 +2285,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1895,6 +2320,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1923,6 +2355,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1942,7 +2381,7 @@ } }, - "addmodDivByZero1": { + "addmodDivByZero2": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", "currentNumber" : "0", @@ -1951,6 +2390,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -1980,6 +2426,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2008,6 +2461,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2036,6 +2496,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2148,6 +2615,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2176,6 +2650,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2204,6 +2685,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2232,6 +2720,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x05" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2260,6 +2755,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2288,6 +2790,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2316,6 +2825,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2344,6 +2860,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2372,6 +2895,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2400,6 +2930,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02", + "0x01" : "0x0100000000000f" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2419,6 +2957,42 @@ } }, + "expXY_success": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "1000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02", + "0x01" : "0x0f", + "0x02" : "0x8000" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "1000000000000000000", + "nonce" : "0", + "code" : "{ [[ 0 ]] (CALLDATALOAD 0) [[ 1 ]] (CALLDATALOAD 32) [[ 2 ]] (EXP (SLOAD 0) (SLOAD 1))}", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "0x0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000f", + "gasPrice" : "100000000000000", + "gas" : "100000" + } + }, "exp0": { "env" : { @@ -2429,6 +3003,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x04" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2457,6 +3038,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2485,6 +3073,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xbc8cccccccc888888880000000aaaaaab00000000fffffffffffffff7fffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2513,6 +3108,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2541,6 +3143,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2569,6 +3178,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2597,6 +3213,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2625,6 +3248,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2653,6 +3283,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x04", + "0x01" : "0x02", + "0x02" : "0x08" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2681,6 +3320,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x10", + "0x01" : "0x08", + "0x02" : "0x20" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2709,6 +3357,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100", + "0x01" : "0x80", + "0x02" : "0x0200" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2737,6 +3394,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000", + "0x01" : "0x8000", + "0x02" : "0x020000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2765,6 +3431,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000", + "0x01" : "0x80000000", + "0x02" : "0x0200000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2793,6 +3468,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000000000", + "0x01" : "0x8000000000000000", + "0x02" : "0x020000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2821,6 +3505,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000000000000000000000", + "0x01" : "0x80000000000000000000000000000000", + "0x02" : "0x0200000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2849,6 +3542,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x01" : "0x8000000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2877,6 +3577,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100", + "0x01" : "0xff", + "0x02" : "0x0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2905,6 +3614,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000", + "0x01" : "0xfe01", + "0x02" : "0x010201" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2933,6 +3651,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000", + "0x01" : "0xfd02ff", + "0x02" : "0x01030301" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2961,6 +3688,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000", + "0x01" : "0xfc05fc01", + "0x02" : "0x0104060401" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -2989,6 +3725,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000", + "0x01" : "0xfb09f604ff", + "0x02" : "0x01050a0a0501" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3017,6 +3762,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000000000", + "0x01" : "0xfa0eec0efa01", + "0x02" : "0x01060f140f0601" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3045,6 +3799,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000", + "0x01" : "0xf914dd22eb06ff", + "0x02" : "0x0107152323150701" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3073,6 +3836,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000000000", + "0x01" : "0xf81bc845c81bf801", + "0x02" : "0x01081c3846381c0801" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3101,6 +3873,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000000000000000", + "0x01" : "0xf723ac7d8253dc08ff", + "0x02" : "0x010924547e7e54240901" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3129,6 +3910,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000000000", + "0x01" : "0xf62c88d104d1882cf601", + "0x02" : "0x010a2d78d2fcd2782d0a01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3157,6 +3947,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000000000000000", + "0x01" : "0xf5365c4833ccb6a4c90aff", + "0x02" : "0x010b37a64bcfcf4aa5370b01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3185,6 +3984,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000000000000000000000", + "0x01" : "0xf44125ebeb98e9ee2441f401", + "0x02" : "0x010c42ddf21b9f19efdc420c01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3213,6 +4021,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000000000000000", + "0x01" : "0xf34ce4c5ffad5104361db20cff", + "0x02" : "0x010d4f20d00dbab909cc1e4e0d01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3241,6 +4058,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000000000000000000000", + "0x01" : "0xf25997e139ada3b331e7945af201", + "0x02" : "0x010e5c6ff0ddc873c2d5ea6c5b0e01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3269,6 +4095,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000000000000000000000000000", + "0x01" : "0xf1673e495873f60f7eb5acc6970eff", + "0x02" : "0x010f6acc60cea63c3698c056c7690f01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3297,6 +4132,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000000000000000000000", + "0x01" : "0xf075d70b0f1b82196f36f719d077f001", + "0x02" : "0x01107a372d2f74e272cf59171e30781001" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3325,6 +4169,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000000000000000000000000000", + "0x01" : "0xef856134040c669755c7c022b6a77810ff", + "0x02" : "0x01118ab1645ca45755422870354ea8881101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3353,6 +4206,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000000000000000000000000000000000", + "0x01" : "0xee95dbd2d0085a30be71f86293f0d098ee01", + "0x02" : "0x01129c3c15c100fbac976a98a583f730991201" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3381,6 +4243,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000", + "0x01" : "0xeda745f6fd3851d68db3866a315cdfc85512ff", + "0x02" : "0x0113aed851d6c1fca84402033e297b27c9ab1301" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3409,6 +4280,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000000000000000000000000000000000", + "0x01" : "0xecb99eb1063b1984b725d2e3c72b82e88cbdec01", + "0x02" : "0x0114c2872a2898bea4ec46054167a4a2f174be1401" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3437,6 +4317,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000000000000000000000000000000000000000", + "0x01" : "0xebcce5125534de6b326ead10e3645765a4312e14ff", + "0x02" : "0x0115d749b152c1576391324b46a90c47946632d21501" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3465,6 +4354,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000000000", + "0x01" : "0xeae1182d42dfa98cc73c3e63d280f30e3e8cfce6ea01", + "0x02" : "0x0116ed20fb041418baf4c37d91efb553dbfa9904e71601" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3493,6 +4391,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000000000000000000000000000000000000000", + "0x01" : "0xe9f63715159cc9e33a7502256eae721b304e6fea0316ff", + "0x02" : "0x0118040e1bff182cd3afb8410f81a5092fd6939debfd1701" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3521,6 +4428,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000000000000000000000000000000000000000000000", + "0x01" : "0xe90c40de00872d19573a8d23493fc3a9151e217a1913e801", + "0x02" : "0x01191c122a1b1745008367f9509126ae39066a3189e9141801" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3549,6 +4465,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000000000000000", + "0x01" : "0xe823349d2286a5ec3de3529625f683e56c0903589efad418ff", + "0x02" : "0x011a352e3c45325c4583eb6149e1b7d4e73f709bbb72fd2c1901" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3577,6 +4502,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000000000000000000000000000000000000000000000", + "0x01" : "0xe73b116885641f4651a56f438fd08d61869cfa55465bd944e601", + "0x02" : "0x011b4f636a81778ea1c96f4cab2b998cbc26b00c572e7029451a01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3605,6 +4539,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe653d6571cdebb270b53c9d44c40bcd425165d5af1157d6ba11aff", + "0x02" : "0x011c6ab2cdebf906306b38bbf7d6c52648e2d6bc63859e996e5f1b01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3633,6 +4576,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe56d8280c5c1dc6be448760a77f47c1750f146fd962467ee3579e401", + "0x02" : "0x011d871d80b9e4ff369ba3f4b3ce9beb6f2bb9931fe9243807cd7a1c01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3661,6 +4613,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x010000000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe48814fe44fc1a8f78642d946d7c879b39a055b6988e438647446a1cff", + "0x02" : "0x011ea4a49e3a9ee435d23f98a8826a875a9ae54cb3090d5c3fd547961d01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3689,6 +4650,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01000000000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe3a38ce946b71e74e8ebc966d90f0b139e66b560e1f5b542c0fd25b2e201", + "0x02" : "0x011fc34942d8d9831a0811d8412aecf1e1f58031ffbc16699c151cddb31e01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3717,6 +4687,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100000000000000000000000000000000000000000000000000000000000000", + "0x01" : "0xe2bfe95c5d7067567402dd9d7235fc088ac84eab8113bf8d7e3c288d2f1eff", + "0x02" : "0x0120e30c8c1bb25c9d2219ea196c17ded3d775b231bbd28005b131fa90d11f01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3745,6 +4724,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x01" : "0xe1dd29730112f6ef1d8edabfd4c3c60c823d865cd592abcdf0bdec64a1efe001", + "0x02" : "0x2203ef98a7ce0ef9bf3c04038583f6b2ab4d27e3ed8e5285b6e32c8b61f02001" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3773,6 +4760,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x01" : "0xfb4c498e11e3f82e714be514ef024675bb48d678bd192222cd2e783d4df020ff", + "0x02" : "0x25f3884075dd08b8fb400789097aa95df8750bd17be0d83c9a0fb7ed52102101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3801,6 +4796,21 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100", + "0x01" : "0x0100", + "0x02" : "0x0100", + "0x03" : "0xff", + "0x04" : "0xff", + "0x05" : "0xff", + "0x06" : "0x0101", + "0x07" : "0x0101", + "0x08" : "0x0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3829,6 +4839,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x06c3acd330b959ad6efabce6d2d2125e73a88a65a9880d203dddf5957f7f0001", + "0x04" : "0x8f965a06da0ac41dcb3a34f1d8ab7d8fee620a94faa42c395997756b007ffeff", + "0x05" : "0xbce9265d88a053c18bc229ebff404c1534e1db43de85131da0179fe9ff8100ff", + "0x06" : "0x02b5e9d7a094c19f5ebdd4f2e618f859ed15e4f1f0351f286bf849eb7f810001", + "0x07" : "0xc73b7a6f68385c653a24993bb72eea0e4ba17470816ec658cf9c5bedfd81ff01", + "0x08" : "0xb89fc178355660fe1c92c7d8ff11524702fad6e2255447946442356b00810101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3857,6 +4879,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x4ee4ceeaac565c81f55a87c43f82f7c889ef4fc7c679671e28d594ff7f000001", + "0x04" : "0x82f46a1b4e34d66712910615d2571d75606ceac51fa8ca8c58cf6ca881fe00ff", + "0x05" : "0x81c9fcefa5de158ae2007f25d35c0d11cd735342a48905955a5a6852800200ff", + "0x06" : "0x666ac362902470ed850709e2a29969d10cba09debc03c38d172aeaff81000001", + "0x07" : "0xeb30a3c678a01bde914548f98f3366dc0ffe9f85384ebf1111d03dad7ffe0101", + "0x08" : "0x72d0a7939b6303ce1d46e6e3f1b8be303bfdb2b00f41ad8076b0975782020101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3885,6 +4919,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x109a00e1370d2d2922bf892e85becb54297354b2e5c75388d514ff7f00000001", + "0x04" : "0x54a792f15e9aba7e4ad9e716bc169eea3a6e2e9c49bf9b335874613c8081feff", + "0x05" : "0x5d24a14d8e5e039372cd0f6a0f31e9ed6b75adba9f16b1c5b3edd5ba818300ff", + "0x06" : "0x298e2f316b4ccded5ebf515998d9ec20df69404b04a441782a6aff8100000001", + "0x07" : "0x4335694e98f372183c62a2339fa4ad161e9b4c42240bdc9452abffd07783ff01", + "0x08" : "0xf0f0820797315acd063056bba76f6a9c3e281cdb5197a233967ca94684830101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3913,6 +4959,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xe6540ce46eaf70da9d644015a661e0e245b13f307cb3885514ff7f0000000001", + "0x04" : "0x6526b38b05a6325b80e1c84ab41dc934fd70f33f1bd0eab3d1f61a4707fc00ff", + "0x05" : "0xe959516cd27e5d8fd487b72db2989b3ec2ba9fb7ead41554526fe5a3040400ff", + "0x06" : "0xe7498a48c6ce2530bbe814ee3440c8c44fffab7ad8a277aa6aff810000000001", + "0x07" : "0x2dffa3e901e5a392d15b79f4193d2168147d2aa7c55870b46c3a905d03fc0101", + "0x08" : "0xe16ea721c96539edb4f7fb82de0dad8cccb1e7a6966a6777635f6fb908040101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3941,6 +4999,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xb581ac185aad71db2d177c286929c4c22809e5dcb3085514ff7f000000000001", + "0x04" : "0x75789eb2a64bc971389fbd11a1e6d7abbf95ad25e23fb9aa25e73a0bfc83feff", + "0x05" : "0xfc403fa42ceb6a0d0d3321bd9b2d8af25b1b667f87a04f496c78168d078500ff", + "0x06" : "0xcec5ec213b9cb5811f6ae00428fd7b6ef5a1af39a1f7aa6aff81000000000001", + "0x07" : "0x70ab32233202b98d382d17713fa0be391eaf74f85ba1740c9c3238c4ed85ff01", + "0x08" : "0xb622672a213faa79b32185ff93a7b27a8499e48f7b032cdb4d1a70300c850101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3969,6 +5039,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x1948059de1def03c4ec35fc22c2bb8f2bf45dc33085514ff7f00000000000001", + "0x04" : "0x41f818a8e24eb6d7bb7b193b4f2b5fdcf4bd0d453f2ac3499d8830d391fa00ff", + "0x05" : "0xede6fe4a943dfb5d967a2b85d6728759d40d2ef0ae4bc28bbb1867f98c0600ff", + "0x06" : "0x083c936cbaad5de592badc2e142fe4ebd6103921f7aa6aff8100000000000001", + "0x07" : "0x57385019fe4e0939ca3f35c37cadfaf52fba5b1cdfb02def3866e8068bfa0101", + "0x08" : "0x810ac878bd98428f6be8c6426ba9f9da09e3e33bf4fe10bfa3f8b12c92060101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -3997,6 +5079,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x8bb02654111ad8c60ad8af132283a81f455c33085514ff7f0000000000000001", + "0x04" : "0xa8f75c129dbb8466d6703a2a0b8212131b3248d70e2478862ac40fe17485feff", + "0x05" : "0x5fd4d2de580383ee59f5e800ddb3f1717ceae03aede19d3dec5e5a69918700ff", + "0x06" : "0xc8624230b524b85d6340da48a5db20370fb921f7aa6aff810000000000000001", + "0x07" : "0x287b58a5a13cd7f454468ca616c181712f5ed25433a7d5a894b6ced35f87ff01", + "0x08" : "0x09930d11ac2804fa977bf951593c8dff8498779cc0cdc5812a4fba2f98870101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4025,6 +5119,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x230041a0e7602d6e459609ed39081ec55c33085514ff7f000000000000000001", + "0x04" : "0xc407d8a413ef9079ead457ed686a05ac81039c0cae0a7f6afd01e8461ff800ff", + "0x05" : "0x67a397e0692385e4cd83853aabce220a94d449e885fa867e96d3ef5e180800ff", + "0x06" : "0x70add926e753655d6d0ebe9c0f81368fb921f7aa6aff81000000000000000001", + "0x07" : "0x0bdce80b8378e43f13d454b9d0a4c83cf311b8eaa45d5122cfd544a217f80101", + "0x08" : "0x629c25790e1488998877a9ecdf0fb69637e77d8a4bdc1b46270093ba20080101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4053,6 +5159,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x53017d8eb210db2c8cd4a299079ec55c33085514ff7f00000000000000000001", + "0x04" : "0x48be09b6c6ae2aa660f1972125cecbb1038b5d236ecf766ba786e2c4e887feff", + "0x05" : "0x2e350d847ba73dc2099f83f532951c47269d9fd7e411b50bae00a9581f8900ff", + "0x06" : "0x013ab9e1f0df89a184b4d07080b68fb921f7aa6aff8100000000000000000001", + "0x07" : "0xf387ed41c1050f9da667f429a3e8fb30b61a55ede97d7b8acd797a03cd89ff01", + "0x08" : "0x525696c22bb3ce00fd2e3f6bbb9b4ea1046a5e31fcff2fedf8f8c74d28890101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4081,6 +5199,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xfe0f60957dc223578a0298879ec55c33085514ff7f0000000000000000000001", + "0x04" : "0xc1ea45f348b5d351c4d8fe5c77da979cadc33d866acc42e981278896b1f600ff", + "0x05" : "0x56ddb29bca94fb986ac0a40188b3b53f3216b3559bd8324a77ea8bd8a80a00ff", + "0x06" : "0x2d49ff6b0bbe177ae9317000b68fb921f7aa6aff810000000000000000000001", + "0x07" : "0x185fa9eab94cfe3016b69657e83b23fd24cc6960218254231c3db627a7f60101", + "0x08" : "0xa7a0223829f26d6c635368034320563df4aa5eb62efc87a42bb35f69b20a0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4109,6 +5239,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xe1440264b8ee0cea0218879ec55c33085514ff7f000000000000000000000001", + "0x04" : "0x29575fdce377b23043e489e358581474bc863187fa85f9945473a2be5889feff", + "0x05" : "0x3df8c030ec521fb109c4d887dbbc14c7c9c9921b27058e3503971b60b18b00ff", + "0x06" : "0x67799740340daf4a30f000b68fb921f7aa6aff81000000000000000000000001", + "0x07" : "0x540a4e4635b40585e09ff10b63ffe310dd717fca5c0a51570091e25e378bff01", + "0x08" : "0xdbbaef5c49ffee61b08cde6ebc8dba6e9a62d56c2355d1980cb9e790bc8b0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4137,6 +5279,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xb0e95b83a36ce98218879ec55c33085514ff7f00000000000000000000000001", + "0x04" : "0xc482ab56ec19186dc48c88f30861a850b2253b1ea6dc021589e569bd47f400ff", + "0x05" : "0xcf45c7f9af4bbe4a83055b55b97777ad5e0a3f08b129c9ae208c5d713c0c00ff", + "0x06" : "0xa5cbb62a421049b0f000b68fb921f7aa6aff8100000000000000000000000001", + "0x07" : "0x3bde6ca66dffe1bf5d727c3edea74c7a4af43b3912e6256d37705c8f3bf40101", + "0x08" : "0x3f49a1e40c5213aa4ffed57eb4c1ad2d181b2aaa289e9d59c2256c43480c0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4165,6 +5319,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xe02639036c698218879ec55c33085514ff7f0000000000000000000000000001", + "0x04" : "0x8be664bde946d939ce551b948b503787942d2a7734509288c1b62fd5c48bfeff", + "0x05" : "0xa923a28e7a75aef26c51580ffc686879e4a0b404b089bdbcd751d88b478d00ff", + "0x06" : "0x41ac5ea30fc9b0f000b68fb921f7aa6aff810000000000000000000000000001", + "0x07" : "0x0daa3a177ec975cb69bb4acf4a6e1be7bcc1ad33d1ffad97510f9fea9d8dff01", + "0x08" : "0x19e6822beb889be28310060f4fb9741bfd50a31fa81ec65de21f7b02548d0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4193,6 +5359,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xdb9902ec698218879ec55c33085514ff7f000000000000000000000000000001", + "0x04" : "0x83fab06c6c8fef761ebbb9534c06ac2a9d61820623008069062ff3b1e1f200ff", + "0x05" : "0x3f791dd183ed5b963bd86e0dba1a9dd5b8ceeb078f15c73062f1942fd40e00ff", + "0x06" : "0xe0bfa28fc9b0f000b68fb921f7aa6aff81000000000000000000000000000001", + "0x07" : "0x8133b760dfae27560eb490f235ddfa301f058dee4f01f3fe4b3567d0d3f20101", + "0x08" : "0xcd4cd0124e983af71620fb5f98275965c6a8bebc4b8adc288b63224ee20e0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4221,6 +5399,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x9882ec698218879ec55c33085514ff7f00000000000000000000000000000001", + "0x04" : "0x75c4915e18b96704209738f5ca765568bb4dc4113d56683977825a132c8dfeff", + "0x05" : "0x5c76839bf5a80b1da705dbdf43e4dd6770cd7501af11ff2dab7918dfe18f00ff", + "0x06" : "0xbf228fc9b0f000b68fb921f7aa6aff8100000000000000000000000000000001", + "0x07" : "0xc6a29131e7594004bc2aa79f0d2c402a1409c57c77d284c14b1a3ab0ff8fff01", + "0x08" : "0xe6b3e5cf6ec90e532fef7d08455ebf92a03e9e3f6e224ea0febdf1a9f08f0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4249,6 +5439,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x82ec698218879ec55c33085514ff7f0000000000000000000000000000000001", + "0x04" : "0x3122f4bcdf6dd8b265cd18eb6af28c879aed44a35e0bf59273e39e6c7ff000ff", + "0x05" : "0x6a2b3bc87a02c29b9d27757df43047ecd0f15485270fca27417a701c701000ff", + "0x06" : "0x228fc9b0f000b68fb921f7aa6aff810000000000000000000000000000000001", + "0x07" : "0x88e1259502eef93d46060aacc9e2ff506c734dade0b6714ab12d17e46ff00101", + "0x08" : "0x4a103813c12c12169b218296bb0a9eae80cf8d2b158aa70eb990f99480100101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4277,6 +5479,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xec698218879ec55c33085514ff7f000000000000000000000000000000000001", + "0x04" : "0x722ad218eb1995a2d257c4c06d8de993c203cfc8e3512df7d633e17e908ffeff", + "0x05" : "0x8ac9b5ec08d74612cb29f941481d274b51721af2296207c0da8d24667f9100ff", + "0x06" : "0x8fc9b0f000b68fb921f7aa6aff81000000000000000000000000000000000001", + "0x07" : "0x81d5ff63680841482299f3eab616446dcd336f537c0c565aa4112ab95d91ff01", + "0x08" : "0x9c6ca90dac4e97dea02ac969e8649ee9e6232e0c3f4797411151cb8f90910101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4305,6 +5519,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x698218879ec55c33085514ff7f00000000000000000000000000000000000001", + "0x04" : "0x8a2cbd9f40794e2205b13306f2aa0a43c60823c64b95d8601fa4f1e521ee00ff", + "0x05" : "0xc1b5a1e3a81da51b10d84e880f0113ff67b863ddad3faf1f4ecf413f101200ff", + "0x06" : "0xc9b0f000b68fb921f7aa6aff8100000000000000000000000000000000000001", + "0x07" : "0x410be68e49452a1fbcd863bf6e8d637f8eae4979c34c88d552afbcc20fee0101", + "0x08" : "0xf540cb714754b5b1eb0373833833bd7fb0ee925ce8b92962500b7a1c22120101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4333,6 +5559,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x8218879ec55c33085514ff7f0000000000000000000000000000000000000001", + "0x04" : "0xb795ad7ac24cfbb7435cf53bd3584f3d4b2709935635c3ceb66e761ff091feff", + "0x05" : "0x1f0bb7be91a0ccd0cca93d75cf03de3e6b56fe8f1c54242617665327219300ff", + "0x06" : "0xb0f000b68fb921f7aa6aff810000000000000000000000000000000000000001", + "0x07" : "0xad571756ecbff1bfdef064861e5e92c5d897a9cc380e54bdbaabd80bb793ff01", + "0x08" : "0xd8b5b531989e689f700dcdb43ab90e79a49dfbbb5a13dbf751df98bb34930101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4361,6 +5599,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x18879ec55c33085514ff7f000000000000000000000000000000000000000001", + "0x04" : "0x67e4797dc21f02ce4a7c52218c7dbea5d212e6c244e24f0ba4c08613c7ec00ff", + "0x05" : "0xa1ce1a085f258785846939cc1d2e8725ac94ad4dff8913234e00679fb41400ff", + "0x06" : "0xf000b68fb921f7aa6aff81000000000000000000000000000000000000000001", + "0x07" : "0xcce501857a1cb45473915a28082af950e0f78f7e2de68ce748adb661b3ec0101", + "0x08" : "0x3b2e28d274a16c08b58a23bad63bba6d7b09685769d1f68ca3873bedc8140101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4389,6 +5639,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x879ec55c33085514ff7f00000000000000000000000000000000000000000001", + "0x04" : "0x7fd07055ff50cdfe4b4bd9a15133d72d3607d92eb7ac81bac93db7ff4c93feff", + "0x05" : "0x665ac5c769e87f61d5993abc26522fbfca2734d76a63216b2d550d29c79500ff", + "0x06" : "0xb68fb921f7aa6aff8100000000000000000000000000000000000000000001", + "0x07" : "0x1c93db67c9884bc694686d69a25a5d7ed089841d5ce147fdd7199ab00d95ff01", + "0x08" : "0x485053d8ff66be52036597520344fac87b6a305426a9e49221d3f934dc950101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4417,6 +5679,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x9ec55c33085514ff7f0000000000000000000000000000000000000000000001", + "0x04" : "0xec447e662ac08957d7e290a421dbf54c0aaf43aadc9cc465ad0b02f071ea00ff", + "0x05" : "0xdc9178d3bab470096f01477c859b5f4173986640b659426412a653465c1600ff", + "0x06" : "0xb68fb921f7aa6aff810000000000000000000000000000000000000000000001", + "0x07" : "0xdcf0a770777610503596ae0311af46c171151ed45107d7e7bb8f74bb5bea0101", + "0x08" : "0x4d65773387993928c95c861274232d3fb6f6b7fe1b22e4e61a30e71172160101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4445,6 +5719,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xc55c33085514ff7f000000000000000000000000000000000000000000000001", + "0x04" : "0x537ca0f03f974303005f1e6693b55b72315a166841732e42b8353724a495feff", + "0x05" : "0x86418797ec60058de6cca47dfdbee79923ac49d7801e01840041ca76719700ff", + "0x06" : "0x8fb921f7aa6aff81000000000000000000000000000000000000000000000001", + "0x07" : "0x56a55341ab8d4318f1cfb55d5f21e2ba35d7e070a72bac6b2b21baae5f97ff01", + "0x08" : "0x55ddd0ec77909de6d8311116cf520398e816f928b06fdd90ec239d0488970101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4473,6 +5759,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x5c33085514ff7f00000000000000000000000000000000000000000000000001", + "0x04" : "0xd542e526003539ead104274aff2d78332366e29d328c2161f0c120731fe800ff", + "0x05" : "0xc706cb25e8384ce9bb5c9cb48415238ba03e16c448e292c0a101843b081800ff", + "0x06" : "0xb921f7aa6aff8100000000000000000000000000000000000000000000000001", + "0x07" : "0x4ca55f89202c524cb0f1cb3195d13c8d94a9f7a05c59e1d4031577c707e80101", + "0x08" : "0x8c4b0574e9156b80035f3ecdcf1fe79d273ed7559747a4322bcd338f20180101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4501,6 +5799,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x33085514ff7f0000000000000000000000000000000000000000000000000001", + "0x04" : "0x7f510dd7198cac0a92ff7ea80451838c0dfa12114c41a0ef05907397f897feff", + "0x05" : "0x1275e752b6aee228ecba5e9b57ef1111deff3c651e2cfbf2cccd13151f9900ff", + "0x06" : "0x21f7aa6aff810000000000000000000000000000000000000000000000000001", + "0x07" : "0x6646340ad51a03bb710caf05756b685b33c7dad62ae68d369243700ead99ff01", + "0x08" : "0x29d80e8060ef2221929bb18215586c742686d6860e028ca0456b443238990101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4529,6 +5839,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x085514ff7f000000000000000000000000000000000000000000000000000001", + "0x04" : "0x1d164db738eb6893868b361ad2803f97be35764456e82a837667a693d1e600ff", + "0x05" : "0x8b92c24abebf376a5aab5ff4dfd3538a03d38a10bced2aae8e1a8a85b81a00ff", + "0x06" : "0xf7aa6aff81000000000000000000000000000000000000000000000000000001", + "0x07" : "0x6931bda98c70e860a1f6a5224940f1ec7e6734cd9456c95806384f7cb7e60101", + "0x08" : "0x3402a9db66492dfc2a220715e76243469462f24edc56903ba1d8e96ed21a0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4557,6 +5879,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x5514ff7f00000000000000000000000000000000000000000000000000000001", + "0x04" : "0x178918ffbcb401d4efd2f7dfb4d01a897172267f0f491121ac52dd614899feff", + "0x05" : "0x38ecff71480ca0b422f2ed6f780d5fead2ae234a49104b10a86f7f0dd19b00ff", + "0x06" : "0xaa6aff8100000000000000000000000000000000000000000000000000000001", + "0x07" : "0xd02811cb5dc1d80567e810532b235b7672f5c78cd6e89bb511d5e2d8f79bff01", + "0x08" : "0x1b4e6404f474c18055d30bb8987672f59e97980d6f9de1764c0fbec5ec9b0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4585,6 +5919,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x14ff7f0000000000000000000000000000000000000000000000000000000001", + "0x04" : "0xffd368e44b3f85cb81ae394c9809ca9fa2db46a83d7880a912ab6d4a87e400ff", + "0x05" : "0x0981ad53c19b15a94bcf0bf20235dd0da9df25f46ae635029fe2062e6c1c00ff", + "0x06" : "0x6aff810000000000000000000000000000000000000000000000000000000001", + "0x07" : "0x19df06ffa28250867006726405fbc05d43dc2f9d2f025006db089bd46be40101", + "0x08" : "0x243fffe3a4f2982f45055c08f379648ab886da8027a7401117a8e0b8881c0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4613,6 +5959,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xff7f000000000000000000000000000000000000000000000000000000000001", + "0x04" : "0x41e065d46e0349cfe624c4e8a2034aea1f7edfff80e511cd8067d488949bfeff", + "0x05" : "0xa84162ca6675a22c4c79dfc4ea15f760db5a04dbf04246764199b668879d00ff", + "0x06" : "0xff81000000000000000000000000000000000000000000000000000000000001", + "0x07" : "0x1226984faa6b05ebdbd45d8477fa4fd5b55bfd5061de03c319282b153d9dff01", + "0x08" : "0x5cc9e6b0b749fd94541ad00364bdec2fca7816981ca3e38f485decc7a49d0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4641,6 +5999,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x7f00000000000000000000000000000000000000000000000000000000000001", + "0x04" : "0xe9772778f50fa0a69cd10fa019ac56d72ac7a7d7af26c4ba28415c8f41e200ff", + "0x05" : "0x33f0385ef73feebdb952e5adb643dd0fa178fd9271578219ad50a73d241e00ff", + "0x06" : "0x8100000000000000000000000000000000000000000000000000000000000001", + "0x07" : "0xfd405cce8f73dffc04a6f0ff6ffc6bf7961876d09c5b4933a68f0cc623e20101", + "0x08" : "0xc5a8f4566fd2e96e4ce3a8b3ec0863e7b20bc3b2f3dc5261ba8a0174421e0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4669,6 +6039,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x01", + "0x04" : "0xf9cb87f5b1ab58602f52a1e9d392e5675b86a59a53943a8d4ec2a915dc9dfeff", + "0x05" : "0x893d729a64e318860ec5047e70e598da163eb41e71e74b04dfd4712d419f00ff", + "0x06" : "0x01", + "0x07" : "0xee5f2839c1b4f6ca05e6fdb04e2fb49c0f860b3765c27dc781a150cb7f9fff01", + "0x08" : "0xb4c358e3c6bcddfb509ea487d733df0e1854f29c3b6bfd4a8caabe3f609f0101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4697,6 +6079,19 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01", + "0x03" : "0x01", + "0x04" : "0xb8247842bb5ce75c08d0c251669ed5870fa24a22952e5db3a7c66c59ffe000ff", + "0x05" : "0xee526e5a06f2a990b2bf6c951e5feabf0e07ee16877296e1be872db9e02000ff", + "0x06" : "0x01", + "0x07" : "0xeda7d024b6de40a9d3b966e71f10a4667edc5b71cab07aeabcac6249dfe00101", + "0x08" : "0x512ecfaeeb11205f0833e1054dcb1300488e0954be5af77a49e143aa00200101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4725,6 +6120,19 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01", + "0x03" : "0x01", + "0x04" : "0x8dcb65b5494eba78cd6756a6f9851f6e26d0f2bb9ecd7e9abd7e9b11209ffeff", + "0x05" : "0x6694bb31b20cd625f3756897dae6d738f2e64467b5b6f10fa3e07763ffa100ff", + "0x06" : "0x01", + "0x07" : "0xe678999aeffd1f1f45081f64de7f80ab083dd7df04721ed64ee04c03bda1ff01", + "0x08" : "0x39b68fb9898dd7568abd178397251ce8226a25c1d305a4e79573333520a10101" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4753,6 +6161,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4781,6 +6196,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x6a" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4809,6 +6231,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaf4" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4837,6 +6266,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x6af4" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4865,6 +6301,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x126af4" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4893,6 +6336,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4921,6 +6370,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4949,6 +6404,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -4977,6 +6439,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -5005,6 +6474,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -5033,6 +6509,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xf0000000000001" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -5061,6 +6544,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -5089,6 +6579,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -5117,6 +6613,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -5145,6 +6647,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", @@ -5173,6 +6681,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", From 05e704fb27c908673f4bef75290c720c1697e8ae Mon Sep 17 00:00:00 2001 From: winsvega Date: Tue, 31 Mar 2015 19:23:46 +0300 Subject: [PATCH 14/45] Check State vmTests expect section --- vmBitwiseLogicOperationTestFiller.json | 410 +++++++++++++++++++++++- vmBlockInfoTestFiller.json | 76 ++++- vmEnvironmentalInfoTestFiller.json | 414 +++++++++++++++++++++++-- vmIOandFlowOperationsTestFiller.json | 291 +++++++++++++++++ 4 files changed, 1147 insertions(+), 44 deletions(-) diff --git a/vmBitwiseLogicOperationTestFiller.json b/vmBitwiseLogicOperationTestFiller.json index 1eb923f4f..265ee6677 100644 --- a/vmBitwiseLogicOperationTestFiller.json +++ b/vmBitwiseLogicOperationTestFiller.json @@ -8,6 +8,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -36,6 +42,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "10000000000000000000", @@ -64,6 +77,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "10000000000000000000", @@ -93,6 +112,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -121,6 +147,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -149,6 +182,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -177,6 +216,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -206,6 +252,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -234,6 +286,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -262,6 +321,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -290,6 +355,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -319,6 +391,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -347,6 +425,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -375,6 +460,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -403,6 +494,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -431,6 +529,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -460,6 +564,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -488,6 +599,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -516,6 +633,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -544,6 +667,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -572,6 +702,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -600,6 +737,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x80" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -628,6 +772,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x80" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -655,6 +806,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x80" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -683,6 +841,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -711,6 +876,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -739,6 +910,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -766,6 +944,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -793,6 +978,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -821,6 +1013,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeefeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -849,6 +1048,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -877,6 +1083,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x03" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -905,6 +1118,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x03" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -932,6 +1152,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -959,6 +1186,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -987,6 +1221,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1015,6 +1256,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1043,6 +1290,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x03" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1071,6 +1325,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1098,6 +1359,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xfedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1125,6 +1393,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x1111111111111111111111111111111111111111111111111111111111111111" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1153,6 +1428,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x1111111111111111111111111111101111111111111111111111111111111111" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1181,6 +1463,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1209,6 +1498,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1237,6 +1532,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1265,6 +1566,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1293,6 +1600,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1321,6 +1634,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1349,6 +1669,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1367,6 +1694,7 @@ "gas" : "100000" } }, + "byte1": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", @@ -1376,6 +1704,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1403,6 +1738,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x04" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1431,6 +1773,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x08" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1459,6 +1808,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x10" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1487,6 +1843,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x20" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1506,7 +1869,6 @@ } }, - "byte6": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", @@ -1516,6 +1878,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x40" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1544,6 +1913,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x80" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1573,6 +1949,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1601,6 +1983,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1629,6 +2017,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1657,6 +2051,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000000000", @@ -1676,11 +2076,3 @@ } } } - - - - - - - - diff --git a/vmBlockInfoTestFiller.json b/vmBlockInfoTestFiller.json index 2455b2387..80d650b3d 100644 --- a/vmBlockInfoTestFiller.json +++ b/vmBlockInfoTestFiller.json @@ -8,6 +8,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -64,6 +70,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -92,6 +104,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -120,6 +138,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -148,6 +172,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6", + "0x01" : "0xad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a5", + "0x02" : "0x6ca54da2c4784ea43fd88b3402de07ae4bced597cbb19f323b7595857a6720ae" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -176,6 +209,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -204,6 +243,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -232,6 +278,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -254,12 +307,19 @@ "number": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", - "currentNumber" : "0", + "currentNumber" : "1", "currentGasLimit" : "1000000", "currentDifficulty" : "256", "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -288,6 +348,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0100" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -316,6 +383,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0f4240" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", diff --git a/vmEnvironmentalInfoTestFiller.json b/vmEnvironmentalInfoTestFiller.json index 951e65c32..280c0d35e 100644 --- a/vmEnvironmentalInfoTestFiller.json +++ b/vmEnvironmentalInfoTestFiller.json @@ -8,6 +8,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -36,6 +43,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "storage" : { + "0x" : "0xcd1722f3947def4cf144679da39c4c32bdc35681" + } + } + }, "pre" : { "cd1722f3947def4cf144679da39c4c32bdc35681" : { "balance" : "100000000000000000000000", @@ -64,6 +78,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -83,6 +103,47 @@ } }, + "balance01": { + "env" : { + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", + "currentNumber" : "0", + "currentGasLimit" : "1000000", + "currentDifficulty" : "256", + "currentTimestamp" : "1", + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" + }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x": "0x01" + } + } + }, + "pre" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "nonce" : "0", + "code" : "{ [[ 0 ]] (BALANCE 0xcd1722f3947def4cf144679da39c4c32bdc35681 )}", + "storage": {} + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "1", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "exec" : { + "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", + "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", + "value" : "1000000000000000000", + "data" : "", + "gasPrice" : "1000000000", + "gas" : "100000000000" + } + }, + "balanceAddressInputTooBig": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", @@ -92,6 +153,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -120,6 +187,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -148,6 +221,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x152d02c7e14af6800000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -177,6 +257,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x152d02c7e14af6800000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -205,6 +292,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expet" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -224,7 +318,6 @@ } }, - "balanceCaller3": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", @@ -234,6 +327,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -262,6 +362,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xcd1722f3947def4cf144679da39c4c32bdc35681" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -290,6 +397,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xcd1722f3947def4cf144679da39c4c32bdc35681" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -319,6 +433,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0de0b6b3a7640000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -348,6 +469,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x0256000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -376,6 +504,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -404,6 +538,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff23" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -432,6 +573,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xabcdef0000000000000000000000000000000000000000000000000024000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -460,6 +608,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -488,6 +642,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -516,6 +677,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x21" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -544,6 +712,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x21" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -572,6 +747,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x2345000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -600,6 +782,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -628,6 +816,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -656,6 +850,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -684,6 +884,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -712,6 +918,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x2300000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -740,6 +953,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -768,11 +987,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x2345000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ (CALLDATACOPY 0 1 2 ) (RETURN 0 (MSIZE))}", + "code" : "{ (CALLDATACOPY 0 1 2 ) [[0]] (MLOAD 0) (RETURN 0 (MSIZE))}", "storage": {} } }, @@ -796,11 +1022,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x00" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ (CALLDATACOPY 0 0 0 ) (RETURN 0 (MSIZE))}", + "code" : "{ (CALLDATACOPY 0 0 0 ) [[0]] (MLOAD 0) (RETURN 0 (MSIZE))}", "storage": {} } }, @@ -824,11 +1057,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ (CALLDATACOPY 0 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa 0xff ) (RETURN 0 (MSIZE))}", + "code" : "{ (CALLDATACOPY 0 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa 0xff ) [[0]] (MLOAD 0) (RETURN 0 (MSIZE))}", "storage": {} } }, @@ -852,11 +1091,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ (CALLDATACOPY 0 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa 9 ) (RETURN 0 (MSIZE))}", + "code" : "{ (CALLDATACOPY 0 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa 9 ) [[0]] (MLOAD 0) (RETURN 0 (MSIZE))}", "storage": {} } }, @@ -880,11 +1125,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "export" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x2300000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ (CALLDATACOPY 0 1 1 ) (RETURN 0 (MSIZE))}", + "code" : "{ (CALLDATACOPY 0 1 1 ) [[0]] (MLOAD 0) (RETURN 0 (MSIZE))}", "storage": {} } }, @@ -908,11 +1160,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "1000000000000000000", "nonce" : "0", - "code" : "{ (CALLDATACOPY 0 1 0 ) (RETURN 0 (MSIZE))}", + "code" : "{ (CALLDATACOPY 0 1 0 ) [[0]] (MLOAD 0) (RETURN 0 (MSIZE))}", "storage": {} } }, @@ -936,6 +1194,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x04" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -964,6 +1229,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -992,34 +1263,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, - "pre" : { + "expect" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { - "balance" : "100000000000000000000000", - "nonce" : "0", - "code" : "{ (CODECOPY 0 0 5 ) [[ 0 ]] @0 }", - "storage": {} + "storage" : { + "0x" : "0x6005600060000000000000000000000000000000000000000000000000000000" + } } }, - "exec" : { - "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", - "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", - "value" : "1000000000000000000", - "data" : "0x1234567890abcdef01234567890abcdef", - "gasPrice" : "1000000000", - "gas" : "100000000000" - } - }, - - "codecopy0": { - "env" : { - "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", - "currentNumber" : "0", - "currentGasLimit" : "1000000", - "currentDifficulty" : "256", - "currentTimestamp" : "1", - "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" - }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1048,6 +1298,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1076,6 +1332,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x075bcd15" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1104,6 +1367,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1132,6 +1401,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x1a" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1161,6 +1437,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1229,6 +1516,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "storage" : { + "0x" : "0x04" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1263,6 +1561,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1291,6 +1595,16 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1326,6 +1640,18 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x6005600055000000000000000000000000000000000000000000000000000000" + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "code" : "0x6005600055", + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1360,6 +1686,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x6005600055000000000000000000000000000000000000000000000000000000" + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1394,6 +1731,16 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + }, + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1445,6 +1792,5 @@ "gasPrice" : "2015", "gas" : "100000000001" } - }, - + } } diff --git a/vmIOandFlowOperationsTestFiller.json b/vmIOandFlowOperationsTestFiller.json index 01019892f..3253ec2cd 100644 --- a/vmIOandFlowOperationsTestFiller.json +++ b/vmIOandFlowOperationsTestFiller.json @@ -8,6 +8,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -64,6 +71,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -120,6 +134,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x01" : "0x17" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -148,6 +169,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -176,6 +203,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -232,6 +265,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x01" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -260,6 +300,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x01" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -288,6 +335,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -539,6 +592,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -567,6 +626,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x01" : "0xff00000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -595,6 +661,16 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "balance" : "100000000000000000000000", + "code" : "0x60ff60015360ee600253600051600155", + "nonce" : "0", + "storage" : { + "0x01" : "0xffee0000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -623,6 +699,15 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xff", + "0x0a" : "0xee", + "0x14" : "0xff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -651,6 +736,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xff", + "0x0a" : "0xee" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -735,6 +828,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -763,6 +863,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1099,6 +1206,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x02" : "0x23" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1183,6 +1297,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x02" : "0x23" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1323,6 +1444,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x02" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1379,6 +1507,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1407,6 +1542,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1547,6 +1689,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x12" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1630,6 +1779,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x02" : "0x23" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1714,6 +1870,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x02" : "0x23" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1854,6 +2017,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x02" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1910,6 +2080,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -2105,6 +2282,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x02" : "0x23" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -2189,6 +2373,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x02" : "0x23" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -2415,6 +2606,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x01" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -2443,6 +2641,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x01" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -2583,6 +2788,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x04", + "0x03" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -2793,6 +3006,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x04", + "0x02" : "0x23" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -2884,6 +3105,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x04", + "0x02" : "0x23" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -3098,6 +3327,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -3126,6 +3361,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x05" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -3154,6 +3396,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x20" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -3182,6 +3431,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x20" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -3210,6 +3466,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x40" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -3238,6 +3501,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x80" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -3266,6 +3536,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x018680" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -3294,6 +3571,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01869e" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -3490,6 +3774,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x45" : "0xcd1722f3947def4cf144679da39c4c32bdc35681" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", From ba3cf808caf80fd0a36d8f4e1271573f2d388cae Mon Sep 17 00:00:00 2001 From: winsvega Date: Wed, 1 Apr 2015 13:49:31 +0300 Subject: [PATCH 15/45] Check State vmTests --- vmPushDupSwapTestFiller.json | 461 +++++++++++++++++++++++++++++- vmSha3TestFiller.json | 86 +++++- vmSystemOperationsTestFiller.json | 211 +++++++++++++- 3 files changed, 750 insertions(+), 8 deletions(-) diff --git a/vmPushDupSwapTestFiller.json b/vmPushDupSwapTestFiller.json index 9b8930e01..f1c9c676c 100644 --- a/vmPushDupSwapTestFiller.json +++ b/vmPushDupSwapTestFiller.json @@ -8,6 +8,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -64,6 +71,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -92,6 +106,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -120,6 +141,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -148,6 +176,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xbbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -176,6 +211,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xaabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -204,6 +246,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x99aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -232,6 +281,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x8899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -260,6 +316,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -288,6 +351,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x66778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -316,6 +386,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x5566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -344,6 +421,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -372,6 +456,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x33445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -400,6 +491,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x2233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -428,6 +526,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -456,6 +561,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x10112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -484,6 +596,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -512,6 +631,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -540,6 +666,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -568,6 +701,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -596,6 +736,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xbbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -624,6 +771,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0xaabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -652,6 +806,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x99aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -680,6 +841,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x8899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -708,6 +876,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x778899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -736,6 +911,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x66778899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -765,6 +947,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x5566778899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -793,6 +982,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x445566778899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -821,6 +1017,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x33445566778899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -849,6 +1052,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x2233445566778899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -877,6 +1087,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x112233445566778899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -905,6 +1122,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -933,6 +1157,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "bbccddeeff00112233445566778899aabbccddee" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -952,7 +1182,6 @@ } }, - "push32FillUpInputWithZerosAtTheEnd": { "env" : { "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6", @@ -962,6 +1191,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1018,6 +1253,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1074,6 +1316,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x02" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1102,6 +1351,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x03" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1130,6 +1386,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x04" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1158,6 +1421,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x05" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1186,6 +1456,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x06" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1214,6 +1491,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x07" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1242,6 +1526,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x08" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1270,6 +1561,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x09" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1298,6 +1596,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x0a" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1326,6 +1631,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x0b" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1354,6 +1666,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x0c" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1382,6 +1701,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x0d" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1410,6 +1736,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x0e" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1438,6 +1771,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x0f" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1466,6 +1806,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x10" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1494,6 +1841,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x10112233445566778899aabbccddeeff00112233445566778899aabbccddeeff" : "0x03" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1550,6 +1904,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x02" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1578,6 +1939,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x03" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1606,6 +1974,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x04" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1634,6 +2009,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x05" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1662,6 +2044,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x06" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1690,6 +2079,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x07" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1718,6 +2114,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x08" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1746,6 +2149,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x09" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1774,6 +2184,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x0a" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1802,6 +2219,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x0b" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1830,6 +2254,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x0c" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1858,6 +2289,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x0d" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1886,6 +2324,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x0e" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1914,6 +2359,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x0f" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1942,6 +2394,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x10" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", diff --git a/vmSha3TestFiller.json b/vmSha3TestFiller.json index f10601f00..e738975d8 100644 --- a/vmSha3TestFiller.json +++ b/vmSha3TestFiller.json @@ -8,6 +8,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -36,6 +43,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xc41589e7559804ea4a2080dad19d876a024ccb05117835447d72ce08c1d020ec" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -64,6 +78,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x6bd2dd6bd408cbee33429358bf24fdc64612fbf8b1b4db604518f40ffd34b607" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -260,6 +281,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x54a8c0ab653c15bfb48b47fd011ba2b9617af01cb45cab344acd57c924d56798" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", @@ -288,6 +316,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", @@ -316,6 +351,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", @@ -344,6 +386,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", @@ -372,6 +421,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", @@ -400,6 +456,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", @@ -428,6 +491,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", @@ -456,6 +526,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", @@ -484,6 +561,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0xbc36789e7a1e281436464229828f817d6612f7b477d66591ff96a9e064bcc98a" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", @@ -501,5 +585,5 @@ "gasPrice" : "1", "gas" : "0x100000000" } - }, + } } diff --git a/vmSystemOperationsTestFiller.json b/vmSystemOperationsTestFiller.json index bdbbdc29b..b1a289ec9 100644 --- a/vmSystemOperationsTestFiller.json +++ b/vmSystemOperationsTestFiller.json @@ -8,6 +8,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x945304eb96065b2a98b57a48a06ae28d285a71b5" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -36,6 +43,12 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100", @@ -120,6 +133,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -156,6 +180,13 @@ "currentTimestamp" : "2", "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x0f4240" : "0x01" + } + } + }, "exec" : { "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6", "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681", @@ -186,6 +217,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -222,6 +264,16 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -258,6 +310,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "post" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x80" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -294,6 +357,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -548,6 +622,16 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "20000000", @@ -582,6 +666,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01", + "0x01" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "20000000", @@ -610,6 +702,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01", + "0x01" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "20000000", @@ -638,6 +738,14 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01", + "0x01" : "0x01" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "20000000", @@ -666,6 +774,11 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "100000000000000000000023" + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -702,6 +815,11 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "aa1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "100000000000000000000000" + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -738,6 +856,11 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "balance" : "23" + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -774,10 +897,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "storage" : { + "0x" : "0x3700000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "cd1722f3947def4cf144679da39c4c32bdc35681" : { "balance" : "23", - "code" : "{ (MSTORE8 0 55) (RETURN 0 1)}", + "code" : "{ (MSTORE8 0 55) [[0]](MLOAD 0) (RETURN 0 1)}", "nonce" : "0", "storage" : { } @@ -791,7 +921,7 @@ "value" : "23", "data" : "0xaa", "gasPrice" : "100000000000000", - "gas" : "1000" + "gas" : "100000" } }, @@ -804,10 +934,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "storage" : { + "0x" : "0x3700000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "cd1722f3947def4cf144679da39c4c32bdc35681" : { "balance" : "23", - "code" : "{ (MSTORE8 0 55) (RETURN 0 2)}", + "code" : "{ (MSTORE8 0 55) [[0]](MLOAD 0) (RETURN 0 2)}", "nonce" : "0", "storage" : { } @@ -821,7 +958,7 @@ "value" : "23", "data" : "0xaa", "gasPrice" : "100000000000000", - "gas" : "1000" + "gas" : "100000" } }, @@ -834,10 +971,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "cd1722f3947def4cf144679da39c4c32bdc35681" : { + "storage" : { + "0x" : "0x3700000000000000000000000000000000000000000000000000000000000000" + } + } + }, "pre" : { "cd1722f3947def4cf144679da39c4c32bdc35681" : { "balance" : "23", - "code" : "{ (MSTORE8 0 55) (RETURN 0 33)}", + "code" : "{ (MSTORE8 0 55) [[0]](MLOAD 0) (RETURN 0 33)}", "nonce" : "0", "storage" : { } @@ -851,7 +995,7 @@ "value" : "23", "data" : "0xaa", "gasPrice" : "100000000000000", - "gas" : "1000" + "gas" : "100000" } }, @@ -900,6 +1044,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x80" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -936,6 +1091,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x" : "0x01" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -972,6 +1138,13 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa" + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1000,6 +1173,17 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x23" : "0x01" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "storage" : { + } + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1144,6 +1328,11 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "100000000000000000000023" + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", @@ -1180,6 +1369,16 @@ "currentTimestamp" : "1", "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" }, + "expect" : { + "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { + "storage" : { + "0x23" : "0x01" + } + }, + "945304eb96065b2a98b57a48a06ae28d285a71b5" : { + "balance" : "23" + } + }, "pre" : { "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : { "balance" : "100000000000000000000000", From 923e452846241f9f97b7fb0dc3351c0c479089b6 Mon Sep 17 00:00:00 2001 From: winsvega Date: Thu, 2 Apr 2015 18:33:28 +0300 Subject: [PATCH 16/45] Check State Style Changes --- TestHelper.cpp | 8 +------- TestHelper.h | 6 ++---- stTransactionTestFiller.json | 2 ++ 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index 0061b2ee8..2c6ee8d44 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -205,13 +205,7 @@ void ImportTest::importTransaction(json_spirit::mObject& _o) } } -void ImportTest::checkExpectedState(State const& _stateExpect, State const& _statePost, WhenError _throw) -{ - stateOptionsMap defaultMap; - checkExpectedState(_stateExpect, _statePost, defaultMap, _throw); -} - -void ImportTest::checkExpectedState(State const& _stateExpect, State const& _statePost, stateOptionsMap const& _expectedStateOptions, WhenError _throw) +void ImportTest::checkExpectedState(State const& _stateExpect, State const& _statePost, stateOptionsMap const _expectedStateOptions, WhenError _throw) { #define CHECK(a,b) \ if (_throw == WhenError::Throw) \ diff --git a/TestHelper.h b/TestHelper.h index 81251649a..04ca95be4 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -99,8 +99,7 @@ namespace test struct ImportStateOptions { - ImportStateOptions():m_bHasBalance(false), m_bHasNonce(false), m_bHasCode(false), m_bHasStorage(false) {} - ImportStateOptions(bool _bSetAll):m_bHasBalance(_bSetAll), m_bHasNonce(_bSetAll), m_bHasCode(_bSetAll), m_bHasStorage(_bSetAll) {} + ImportStateOptions(bool _bSetAll = false):m_bHasBalance(_bSetAll), m_bHasNonce(_bSetAll), m_bHasCode(_bSetAll), m_bHasStorage(_bSetAll) {} bool isAllSet() {return m_bHasBalance && m_bHasNonce && m_bHasCode && m_bHasStorage;} bool m_bHasBalance; bool m_bHasNonce; @@ -121,8 +120,7 @@ public: void importTransaction(json_spirit::mObject& _o); void exportTest(bytes const& _output, eth::State const& _statePost); - static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, WhenError _throw = WhenError::Throw); - static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, stateOptionsMap const& _expectedStateOptions, WhenError _throw = WhenError::Throw); + static void checkExpectedState(eth::State const& _stateExpect, eth::State const& _statePost, stateOptionsMap const _expectedStateOptions = stateOptionsMap(), WhenError _throw = WhenError::Throw); eth::State m_statePre; eth::State m_statePost; diff --git a/stTransactionTestFiller.json b/stTransactionTestFiller.json index d936646cd..28e7318fd 100644 --- a/stTransactionTestFiller.json +++ b/stTransactionTestFiller.json @@ -278,6 +278,7 @@ }, "expect" : { "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", "storage" : { } } @@ -331,6 +332,7 @@ }, "expect" : { "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0", "storage" : { } } From c38c8bb5676d39f52a1aef4f41b01c252a94e5ca Mon Sep 17 00:00:00 2001 From: winsvega Date: Fri, 3 Apr 2015 23:40:51 +0300 Subject: [PATCH 17/45] Check State style changes --- TestHelper.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index 2c6ee8d44..80722465c 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -157,7 +157,7 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state, stateOptio _state.setStorage(address, toInt(j.first), toInt(j.second)); } - for (int i=0; i Date: Mon, 6 Apr 2015 17:40:01 +0300 Subject: [PATCH 18/45] Check State Style + Rebase --- TestHelper.cpp | 14 +++++++------- vm.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index 80722465c..94751c1ec 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -115,14 +115,14 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state, stateOptio json_spirit::mObject o = i.second.get_obj(); ImportStateOptions stateOptions; - u256 iBalance = 0, iNonce = 0; + u256 balance = 0, nonce = 0; if (o.count("balance") > 0) { stateOptions.m_bHasBalance = true; if (bigint(o["balance"].get_str()) >= c_max256plus1) BOOST_THROW_EXCEPTION(ValueTooLarge() << errinfo_comment("State 'balance' is equal or greater than 2**256") ); - iBalance = toInt(o["balance"]); + balance = toInt(o["balance"]); } if (o.count("nonce") > 0) @@ -130,7 +130,7 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state, stateOptio stateOptions.m_bHasNonce = true; if (bigint(o["nonce"].get_str()) >= c_max256plus1) BOOST_THROW_EXCEPTION(ValueTooLarge() << errinfo_comment("State 'nonce' is equal or greater than 2**256") ); - iNonce = toInt(o["nonce"]); + nonce = toInt(o["nonce"]); } Address address = Address(i.first); @@ -144,11 +144,11 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state, stateOptio if (code.size()) { - _state.m_cache[address] = Account(iBalance, Account::ContractConception); + _state.m_cache[address] = Account(balance, Account::ContractConception); _state.m_cache[address].setCode(code); } else - _state.m_cache[address] = Account(iBalance, Account::NormalCreation); + _state.m_cache[address] = Account(balance, Account::NormalCreation); if (o.count("storage") > 0) { @@ -157,7 +157,7 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state, stateOptio _state.setStorage(address, toInt(j.first), toInt(j.second)); } - for (int i=0; i < iNonce; ++i) + for (int i = 0; i < nonce; ++i) _state.noteSending(address); _state.ensureCached(address, false, false); @@ -275,7 +275,7 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost) if (m_TestObject.count("expect") > 0) { stateOptionsMap stateMap; - State expectState(Address(), OverlayDB(), eth::BaseState::Empty); + State expectState(OverlayDB(), eth::BaseState::Empty); importState(m_TestObject["expect"].get_obj(), expectState, stateMap); checkExpectedState(expectState, _statePost, stateMap, Options::get().checkState ? WhenError::Throw : WhenError::DontThrow); m_TestObject.erase(m_TestObject.find("expect")); diff --git a/vm.cpp b/vm.cpp index a36a57070..d92989133 100644 --- a/vm.cpp +++ b/vm.cpp @@ -390,8 +390,8 @@ void doVMTests(json_spirit::mValue& v, bool _fillin) if (o.count("expect") > 0) { - State postState(Address(), OverlayDB(), eth::BaseState::Empty); - State expectState(Address(), OverlayDB(), eth::BaseState::Empty); + State postState(OverlayDB(), eth::BaseState::Empty); + State expectState(OverlayDB(), eth::BaseState::Empty); stateOptionsMap expectStateMap; ImportTest::importState(o["post"].get_obj(), postState); ImportTest::importState(o["expect"].get_obj(), expectState, expectStateMap); From 4774ccfb287edc1dc61462c27a1ec5ea8af69673 Mon Sep 17 00:00:00 2001 From: winsvega Date: Mon, 6 Apr 2015 18:32:24 +0300 Subject: [PATCH 19/45] Check State Unused Variable --- TestHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index 94751c1ec..1ff091c11 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -170,7 +170,7 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state) stateOptionsMap importedMap; importState(_o, _state, importedMap); for (auto& stateOptionMap: importedMap) - assert(stateOptionMap.second.isAllSet()); //check that every parameter was declared in state object + BOOST_CHECK_MESSAGE(stateOptionMap.second.isAllSet(), "Import State[" << stateOptionMap.first << "]: State is not complete!"); //check that every parameter was declared in state object } void ImportTest::importTransaction(json_spirit::mObject& _o) From dd0cdddd946c036f64d92f000618930c14bf95d5 Mon Sep 17 00:00:00 2001 From: winsvega Date: Mon, 6 Apr 2015 22:38:52 +0300 Subject: [PATCH 20/45] Check State style changes --- TestHelper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index 1ff091c11..3d96af424 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -115,7 +115,8 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state, stateOptio json_spirit::mObject o = i.second.get_obj(); ImportStateOptions stateOptions; - u256 balance = 0, nonce = 0; + u256 balance = 0; + u256 nonce = 0; if (o.count("balance") > 0) { From 3a967569519c8b39426d2f093bbaace7dc05b7d6 Mon Sep 17 00:00:00 2001 From: winsvega Date: Tue, 7 Apr 2015 14:20:14 +0300 Subject: [PATCH 21/45] Check State bump builds --- bcValidBlockTestFiller.json | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/bcValidBlockTestFiller.json b/bcValidBlockTestFiller.json index 5ea2e2a2d..c0ed86437 100644 --- a/bcValidBlockTestFiller.json +++ b/bcValidBlockTestFiller.json @@ -383,6 +383,60 @@ ] } ] + }, + + "DifferentExtraData1024" : { + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "131072", + "extraData" : "0x42", + "gasLimit" : "3141592", + "gasUsed" : "0", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "10000000000", + "nonce" : "0", + "code" : "", + "storage": {} + }, + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100", + "nonce" : "0", + "code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) (LOG1 0 32 0) }", + "storage": {} + } + }, + "blocks" : [ + { + "blockHeader" : { + "extraData" : "0x01020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000" + }, + "transactions" : [ + { + "data" : "", + "gasLimit" : "50000", + "gasPrice" : "10", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "5000000000" + } + ], + "uncleHeaders" : [ + ] + } + ] } } From 32bde18a276866264dddd9f9891df5d98cd19f97 Mon Sep 17 00:00:00 2001 From: winsvega Date: Tue, 7 Apr 2015 20:45:44 +0300 Subject: [PATCH 22/45] Check State bump builds --- stSolidityTestFiller.json | 87 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/stSolidityTestFiller.json b/stSolidityTestFiller.json index 17866622d..c74ced9de 100644 --- a/stSolidityTestFiller.json +++ b/stSolidityTestFiller.json @@ -1,4 +1,89 @@ { + "TestStoreGasPrices" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000000000000000000", + "currentNumber" : "120", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "storage" : { + "0x" : "0x4e2d", + "0x01" : "0x1395", + "0x02" : "0x1395", + "0x03" : "0x1395", + "0x04" : "0x1395", + "0x05" : "0x1395" + } + } + }, + "pre" : + { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100000", + "//" : "contract main ", + "//" : "{ ", + "//" : " uint[32] m_gasUsed; ", + "//" : " int storage; ", + "//" : " function run() returns (bool) ", + "//" : " { ", + "//" : " uint startgas = msg.gas; ", + "//" : " ", + "//" : " storage = 1; //zero to non zero ", + "//" : " m_gasUsed[0] = startgas - msg.gas; ", + "//" : " startgas = msg.gas; ", + "//" : " ", + "//" : " storage = 2; //non zero to non zero ", + "//" : " m_gasUsed[1] = startgas - msg.gas; ", + "//" : " startgas = msg.gas; ", + "//" : " ", + "//" : " storage = 2; //non zero to same non zero ", + "//" : " m_gasUsed[2] = startgas - msg.gas; ", + "//" : " startgas = msg.gas; ", + "//" : " ", + "//" : " storage = 24784793845734; //non zero to huge non zero ", + "//" : " m_gasUsed[3] = startgas - msg.gas; ", + "//" : " startgas = msg.gas; ", + "//" : " ", + "//" : " storage = 2; //huge non zero to non zero ", + "//" : " m_gasUsed[4] = startgas - msg.gas; ", + "//" : " startgas = msg.gas; ", + "//" : " ", + "//" : " storage = 0; //non zero to zero ", + "//" : " m_gasUsed[5] = startgas - msg.gas; ", + "//" : " startgas = msg.gas; ", + "//" : " ", + "//" : " return true; ", + "//" : " } ", + "//" : "} ", + "code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463c04062268114602d57005b6033603d565b8060005260206000f35b600060005a600160205590505a81036000555a600260205590505a81036001555a600260205590505a81036002555a65168aa8d53fe660205590505a81036003555a600260205590505a81036004555a600060205590505a81036005555a5060019291505056", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "50000000", + "nonce" : "0", + "code" : "", + "storage": {} + } + }, + "transaction" : + { + "data" : "run()", + "data" : "0xc0406226", + "gasLimit" : "35000000", + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "0" + } + }, + "TestCryptographicFunctions" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -43,7 +128,7 @@ "//" : " //ecrecover ", "//" : " } ", "//" : "} ", - "code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463c04062268114610039578063e0a9fd281461004b57005b61004161005d565b8060005260206000f35b61005361008c565b8060005260206000f35b600061006761008c565b600060006101000a81548160ff0219169083021790555060ff60016000540416905090565b600160007f74657374737472696e67000000000000000000000000000000000000000000008152600a016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156100e5576100ed565b5060006101da565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f161012b57005b507f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d111600051141561015b57610163565b5060006101da565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f16101a157005b507fcd566972b5e50104011a92b59fa8e0b1234851ae00000000000000000000000060005114156101d1576101d9565b5060006101da565b5b9056", + "code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463c04062268114610039578063e0a9fd281461004b57005b61004161005d565b8060005260206000f35b61005361009d565b8060005260206000f35b600061006761009d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016919091179081905560ff16905090565b7f74657374737472696e67000000000000000000000000000000000000000000006000908152600190600a90207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156100f6576100fe565b5060006101eb565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f161013c57005b506000517f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d111141561016c57610174565b5060006101eb565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f16101b257005b506000517fcd566972b5e50104011a92b59fa8e0b1234851ae00000000000000000000000014156101e2576101ea565b5060006101eb565b5b9056", "nonce" : "0", "storage" : { } From ff5ce7bda3346e3893d933196371564b4e45baec Mon Sep 17 00:00:00 2001 From: Wins Vega Date: Wed, 8 Apr 2015 01:31:30 +0400 Subject: [PATCH 23/45] Check State: windows build --- TestHelper.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index 3d96af424..4214796c0 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -68,6 +68,8 @@ namespace test { struct ValueTooLarge: virtual Exception {}; +struct MissingFields : virtual Exception {}; + bigint const c_max256plus1 = bigint(1) << 256; ImportTest::ImportTest(json_spirit::mObject& _o, bool isFiller): @@ -170,8 +172,12 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state) { stateOptionsMap importedMap; importState(_o, _state, importedMap); - for (auto& stateOptionMap: importedMap) - BOOST_CHECK_MESSAGE(stateOptionMap.second.isAllSet(), "Import State[" << stateOptionMap.first << "]: State is not complete!"); //check that every parameter was declared in state object + for (auto& stateOptionMap : importedMap) + { + //check that every parameter was declared in state object + if (!stateOptionMap.second.isAllSet()) + BOOST_THROW_EXCEPTION(MissingFields() << errinfo_comment("Import State: Missing state fields!")); + } } void ImportTest::importTransaction(json_spirit::mObject& _o) From fff3784c010925a543f6bc7df803f7a107f3964b Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 8 Apr 2015 02:42:51 +0200 Subject: [PATCH 24/45] Remove VMTRACE. Better transaction logging. Avoid bothering with obviously invalid transactions. --- TestHelper.cpp | 2 +- blockchain.cpp | 4 ++-- transaction.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index dd7c09eab..757a6e7a6 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -172,7 +172,7 @@ void ImportTest::importTransaction(json_spirit::mObject& _o) { RLPStream transactionRLPStream = createRLPStreamFromTransactionFields(_o); RLP transactionRLP(transactionRLPStream.out()); - m_transaction = Transaction(transactionRLP.data(), CheckSignature::Sender); + m_transaction = Transaction(transactionRLP.data(), CheckTransaction::Everything); } } diff --git a/blockchain.cpp b/blockchain.cpp index a223e8d4e..6c1cfebd6 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -383,7 +383,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) try { - Transaction t(createRLPStreamFromTransactionFields(tx).out(), CheckSignature::Sender); + Transaction t(createRLPStreamFromTransactionFields(tx).out(), CheckTransaction::Everything); txsFromField.push_back(t); } catch (Exception const& _e) @@ -400,7 +400,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) RLP root(blockRLP); for (auto const& tr: root[1]) { - Transaction tx(tr.data(), CheckSignature::Sender); + Transaction tx(tr.data(), CheckTransaction::Everything); txsFromRlp.push_back(tx); } diff --git a/transaction.cpp b/transaction.cpp index 4c57326ba..7aa073f29 100644 --- a/transaction.cpp +++ b/transaction.cpp @@ -44,7 +44,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin) { bytes stream = importByteArray(o["rlp"].get_str()); RLP rlp(stream); - txFromRlp = Transaction(rlp.data(), CheckSignature::Sender); + txFromRlp = Transaction(rlp.data(), CheckTransaction::Everything); if (!txFromRlp.signature().isValid()) BOOST_THROW_EXCEPTION(Exception() << errinfo_comment("transaction from RLP signature is invalid") ); } @@ -64,7 +64,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin) BOOST_REQUIRE(o.count("transaction") > 0); mObject tObj = o["transaction"].get_obj(); - Transaction txFromFields(createRLPStreamFromTransactionFields(tObj).out(), CheckSignature::Sender); + Transaction txFromFields(createRLPStreamFromTransactionFields(tObj).out(), CheckTransaction::Everything); //Check the fields restored from RLP to original fields BOOST_CHECK_MESSAGE(txFromFields.data() == txFromRlp.data(), "Data in given RLP not matching the Transaction data!"); @@ -91,7 +91,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin) try { - Transaction txFromFields(rlpStream.out(), CheckSignature::Sender); + Transaction txFromFields(rlpStream.out(), CheckTransaction::Everything); if (!txFromFields.signature().isValid()) BOOST_THROW_EXCEPTION(Exception() << errinfo_comment("transaction from RLP signature is invalid") ); From 32ae2ea75c2eaf6a4bfa1d28f5e8c7c8c9ca5746 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Thu, 26 Mar 2015 12:22:49 +0100 Subject: [PATCH 25/45] added createing FunctionType from ArrayType VariableDeclaration added test --- SolidityEndToEndTest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index b169263da..3c4c2bc0e 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -966,6 +966,19 @@ BOOST_AUTO_TEST_CASE(simple_accessor) BOOST_CHECK(callContractFunction("data()") == encodeArgs(8)); } +BOOST_AUTO_TEST_CASE(array_accessor) +{ + char const* sourceCode = R"( + contract test { + uint[8] datas; + function test() { + datas[2] = 8; + } + })"; + compileAndRun(sourceCode); + BOOST_CHECK(callContractFunction("data(2)") == encodeArgs(8)); +} + BOOST_AUTO_TEST_CASE(multiple_elementary_accessors) { char const* sourceCode = "contract test {\n" From a33564fbccf2829cb591bbf8b8df42a456566e16 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Tue, 31 Mar 2015 11:07:10 +0200 Subject: [PATCH 26/45] some more tests --- SolidityEndToEndTest.cpp | 41 +++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index 3c4c2bc0e..1b7f4129c 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -969,14 +969,41 @@ BOOST_AUTO_TEST_CASE(simple_accessor) BOOST_AUTO_TEST_CASE(array_accessor) { char const* sourceCode = R"( - contract test { - uint[8] datas; - function test() { - datas[2] = 8; - } - })"; + contract test { + uint[8] data; + uint[] dynamicData; + function test() { + data[2] = 8; + dynamicData.length = 3; + dynamicData[2] = 8; + } + } + )"; compileAndRun(sourceCode); - BOOST_CHECK(callContractFunction("data(2)") == encodeArgs(8)); + BOOST_CHECK(callContractFunction("data(uint256)", 2) == encodeArgs(8)); + BOOST_CHECK(callContractFunction("data(uint256)", 8) == encodeArgs()); + BOOST_CHECK(callContractFunction("dynamicData(uint256)", 2) == encodeArgs(8)); + BOOST_CHECK(callContractFunction("dynamicData(uint256)", 8) == encodeArgs()); +} + +BOOST_AUTO_TEST_CASE(accessors_mapping_for_array) +{ + char const* sourceCode = R"( + contract test { + mapping(uint => uint[8]) data; + mapping(uint => uint[]) dynamicData; + function test() { + data[2][2] = 8; + dynamicData[2].length = 3; + dynamicData[2][2] = 8; + } + } + )"; + compileAndRun(sourceCode); + BOOST_CHECK(callContractFunction("data(uint256,uint256)", 2, 2) == encodeArgs(8)); + BOOST_CHECK(callContractFunction("data(uint256, 256)", 2, 8) == encodeArgs()); + BOOST_CHECK(callContractFunction("dynamicData(uint256,uint256)", 2, 2) == encodeArgs(8)); + BOOST_CHECK(callContractFunction("dynamicData(uint256,uint256)", 2, 8) == encodeArgs()); } BOOST_AUTO_TEST_CASE(multiple_elementary_accessors) From 4d4a999db24b2baed1d72075a5f4ff5173942e24 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Wed, 1 Apr 2015 14:22:42 +0200 Subject: [PATCH 27/45] added implementation to append code for State variable accessor fixed tests --- SolidityEndToEndTest.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index 1b7f4129c..ee9c1f69b 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -970,8 +970,8 @@ BOOST_AUTO_TEST_CASE(array_accessor) { char const* sourceCode = R"( contract test { - uint[8] data; - uint[] dynamicData; + uint[8] public data; + uint[] public dynamicData; function test() { data[2] = 8; dynamicData.length = 3; @@ -980,6 +980,7 @@ BOOST_AUTO_TEST_CASE(array_accessor) } )"; compileAndRun(sourceCode); + auto res = callContractFunction("data(uint256)", 2) ; BOOST_CHECK(callContractFunction("data(uint256)", 2) == encodeArgs(8)); BOOST_CHECK(callContractFunction("data(uint256)", 8) == encodeArgs()); BOOST_CHECK(callContractFunction("dynamicData(uint256)", 2) == encodeArgs(8)); @@ -990,8 +991,8 @@ BOOST_AUTO_TEST_CASE(accessors_mapping_for_array) { char const* sourceCode = R"( contract test { - mapping(uint => uint[8]) data; - mapping(uint => uint[]) dynamicData; + mapping(uint => uint[8]) public data; + mapping(uint => uint[]) public dynamicData; function test() { data[2][2] = 8; dynamicData[2].length = 3; From 5c0fe54f3fff424380dc77dc1c109f0eb68cf852 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Wed, 1 Apr 2015 18:16:57 +0200 Subject: [PATCH 28/45] added < uint256 uinttype to test --- SolidityEndToEndTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index ee9c1f69b..7163d4692 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -972,10 +972,13 @@ BOOST_AUTO_TEST_CASE(array_accessor) contract test { uint[8] public data; uint[] public dynamicData; + uint24[] public smallTypeData; function test() { data[2] = 8; dynamicData.length = 3; dynamicData[2] = 8; + smallTypeData.length = 2; + smallTypeData[1] = 2; } } )"; @@ -985,6 +988,8 @@ BOOST_AUTO_TEST_CASE(array_accessor) BOOST_CHECK(callContractFunction("data(uint256)", 8) == encodeArgs()); BOOST_CHECK(callContractFunction("dynamicData(uint256)", 2) == encodeArgs(8)); BOOST_CHECK(callContractFunction("dynamicData(uint256)", 8) == encodeArgs()); + BOOST_CHECK(callContractFunction("smallTypeData(uint256)", 1) == encodeArgs(2)); + BOOST_CHECK(callContractFunction("smallTypeData(uint256)", 8) == encodeArgs()); } BOOST_AUTO_TEST_CASE(accessors_mapping_for_array) From 377e5435580e2e7e948e4a7690f0249f6af032d9 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Thu, 2 Apr 2015 17:03:02 +0200 Subject: [PATCH 29/45] fixes added more tests --- SolidityEndToEndTest.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index 7163d4692..4622e4228 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -973,23 +973,31 @@ BOOST_AUTO_TEST_CASE(array_accessor) uint[8] public data; uint[] public dynamicData; uint24[] public smallTypeData; + struct st { uint a; uint[] finalArray; } + mapping(uint256 => mapping(uint256 => st[5])) public multiple_map; + function test() { - data[2] = 8; + data[0] = 8; dynamicData.length = 3; dynamicData[2] = 8; - smallTypeData.length = 2; - smallTypeData[1] = 2; + smallTypeData.length = 128; + smallTypeData[1] = 22; + smallTypeData[127] = 2; + multiple_map[2][1][2].a = 3; + multiple_map[2][1][2].finalArray.length = 4; + multiple_map[2][1][2].finalArray[3] = 5; } } )"; compileAndRun(sourceCode); - auto res = callContractFunction("data(uint256)", 2) ; - BOOST_CHECK(callContractFunction("data(uint256)", 2) == encodeArgs(8)); + BOOST_CHECK(callContractFunction("data(uint256)", 0) == encodeArgs(8)); BOOST_CHECK(callContractFunction("data(uint256)", 8) == encodeArgs()); BOOST_CHECK(callContractFunction("dynamicData(uint256)", 2) == encodeArgs(8)); BOOST_CHECK(callContractFunction("dynamicData(uint256)", 8) == encodeArgs()); - BOOST_CHECK(callContractFunction("smallTypeData(uint256)", 1) == encodeArgs(2)); - BOOST_CHECK(callContractFunction("smallTypeData(uint256)", 8) == encodeArgs()); + BOOST_CHECK(callContractFunction("smallTypeData(uint256)", 1) == encodeArgs(22)); + BOOST_CHECK(callContractFunction("smallTypeData(uint256)", 127) == encodeArgs(2)); + BOOST_CHECK(callContractFunction("smallTypeData(uint256)", 128) == encodeArgs()); + BOOST_CHECK(callContractFunction("multiple_map(uint256,uint256,uint256)", 2, 1, 2) == encodeArgs(3)); } BOOST_AUTO_TEST_CASE(accessors_mapping_for_array) From ec8d4cd0814674287c30eee41ead3c18f7ddec02 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 8 Apr 2015 23:09:06 +0200 Subject: [PATCH 30/45] Fix solidity tests. --- SolidityEndToEndTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index 29bf334f2..0d7a933b0 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -1522,8 +1522,6 @@ BOOST_AUTO_TEST_CASE(ecrecover) BOOST_CHECK(callContractFunction("a(bytes32,uint8,bytes32,bytes32)", h, v, r, s) == encodeArgs(addr)); } -#endif - BOOST_AUTO_TEST_CASE(inter_contract_calls) { char const* sourceCode = R"( @@ -3683,3 +3681,5 @@ BOOST_AUTO_TEST_SUITE_END() } } } // end namespaces + +#endif From 1efd3c26876cb05efcdce073b967088e01b9818b Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Fri, 10 Apr 2015 08:50:24 +0200 Subject: [PATCH 31/45] Squashed 'libjsqrc/ethereumjs/' changes from 73b9ed2..4def095 4def095 updated README.md 15b4dbd updated bower && package.json files 0ccc05a web3 in global namespace ccc59d1 version 0.2.6 9c2c946 Merge branch 'web3' into develop 6763f34 tests for creating new contract with nondefault constructor, added missing files 2ef5efc fixed #70, creating contract with nondefault constructor dbe4015 Merge branch 'master' into develop 48b351a add gasPrice test and fixed failing uncle tests 7f75f3e fixed gasPrice output ddec629 fixed getUncle parameter count 1e89ef0 changed to eth_protocolVersion 6add9bd Merge pull request #151 from ethereum/develop git-subtree-dir: libjsqrc/ethereumjs git-subtree-split: 4def0958d35cb5b8d92d277423af4d435dd89f16 --- abi.formatConstructorParams.js | 106 +++++++++++++++++++++++++++++++++ abi.inputParser.js | 11 ++-- utils.filters.js | 2 +- utils.isAddress.js | 2 +- utils.isStrictAddress.js | 23 +++++++ web3.eth.contract.js | 49 ++++++++++++--- web3.eth.gasPrice.js | 39 ++++++++++++ web3.eth.getUncle.js | 6 +- 8 files changed, 220 insertions(+), 18 deletions(-) create mode 100644 abi.formatConstructorParams.js create mode 100644 utils.isStrictAddress.js create mode 100644 web3.eth.gasPrice.js diff --git a/abi.formatConstructorParams.js b/abi.formatConstructorParams.js new file mode 100644 index 000000000..9113f02c6 --- /dev/null +++ b/abi.formatConstructorParams.js @@ -0,0 +1,106 @@ +var chai = require('chai'); +var assert = require('assert'); +var abi = require('../lib/solidity/abi'); + +describe('lib/solidity/abi', function () { + describe('formatConstructorParams', function () { + it('should format uint256 properly', function () { + // given + var description = [{ + "name": "test", + "type": "constructor", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ] + }]; + + // when + var bytes = abi.formatConstructorParams(description, [2]); + + // then + assert.equal(bytes, '0000000000000000000000000000000000000000000000000000000000000002'); + }); + + it('should not find matching constructor', function () { + // given + var description = [{ + "name": "test", + "type": "constructor", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ] + }]; + + // when + var bytes = abi.formatConstructorParams(description, []); + + // then + assert.equal(bytes, ''); + }); + + it('should not find matching constructor2', function () { + // given + var description = [{ + "name": "test", + "type": "constructor", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ] + }]; + + // when + var bytes = abi.formatConstructorParams(description, [1,2]); + + // then + assert.equal(bytes, ''); + }); + + it('should not find matching constructor3', function () { + // given + var description = [{ + "name": "test", + "type": "function", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ] + }]; + + // when + var bytes = abi.formatConstructorParams(description, [2]); + + // then + assert.equal(bytes, ''); + }); + + it('should find matching constructor with multiple args', function () { + // given + var description = [{ + "name": "test", + "type": "constructor", + "inputs": [{ + "name": "a", + "type": "uint256" + }, { + "name": "b", + "type": "uint256" + }] + }]; + + // when + var bytes = abi.formatConstructorParams(description, ['1', '5']); + + // then + assert.equal(bytes, '00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005'); + }); + }); +}); + + diff --git a/abi.inputParser.js b/abi.inputParser.js index a488bb2e5..7dc50b537 100644 --- a/abi.inputParser.js +++ b/abi.inputParser.js @@ -1,6 +1,7 @@ -var assert = require('assert'); +var chai = require('chai'); +var assert = chai.assert; var BigNumber = require('bignumber.js'); -var abi = require('../lib/solidity/abi.js'); +var abi = require('../lib/solidity/abi'); var clone = function (object) { return JSON.parse(JSON.stringify(object)); }; var description = [{ @@ -19,9 +20,9 @@ var description = [{ ] }]; -describe('lib/solidity/abi', function() { - describe('inputParser', function() { - it('should parse input uint', function() { +describe('lib/solidity/abi', function () { + describe('inputParser', function () { + it('should parse input uint', function () { // given var d = clone(description); diff --git a/utils.filters.js b/utils.filters.js index 5e6870efa..5f37b6f1a 100644 --- a/utils.filters.js +++ b/utils.filters.js @@ -1,5 +1,5 @@ var assert = require('assert'); -var utils = require('../lib/utils/utils.js'); +var utils = require('../lib/solidity/utils'); describe('lib/utils/utils', function() { it('should filter functions and events from input array properly', function () { diff --git a/utils.isAddress.js b/utils.isAddress.js index 3ebbce837..a0658e303 100644 --- a/utils.isAddress.js +++ b/utils.isAddress.js @@ -8,7 +8,7 @@ var tests = [ { value: 'function', is: false}, { value: {}, is: false}, { value: '0xc6d9d2cd449a754c494264e1809c50e34d64562b', is: true }, - { value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: false } + { value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: true } ]; describe('lib/utils/utils', function () { diff --git a/utils.isStrictAddress.js b/utils.isStrictAddress.js new file mode 100644 index 000000000..e23e3deec --- /dev/null +++ b/utils.isStrictAddress.js @@ -0,0 +1,23 @@ +var chai = require('chai'); +var utils = require('../lib/utils/utils.js'); +var assert = chai.assert; + +var tests = [ + { value: function () {}, is: false}, + { value: new Function(), is: false}, + { value: 'function', is: false}, + { value: {}, is: false}, + { value: '0xc6d9d2cd449a754c494264e1809c50e34d64562b', is: true }, + { value: 'c6d9d2cd449a754c494264e1809c50e34d64562b', is: false } +]; + +describe('lib/utils/utils', function () { + describe('isStrictAddress', function () { + tests.forEach(function (test) { + it('shoud test if value ' + test.value + ' is address: ' + test.is, function () { + assert.equal(utils.isStrictAddress(test.value), test.is); + }); + }); + }); +}); + diff --git a/web3.eth.contract.js b/web3.eth.contract.js index 0f2fd8640..a657545db 100644 --- a/web3.eth.contract.js +++ b/web3.eth.contract.js @@ -1,5 +1,7 @@ var assert = require('assert'); var contract = require('../lib/web3/contract.js'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); +var web3 = require('../index'); describe('web3.eth.contract', function() { it('should create simple contract with one method from abi with explicit type name', function () { @@ -20,10 +22,11 @@ describe('web3.eth.contract', function() { } ] }]; + var address = '0x1234567890123456789012345678901234567890'; // when var Con = contract(description); - var myCon = new Con(null); + var myCon = new Con(address); // then assert.equal('function', typeof myCon.test); @@ -48,10 +51,11 @@ describe('web3.eth.contract', function() { } ] }]; + var address = '0x1234567890123456789012345678901234567890'; // when var Con = contract(description); - var myCon = new Con(null); + var myCon = new Con(address); // then assert.equal('function', typeof myCon.test); @@ -90,10 +94,11 @@ describe('web3.eth.contract', function() { } ] }]; + var address = '0x1234567890123456789012345678901234567890'; // when var Con = contract(description); - var myCon = new Con(null); + var myCon = new Con(address); // then assert.equal('function', typeof myCon.test); @@ -134,10 +139,11 @@ describe('web3.eth.contract', function() { } ] }]; + var address = '0x1234567890123456789012345678901234567890'; // when var Con = contract(description); - var myCon = new Con(null); + var myCon = new Con(address); // then assert.equal('function', typeof myCon.test); @@ -162,11 +168,11 @@ describe('web3.eth.contract', function() { } ] }]; - + var address = '0x1234567890123456789012345678901234567890'; // when var Con = contract(description); - var myCon = new Con(null); + var myCon = new Con(address); // then assert.equal('undefined', typeof myCon.test); @@ -191,11 +197,11 @@ describe('web3.eth.contract', function() { } ] }]; - + var address = '0x1234567890123456789012345678901234567890'; // when var Con = contract(description); - var myCon = new Con(null); + var myCon = new Con(address); // then assert.equal('function', typeof myCon.test); @@ -203,5 +209,32 @@ describe('web3.eth.contract', function() { }); + it('should create contract with nondefault constructor', function (done) { + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + web3.reset(); // reset different polls + var address = '0x1234567890123456789012345678901234567890'; + var code = '0x31241231231123123123123121cf121212i123123123123123512312412512111111'; + var description = [{ + "name": "test", + "type": "constructor", + "inputs": [{ + "name": "a", + "type": "uint256" + } + ] + }]; + + provider.injectResult(address); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, 'eth_sendTransaction'); + assert.equal(payload.params[0].data, code + '0000000000000000000000000000000000000000000000000000000000000002'); + done(); + }); + + var Con = contract(description); + var myCon = new Con(code, 2); + }); }); diff --git a/web3.eth.gasPrice.js b/web3.eth.gasPrice.js new file mode 100644 index 000000000..eb7272b4d --- /dev/null +++ b/web3.eth.gasPrice.js @@ -0,0 +1,39 @@ +var chai = require('chai'); +var assert = chai.assert; +var web3 = require('../index'); +var BigNumber = require('bignumber.js'); +var FakeHttpProvider = require('./helpers/FakeHttpProvider'); + +var method = 'gasPrice'; + +var tests = [{ + result: '0x15f90', + formattedResult: new BigNumber(90000), + call: 'eth_'+ method +}]; + +describe('web3.eth', function () { + describe(method, function () { + tests.forEach(function (test, index) { + it('property test: ' + index, function () { + + // given + var provider = new FakeHttpProvider(); + web3.setProvider(provider); + provider.injectResult(test.result); + provider.injectValidation(function (payload) { + assert.equal(payload.jsonrpc, '2.0'); + assert.equal(payload.method, test.call); + assert.deepEqual(payload.params, []); + }); + + // when + var result = web3.eth[method]; + + // then + assert.deepEqual(test.formattedResult, result); + }); + }); + }); +}); + diff --git a/web3.eth.getUncle.js b/web3.eth.getUncle.js index 111865355..c5d723dc9 100644 --- a/web3.eth.getUncle.js +++ b/web3.eth.getUncle.js @@ -118,19 +118,19 @@ var formattedBlockResultWithTx = { var tests = [{ args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2], - formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2', false], + formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2'], result: blockResult, formattedResult: formattedBlockResult, call: 'eth_getUncleByBlockHashAndIndex' },{ args: [436, 1], - formattedArgs: ['0x1b4', '0x1', false], + formattedArgs: ['0x1b4', '0x1'], result: blockResult, formattedResult: formattedBlockResult, call: 'eth_getUncleByBlockNumberAndIndex' },{ args: [436, 1, true], - formattedArgs: ['0x1b4', '0x1', true], + formattedArgs: ['0x1b4', '0x1'], result: blockResultWithTx, formattedResult: formattedBlockResultWithTx, call: 'eth_getUncleByBlockNumberAndIndex' From 530b19f6c6c0dad2ea8661fdd29e4d1d2e6781a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 10 Apr 2015 14:47:43 +0200 Subject: [PATCH 32/45] Change instruction scheduler Try different instruction scheduler in LLVM, other crashes sometimes. Also parse command line options properly for random tests. --- state.cpp | 2 ++ vm.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/state.cpp b/state.cpp index 813c3b4d7..65f333538 100644 --- a/state.cpp +++ b/state.cpp @@ -218,6 +218,8 @@ BOOST_AUTO_TEST_CASE(stCreateTest) BOOST_AUTO_TEST_CASE(stRandom) { + test::Options::get(); // parse command line options, e.g. to enable JIT + string testPath = dev::test::getTestPath(); testPath += "/StateTests/RandomTests"; diff --git a/vm.cpp b/vm.cpp index d92989133..4728b8a53 100644 --- a/vm.cpp +++ b/vm.cpp @@ -524,6 +524,8 @@ BOOST_AUTO_TEST_CASE(vmInputLimitsLightTest) BOOST_AUTO_TEST_CASE(vmRandom) { + test::Options::get(); // parse command line options, e.g. to enable JIT + string testPath = getTestPath(); testPath += "/VMTests/RandomTests"; From 35affd39f19f8d6a587ab8a25a22399af0abf4be Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Fri, 10 Apr 2015 16:41:58 +0200 Subject: [PATCH 33/45] OpenCL stuff, Fix for eth_call. --- TestUtils.cpp | 1 + blockchain.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TestUtils.cpp b/TestUtils.cpp index 6222955d5..ff5169d55 100644 --- a/TestUtils.cpp +++ b/TestUtils.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include "TestUtils.h" diff --git a/blockchain.cpp b/blockchain.cpp index 6c1cfebd6..ab01df5a5 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include "TestHelper.h" From b848fa9af1487c3cfcc35d4ff24a6c48b0c79d06 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 11 Apr 2015 00:45:21 +0200 Subject: [PATCH 34/45] Ability to switch GPU/CPU mining on the fly. --- blockchain.cpp | 7 ++++--- stateOriginal.cpp | 5 +++-- webthreestubclient.h | 10 ++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/blockchain.cpp b/blockchain.cpp index ab01df5a5..15cda8037 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -192,7 +192,8 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) state.sync(bc, txs, gp); state.commitToMine(bc); MineInfo info; - for (info.completed = false; !info.completed; info = state.mine()) {} + ProofOfWork pow; + for (info.completed = false; !info.completed; info = state.mine(&pow)) {} state.completeMine(); } catch (Exception const& _e) @@ -577,7 +578,7 @@ void overwriteBlockHeader(BlockInfo& _currentBlockHeader, mObject& _blObj) std::pair ret; while (!ProofOfWork::verify(_currentBlockHeader)) { - ret = pow.mine(_currentBlockHeader, 1000, true, true); + ret = pow.mine(_currentBlockHeader, 1000, true); Ethash::assignResult(ret.second, _currentBlockHeader); } } @@ -623,7 +624,7 @@ void updatePoW(BlockInfo& _bi) std::pair ret; while (!ProofOfWork::verify(_bi)) { - ret = pow.mine(_bi, 10000, true, true); + ret = pow.mine(_bi, 10000, true); Ethash::assignResult(ret.second, _bi); } _bi.noteDirty(); diff --git a/stateOriginal.cpp b/stateOriginal.cpp index 572e84dcf..40f759434 100644 --- a/stateOriginal.cpp +++ b/stateOriginal.cpp @@ -68,7 +68,8 @@ BOOST_AUTO_TEST_CASE(Complex) // Mine to get some ether! s.commitToMine(bc); - while (!s.mine(100, true).completed) {} + ProofOfWork pow; + while (!s.mine(&pow).completed) {} s.completeMine(); bc.attemptImport(s.blockData(), stateDB); @@ -88,7 +89,7 @@ BOOST_AUTO_TEST_CASE(Complex) // Mine to get some ether and set in stone. s.commitToMine(bc); s.commitToMine(bc); - while (!s.mine(100, true).completed) {} + while (!s.mine(&pow).completed) {} s.completeMine(); bc.attemptImport(s.blockData(), stateDB); diff --git a/webthreestubclient.h b/webthreestubclient.h index a460ddda4..c1fdc3411 100644 --- a/webthreestubclient.h +++ b/webthreestubclient.h @@ -72,6 +72,16 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } + std::string eth_hashrate() throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p = Json::nullValue; + Json::Value result = this->CallMethod("eth_hashrate",p); + if (result.isString()) + return result.asString(); + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } std::string eth_coinbase() throw (jsonrpc::JsonRpcException) { Json::Value p; From fbb5adc9f9be5b9749c88592060eb07d71e60ab1 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 11 Apr 2015 15:52:36 +0200 Subject: [PATCH 35/45] Some early refactoring to support async miners better. --- blockchain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockchain.cpp b/blockchain.cpp index 15cda8037..6d7bc97ef 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -575,7 +575,7 @@ void overwriteBlockHeader(BlockInfo& _currentBlockHeader, mObject& _blObj) _currentBlockHeader = tmp; ProofOfWork pow; - std::pair ret; + std::pair ret; while (!ProofOfWork::verify(_currentBlockHeader)) { ret = pow.mine(_currentBlockHeader, 1000, true); @@ -621,7 +621,7 @@ BlockInfo constructBlock(mObject& _o) void updatePoW(BlockInfo& _bi) { ProofOfWork pow; - std::pair ret; + std::pair ret; while (!ProofOfWork::verify(_bi)) { ret = pow.mine(_bi, 10000, true); From e51bdd01229b3494a13ff4d5804fca2f916ba111 Mon Sep 17 00:00:00 2001 From: subtly Date: Sat, 11 Apr 2015 16:03:56 -0400 Subject: [PATCH 36/45] test use of steady_clock for timeout --- net.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/net.cpp b/net.cpp index ec1efb360..75c67888d 100644 --- a/net.cpp +++ b/net.cpp @@ -145,6 +145,39 @@ public: bool success = false; }; +BOOST_AUTO_TEST_CASE(requestTimeout) +{ + using TimePoint = std::chrono::steady_clock::time_point; + using RequestTimeout = std::pair; + + std::chrono::milliseconds timeout(300); + std::list timeouts; + + NodeId nodeA(sha3("a")); + NodeId nodeB(sha3("b")); + timeouts.push_back(make_pair(nodeA, chrono::steady_clock::now())); + this_thread::sleep_for(std::chrono::milliseconds(100)); + timeouts.push_back(make_pair(nodeB, chrono::steady_clock::now())); + this_thread::sleep_for(std::chrono::milliseconds(210)); + + bool nodeAtriggered = false; + bool nodeBtriggered = false; + timeouts.remove_if([&](RequestTimeout const& t) + { + auto now = chrono::steady_clock::now(); + auto diff = now - t.second; + if (t.first == nodeA && diff < timeout) + nodeAtriggered = true; + if (t.first == nodeB && diff < timeout) + nodeBtriggered = true; + return (t.first == nodeA || t.first == nodeB); + }); + + BOOST_REQUIRE(nodeAtriggered == false); + BOOST_REQUIRE(nodeBtriggered == true); + BOOST_REQUIRE(timeouts.size() == 0); +} + BOOST_AUTO_TEST_CASE(isIPAddressType) { string wildcard = "0.0.0.0"; From e54952c8cf718fb1b7af853bead145292c7f25db Mon Sep 17 00:00:00 2001 From: winsvega Date: Thu, 9 Apr 2015 18:13:31 +0300 Subject: [PATCH 37/45] BlockTests: add expect section --- TestHelper.cpp | 1 - bcInvalidHeaderTestFiller.json | 193 +++++++++++++++++++++++++++------ bcJS_API_TestFiller.json | 15 +++ bcValidBlockTestFiller.json | 54 ++++++++- blockchain.cpp | 19 +++- stTransactionTestFiller.json | 45 ++++++++ ttTransactionTestFiller.json | 21 +++- 7 files changed, 308 insertions(+), 40 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index e86b84aad..45fe55b07 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -671,7 +671,6 @@ Options::Options() memory = true; inputLimits = true; bigData = true; - checkState = true; } } } diff --git a/bcInvalidHeaderTestFiller.json b/bcInvalidHeaderTestFiller.json index 2d23ca039..9c9bdacd5 100644 --- a/bcInvalidHeaderTestFiller.json +++ b/bcInvalidHeaderTestFiller.json @@ -17,9 +17,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -44,7 +49,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -54,7 +59,6 @@ }, "log1_wrongBloom" : { - "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", @@ -72,10 +76,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, - + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -100,7 +108,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -127,9 +135,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -144,7 +157,7 @@ "blocks" : [ { "blockHeader" : { - "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1" + "coinbase" : "0x9888f1f195afa192cfee860698584c030f4c9db1" }, "transactions" : [ { @@ -154,7 +167,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -181,9 +194,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -208,7 +226,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -217,7 +235,7 @@ ] }, - "DifferentExtraData" : { + "DifferentExtraData1025" : { "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", @@ -235,9 +253,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -252,7 +275,7 @@ "blocks" : [ { "blockHeader" : { - "extraData" : "0x42" + "extraData" : "0x0101020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000" }, "transactions" : [ { @@ -262,7 +285,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -289,9 +312,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -316,7 +344,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -344,9 +372,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -371,7 +404,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -398,9 +431,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -425,7 +463,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -452,9 +490,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -479,7 +522,66 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" + } + ], + "uncleHeaders" : [ + ] + } + ] + }, + + "wrongParentHash2" : { + "genesisBlockHeader" : { + "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "coinbase" : "0x8888f1f195afa192cfee860698584c030f4c9db1", + "difficulty" : "131072", + "extraData" : "0x42", + "gasLimit" : "3141592", + "gasUsed" : "0", + "mixHash" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "nonce" : "0x0102030405060708", + "number" : "0", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "receiptTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "stateRoot" : "0xf99eb1626cfa6db435c0836235942d7ccaa935f1ae247d3f1c21e495685f903a", + "timestamp" : "0x54c98c81", + "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" + }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000000000", + "nonce" : "0", + "code" : "", + "storage": {} + }, + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100", + "nonce" : "0", + "code" : "{ (MSTORE 0 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) (LOG1 0 32 0) }", + "storage": {} + } + }, + "blocks" : [ + { + "blockHeader" : { + "parentHash" : "0x6151889c8f14ab46e32ee0b1894bc276416385d068a1ade000d0dadef9b08b18" + }, + "transactions" : [ + { + "data" : "", + "gasLimit" : "50000", + "gasPrice" : "10", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "5000" } ], "uncleHeaders" : [ @@ -506,9 +608,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -533,7 +640,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -560,9 +667,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -587,7 +699,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -614,9 +726,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -641,7 +758,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -668,9 +785,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -695,7 +817,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ @@ -722,9 +844,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { - "balance" : "10000000000", + "balance" : "100000000000", "nonce" : "0", "code" : "", "storage": {} @@ -749,7 +876,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "5000000000" + "value" : "5000" } ], "uncleHeaders" : [ diff --git a/bcJS_API_TestFiller.json b/bcJS_API_TestFiller.json index 468b3b2e8..fe7396e59 100644 --- a/bcJS_API_TestFiller.json +++ b/bcJS_API_TestFiller.json @@ -17,6 +17,21 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "70" + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "storage" : { + "0x" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x01" : "0x42", + "0x02" : "0x23", + "0x03" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "0x04" : "0x01", + "0x05" : "0x55114a49" + } + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", diff --git a/bcValidBlockTestFiller.json b/bcValidBlockTestFiller.json index c0ed86437..3529c61ee 100644 --- a/bcValidBlockTestFiller.json +++ b/bcValidBlockTestFiller.json @@ -1,5 +1,4 @@ { - "diff1024" : { "genesisBlockHeader" : { "bloom" : "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", @@ -18,6 +17,11 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "10" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000", @@ -64,6 +68,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "10" + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "1500000000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000", @@ -109,6 +121,11 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000", @@ -127,7 +144,7 @@ "nonce" : "0", "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "0" + "value" : "100" } ], "uncleHeaders" : [ @@ -154,6 +171,11 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "10" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000", @@ -199,6 +221,11 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "8000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000", @@ -253,6 +280,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "5000000000" + }, + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "1500000000000210000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000", @@ -307,6 +342,11 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "5000000100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000", @@ -358,6 +398,11 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "8888f1f195afa192cfee860698584c030f4c9db1" : { + "balance" : "1500000000002500000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000", @@ -403,6 +448,11 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "5000000100" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000", diff --git a/blockchain.cpp b/blockchain.cpp index 15cda8037..b225d313b 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -288,12 +288,24 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) blObj.erase(blObj.find("blockHeader")); blObj.erase(blObj.find("uncleHeaders")); blObj.erase(blObj.find("transactions")); + state = State(OverlayDB(), BaseState::Empty, biGenesisBlock.coinbaseAddress); + importer.importState(o["pre"].get_obj(), state); } blArray.push_back(blObj); } + + if (o.count("expect") > 0) + { + stateOptionsMap expectStateMap; + State stateExpect(OverlayDB(), BaseState::Empty, biGenesisBlock.coinbaseAddress); + importer.importState(o["expect"].get_obj(), stateExpect, expectStateMap); + ImportTest::checkExpectedState(stateExpect, state, expectStateMap, Options::get().checkState ? WhenError::Throw : WhenError::DontThrow); + o.erase(o.find("expect")); + } + o["blocks"] = blArray; o["postState"] = fillJsonWithState(state); - } + }//_fillin else { @@ -667,6 +679,11 @@ RLPStream createFullBlockFromHeader(BlockInfo const& _bi, bytes const& _txs, byt BOOST_AUTO_TEST_SUITE(BlockChainTests) +BOOST_AUTO_TEST_CASE(bcForkBlockTest) +{ + dev::test::executeTests("bcForkBlockTest", "/BlockTests", dev::test::doBlockchainTests); +} + BOOST_AUTO_TEST_CASE(bcInvalidRLPTest) { dev::test::executeTests("bcInvalidRLPTest", "/BlockTests", dev::test::doBlockchainTests); diff --git a/stTransactionTestFiller.json b/stTransactionTestFiller.json index 28e7318fd..70d329d6c 100644 --- a/stTransactionTestFiller.json +++ b/stTransactionTestFiller.json @@ -79,6 +79,49 @@ } }, + "EmptyTransaction3" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "45678256", + "currentGasLimit" : "1000000", + "currentNumber" : "0", + "currentTimestamp" : 1, + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "21000" + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "code" : "0x" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "79000", + "nonce" : "1" + } + }, + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "100000", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : + { + "data" : "", + "gasLimit" : "22000", + "gasPrice" : "1", + "nonce" : "", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "" + } + }, + "TransactionSendingToEmpty" : { "env" : { "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", @@ -640,6 +683,7 @@ }, "expect" : { "0000000000000000000000000000000000000000" : { + "balance" : "0", "storage" : { "0x" : "0x0c", "0x01" : "0x0c", @@ -794,6 +838,7 @@ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" }, "expect" : { + "balance" : "0", "0000000000000000000000000000000000000000" : { "storage" : { "0x" : "0x0c", diff --git a/ttTransactionTestFiller.json b/ttTransactionTestFiller.json index 1d4f5bcdd..cb39b533c 100644 --- a/ttTransactionTestFiller.json +++ b/ttTransactionTestFiller.json @@ -347,7 +347,7 @@ } }, - "TransactionWithSvalueWrongSize" : { + "TransactionWithSvalueWrongSize" : { "transaction" : { "data" : "", @@ -407,7 +407,7 @@ } }, - "TransactionWithHihghGasPrice" : { + "TransactionWithHihghGasPrice" : { "transaction" : { "data" : "", @@ -422,7 +422,7 @@ } }, - "TransactionWithGasLimitxPriceOverflow" : { + "TransactionWithGasLimitxPriceOverflow" : { "transaction" : { "data" : "", @@ -612,5 +612,20 @@ "v": "28", "value": "0" } + }, + + "RSsecp256k1" : { + "transaction" : + { + "data" : "0x5544", + "gasLimit" : "2000", + "gasPrice" : "1", + "nonce" : "3", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : "10", + "v" : "28", + "r" : "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141", + "s" : "0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141" + } } } From 47849db473e8ed71281209823c6c2823931f0462 Mon Sep 17 00:00:00 2001 From: winsvega Date: Fri, 10 Apr 2015 20:49:29 +0300 Subject: [PATCH 38/45] Check State: Block Test + Transaction --- blockchain.cpp | 10 ++--- transaction.cpp | 71 +++++++++++++++++++++----------- ttTransactionTestFiller.json | 78 ++++++++++++++++++++---------------- 3 files changed, 96 insertions(+), 63 deletions(-) diff --git a/blockchain.cpp b/blockchain.cpp index b225d313b..23bfd665b 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -53,6 +53,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) BOOST_REQUIRE(o.count("pre")); ImportTest importer(o["pre"].get_obj()); State state(OverlayDB(), BaseState::Empty, biGenesisBlock.coinbaseAddress); + State stateTemp(OverlayDB(), BaseState::Empty, biGenesisBlock.coinbaseAddress); importer.importState(o["pre"].get_obj(), state); o["pre"] = fillJsonWithState(state); state.commit(); @@ -89,7 +90,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) for (auto const& bl: o["blocks"].get_array()) { mObject blObj = bl.get_obj(); - + stateTemp = state; // get txs TransactionQueue txs; ZeroGasPricer gp; @@ -180,7 +181,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) } uncleHeaderObj_pre = uncleHeaderObj; - } + } //for blObj["uncleHeaders"].get_array() blObj["uncleHeaders"] = aUncleList; bc.sync(uncleBlockQueue, state.db(), 4); @@ -288,11 +289,10 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) blObj.erase(blObj.find("blockHeader")); blObj.erase(blObj.find("uncleHeaders")); blObj.erase(blObj.find("transactions")); - state = State(OverlayDB(), BaseState::Empty, biGenesisBlock.coinbaseAddress); - importer.importState(o["pre"].get_obj(), state); + state = stateTemp; //revert state as if it was before executing this block } blArray.push_back(blObj); - } + } //for blocks if (o.count("expect") > 0) { diff --git a/transaction.cpp b/transaction.cpp index 7aa073f29..daf8368d4 100644 --- a/transaction.cpp +++ b/transaction.cpp @@ -36,8 +36,54 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin) cerr << i.first << endl; mObject& o = i.second.get_obj(); - if (_fillin == false) + if (_fillin) { + BOOST_REQUIRE(o.count("transaction") > 0); + mObject tObj = o["transaction"].get_obj(); + + //Construct Rlp of the given transaction + RLPStream rlpStream = createRLPStreamFromTransactionFields(tObj); + o["rlp"] = "0x" + toHex(rlpStream.out()); + + try + { + Transaction txFromFields(rlpStream.out(), CheckTransaction::Everything); + if (!txFromFields.signature().isValid()) + BOOST_THROW_EXCEPTION(Exception() << errinfo_comment("transaction from RLP signature is invalid") ); + + o["sender"] = toString(txFromFields.sender()); + } + catch(Exception const& _e) + { + //Transaction is InValid + cnote << "Transaction Exception: " << diagnostic_information(_e); + o.erase(o.find("transaction")); + if (o.count("expect") > 0) + { + bool expectInValid = (o["expect"].get_str() == "invalid"); + if (Options::get().checkState) + BOOST_CHECK_MESSAGE(expectInValid, "Check state: Transaction " << i.first << " is not expected to be invalid!"); + else + BOOST_WARN_MESSAGE(expectInValid, "Check state: Transaction " << i.first << " is not expected to be invalid!"); + + o.erase(o.find("expect")); + } + } + + //Transaction is Valid + if (o.count("expect") > 0) + { + bool expectValid = (o["expect"].get_str() == "valid"); + if (Options::get().checkState) + BOOST_CHECK_MESSAGE(expectValid, "Check state: Transaction " << i.first << " is not expected to be valid!"); + else + BOOST_WARN_MESSAGE(expectValid, "Check state: Transaction " << i.first << " is not expected to be valid!"); + + o.erase(o.find("expect")); + } + } + else + { BOOST_REQUIRE(o.count("rlp") > 0); Transaction txFromRlp; try @@ -80,29 +126,6 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin) Address addressReaded = Address(o["sender"].get_str()); BOOST_CHECK_MESSAGE(txFromFields.sender() == addressReaded || txFromRlp.sender() == addressReaded, "Signature address of sender does not match given sender address!"); } - else - { - BOOST_REQUIRE(o.count("transaction") > 0); - mObject tObj = o["transaction"].get_obj(); - - //Construct Rlp of the given transaction - RLPStream rlpStream = createRLPStreamFromTransactionFields(tObj); - o["rlp"] = "0x" + toHex(rlpStream.out()); - - try - { - Transaction txFromFields(rlpStream.out(), CheckTransaction::Everything); - if (!txFromFields.signature().isValid()) - BOOST_THROW_EXCEPTION(Exception() << errinfo_comment("transaction from RLP signature is invalid") ); - - o["sender"] = toString(txFromFields.sender()); - } - catch(Exception const& _e) - { - cnote << "Transaction Exception: " << diagnostic_information(_e); - o.erase(o.find("transaction")); - } - } }//for }//doTransactionTests diff --git a/ttTransactionTestFiller.json b/ttTransactionTestFiller.json index cb39b533c..b75947e87 100644 --- a/ttTransactionTestFiller.json +++ b/ttTransactionTestFiller.json @@ -1,5 +1,6 @@ { "RightVRSTest" : { + "expect" : "valid", "transaction" : { "data" : "0x5544", @@ -15,6 +16,7 @@ }, "V_overflow32bit" : { + "expect" : "invalid", "transaction" : { "data" : "0x5544", @@ -30,6 +32,7 @@ }, "V_overflow32bitSigned" : { + "expect" : "invalid", "transaction" : { "data" : "0x5544", @@ -45,6 +48,7 @@ }, "V_overflow64bit" : { + "expect" : "invalid", "transaction" : { "data" : "0x5544", @@ -60,6 +64,7 @@ }, "V_overflow64bitSigned" : { + "expect" : "invalid", "transaction" : { "data" : "0x5544", @@ -75,6 +80,7 @@ }, "WrongVRSTestVEqual26" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -90,6 +96,7 @@ }, "WrongVRSTestVEqual29" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -105,6 +112,7 @@ }, "WrongVRSTestVEqual31" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -120,6 +128,7 @@ }, "WrongVRSTestVOverflow" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -135,6 +144,7 @@ }, "WrongVRSTestIncorrectSize" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -151,6 +161,7 @@ "SenderTest" : { "//" : "sender a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "expect" : "valid", "transaction" : { "data" : "", @@ -167,6 +178,7 @@ }, "DataTest" : { + "expect" : "valid", "transaction" : { "data" : "0x0358ac39584bc98a7c979f984b03", @@ -183,6 +195,7 @@ }, "TransactionWithTooManyRLPElements" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -199,6 +212,7 @@ }, "TransactionWithTooFewRLPElements" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -212,6 +226,7 @@ }, "TransactionWithHihghValue" : { + "expect" : "valid", "transaction" : { "data" : "", @@ -228,6 +243,7 @@ "TransactionWithHihghValueOverflow" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -243,6 +259,7 @@ }, "TransactionWithSvalueHigh" : { + "expect" : "valid", "transaction" : { "data" : "", @@ -258,6 +275,7 @@ }, "TransactionWithSvalueTooHigh" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -273,6 +291,7 @@ }, "TransactionWithSvalueOverflow" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -288,6 +307,7 @@ }, "TransactionWithRvalueOverflow" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -303,6 +323,7 @@ }, "TransactionWithRvalueHigh" : { + "expect" : "valid", "transaction" : { "data" : "", @@ -318,6 +339,7 @@ }, "TransactionWithRvalueTooHigh" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -333,6 +355,7 @@ }, "TransactionWithRvalueWrongSize" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -348,6 +371,7 @@ }, "TransactionWithSvalueWrongSize" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -363,6 +387,7 @@ }, "TransactionWithHihghNonce" : { + "expect" : "valid", "transaction" : { "data" : "", @@ -378,6 +403,7 @@ }, "TransactionWithNonceOverflow" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -393,6 +419,7 @@ }, "TransactionWithHihghGas" : { + "expect" : "valid", "transaction" : { "data" : "", @@ -408,6 +435,7 @@ }, "TransactionWithHihghGasPrice" : { + "expect" : "valid", "transaction" : { "data" : "", @@ -423,6 +451,7 @@ }, "TransactionWithGasLimitxPriceOverflow" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -438,6 +467,7 @@ }, "TransactionWithGasPriceOverflow" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -453,6 +483,7 @@ }, "TransactionWithGasLimitOverflow" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -468,6 +499,7 @@ }, "AddressMoreThan20PrefixedBy0" : { + "expect" : "invalid", "transaction" : { "data" : "0x12", @@ -483,14 +515,15 @@ }, "EmptyTransaction" : { + "expect" : "valid", "transaction" : { "data" : "", - "gasLimit" : "", - "gasPrice" : "", - "nonce" : "", + "gasLimit" : "0", + "gasPrice" : "0", + "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", - "value" : "", + "value" : "0", "v" : "27", "r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353", "s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804" @@ -498,6 +531,7 @@ }, "AddressMoreThan20" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -513,6 +547,7 @@ }, "AddressLessThan20" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -528,6 +563,7 @@ }, "AddressLessThan20Prefixed0" : { + "expect" : "invalid", "transaction" : { "data" : "", @@ -542,37 +578,8 @@ } }, - "ValuesAsHex" : { - "transaction" : - { - "data" : "", - "gasLimit" : "0xadc053", - "gasPrice" : "1", - "nonce" : "0xffdc5", - "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", - "value" : "4294820140", - "v" : "28", - "r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a", - "s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3" - } - }, - - "ValuesAsDec" : { - "transaction" : - { - "data" : "", - "gasLimit" : "11386963", - "gasPrice" : "1", - "nonce" : "1048005", - "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", - "value" : "4501151495864620", - "v" : "28", - "r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a", - "s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3" - } - }, - "unpadedRValue": { + "expect" : "valid", "transaction": { "nonce": "13", "gasPrice": "0x09184e72a000", @@ -587,6 +594,7 @@ }, "libsecp256k1test": { + "expect" : "valid", "transaction": { "nonce": "", "gasPrice": "0x09184e72a000", @@ -601,6 +609,7 @@ }, "dataTx_bcValidBlockTest": { + "expect" : "valid", "transaction": { "nonce": "0", "gasPrice": "50", @@ -615,6 +624,7 @@ }, "RSsecp256k1" : { + "expect" : "valid", "transaction" : { "data" : "0x5544", From 4ba86875629aa5fab0ddfbd6dafd0c7cf7ef0906 Mon Sep 17 00:00:00 2001 From: winsvega Date: Sat, 11 Apr 2015 02:45:48 +0300 Subject: [PATCH 39/45] Check State: expect in blocks transactions test fetched to POC changes --- bcUncleTestFiller.json | 133 +++++++++++++++++++++++++++++++++ transaction.cpp | 8 +- ttTransactionTestFiller.json | 138 +++++++++++++++++++++-------------- 3 files changed, 222 insertions(+), 57 deletions(-) diff --git a/bcUncleTestFiller.json b/bcUncleTestFiller.json index 9c0cedc3b..e67cfeecd 100644 --- a/bcUncleTestFiller.json +++ b/bcUncleTestFiller.json @@ -17,6 +17,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -95,6 +103,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -188,6 +204,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -281,6 +305,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -374,6 +406,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -470,6 +510,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -566,6 +614,20 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + }, + "bcde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1312500000000000000" + }, + "ccde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1312500000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -677,6 +739,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -806,6 +876,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "40" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "4" + }, + "bcde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1125000000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -914,6 +995,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "50" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "5" + }, + "bcde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "937500000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -1037,6 +1129,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "60" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "6" + }, + "bcde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "750000000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -1175,6 +1278,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "70" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "7" + }, + "bcde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "562500000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -1328,6 +1442,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "80" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "8" + }, + "bcde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "375000000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -1496,6 +1621,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "80" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "8" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", diff --git a/transaction.cpp b/transaction.cpp index daf8368d4..b87cc37e9 100644 --- a/transaction.cpp +++ b/transaction.cpp @@ -62,9 +62,9 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin) { bool expectInValid = (o["expect"].get_str() == "invalid"); if (Options::get().checkState) - BOOST_CHECK_MESSAGE(expectInValid, "Check state: Transaction " << i.first << " is not expected to be invalid!"); + BOOST_CHECK_MESSAGE(expectInValid, "Check state: Transaction '" << i.first << "' is expected to be valid!"); else - BOOST_WARN_MESSAGE(expectInValid, "Check state: Transaction " << i.first << " is not expected to be invalid!"); + BOOST_WARN_MESSAGE(expectInValid, "Check state: Transaction '" << i.first << "' is expected to be valid!"); o.erase(o.find("expect")); } @@ -75,9 +75,9 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin) { bool expectValid = (o["expect"].get_str() == "valid"); if (Options::get().checkState) - BOOST_CHECK_MESSAGE(expectValid, "Check state: Transaction " << i.first << " is not expected to be valid!"); + BOOST_CHECK_MESSAGE(expectValid, "Check state: Transaction '" << i.first << "' is expected to be invalid!"); else - BOOST_WARN_MESSAGE(expectValid, "Check state: Transaction " << i.first << " is not expected to be valid!"); + BOOST_WARN_MESSAGE(expectValid, "Check state: Transaction '" << i.first << "' is expected to be invalid!"); o.erase(o.find("expect")); } diff --git a/ttTransactionTestFiller.json b/ttTransactionTestFiller.json index b75947e87..1dcc0f94e 100644 --- a/ttTransactionTestFiller.json +++ b/ttTransactionTestFiller.json @@ -3,8 +3,24 @@ "expect" : "valid", "transaction" : { - "data" : "0x5544", - "gasLimit" : "2000", + "data" : "0x", + "gasLimit" : "21000", + "gasPrice" : "1", + "nonce" : "3", + "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : "10", + "v" : "28", + "r" : "0x98ff921201554726367d2be8c804a7ff89ccf285ebc57dff8ae4c44b9c19ac4a", + "s" : "0x8887321be575c8095f789dd4c743dfe42c1820f9231f98a962b210e3ac2452a3" + } + }, + + "NotEnoughGasLimit" : { + "expect" : "invalid", + "transaction" : + { + "data" : "0x", + "gasLimit" : "20000", "gasPrice" : "1", "nonce" : "3", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -20,7 +36,7 @@ "transaction" : { "data" : "0x5544", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "3", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -36,7 +52,7 @@ "transaction" : { "data" : "0x5544", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "3", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -52,7 +68,7 @@ "transaction" : { "data" : "0x5544", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "3", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -68,7 +84,7 @@ "transaction" : { "data" : "0x5544", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "3", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -84,7 +100,7 @@ "transaction" : { "data" : "", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -100,7 +116,7 @@ "transaction" : { "data" : "", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -116,7 +132,7 @@ "transaction" : { "data" : "", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -132,7 +148,7 @@ "transaction" : { "data" : "", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -148,7 +164,7 @@ "transaction" : { "data" : "", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", @@ -160,12 +176,12 @@ }, "SenderTest" : { - "//" : "sender a94f5374fce5edbc8e2a8697c15331677e6ebf0b", + "//" : "sender 0f65fe9276bc9a24ae7083ae28e2660ef72df99e", "expect" : "valid", "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -177,12 +193,29 @@ } }, - "DataTest" : { + "DataTestNotEnoughGAS" : { + "expect" : "invalid", + "transaction" : + { + "data" : "0x0358ac39584bc98a7c979f984b03", + "gasLimit" : "21020", + "gasPrice" : "1", + "nonce" : "0", + "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", + "value" : "10", + "v" : "27", + "r" : "0x48b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353", + "s" : "secretkey 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "s" : "0xefffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804" + } + }, + + "DataTestEnoughGAS" : { "expect" : "valid", "transaction" : { "data" : "0x0358ac39584bc98a7c979f984b03", - "gasLimit" : "850", + "gasLimit" : "23000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -199,7 +232,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -230,7 +263,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -242,12 +275,12 @@ }, - "TransactionWithHihghValueOverflow" : { + "TransactionWithHighValueOverflow" : { "expect" : "invalid", "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -263,7 +296,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -279,7 +312,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -295,7 +328,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -311,7 +344,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -323,11 +356,11 @@ }, "TransactionWithRvalueHigh" : { - "expect" : "valid", + "expect" : "invalid", "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -343,7 +376,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -354,12 +387,12 @@ } }, - "TransactionWithRvalueWrongSize" : { - "expect" : "invalid", + "TransactionWithRvaluePrefixed00" : { + "expect" : "valid", "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -370,12 +403,12 @@ } }, - "TransactionWithSvalueWrongSize" : { - "expect" : "invalid", + "TransactionWithSvaluePrefixed00" : { + "expect" : "valid", "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -391,7 +424,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -407,7 +440,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "115792089237316195423570985008687907853269984665640564039457584007913129639936", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -439,7 +472,7 @@ "transaction" : { "data" : "", - "gasLimit" : "1000", + "gasLimit" : "21000", "gasPrice" : "115792089237316195423570985008687907853269984665640564039457584007913129639935", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -451,7 +484,7 @@ }, "TransactionWithGasLimitxPriceOverflow" : { - "expect" : "invalid", + "expect" : "valid", "transaction" : { "data" : "", @@ -471,7 +504,7 @@ "transaction" : { "data" : "", - "gasLimit" : "850", + "gasLimit" : "21000", "gasPrice" : "115792089237316195423570985008687907853269984665640564039457584007913129639936", "nonce" : "0", "to" : "095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -503,7 +536,7 @@ "transaction" : { "data" : "0x12", - "gasLimit" : "1000", + "gasLimit" : "21000", "gasPrice" : "123", "nonce" : "54", "to" : "0x0000000000000000095e7baea6a6c7c4c2dfeb977efac326af552d87", @@ -515,7 +548,7 @@ }, "EmptyTransaction" : { - "expect" : "valid", + "expect" : "invalid", "transaction" : { "data" : "", @@ -535,7 +568,7 @@ "transaction" : { "data" : "", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b1c", @@ -551,7 +584,7 @@ "transaction" : { "data" : "", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "b9331677e6ebf", @@ -563,11 +596,11 @@ }, "AddressLessThan20Prefixed0" : { - "expect" : "invalid", + "expect" : "valid", "transaction" : { "data" : "", - "gasLimit" : "2000", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "0", "to" : "0x000000000000000000000000000b9331677e6ebf", @@ -583,7 +616,7 @@ "transaction": { "nonce": "13", "gasPrice": "0x09184e72a000", - "gasLimit": "0x2710", + "gasLimit": "0xf710", "to": "7c47ef93268a311f4cad0c750724299e9b72c268", "data": "0x379607f50000000000000000000000000000000000000000000000000000000000000005", "r": "0x006ab6dda9f4df56ea45583af36660329147f1753f3724ea5eb9ed83e812ca77", @@ -596,15 +629,15 @@ "libsecp256k1test": { "expect" : "valid", "transaction": { - "nonce": "", + "nonce": "0", "gasPrice": "0x09184e72a000", - "gasLimit": "0x1388", + "gasLimit": "0xf388", "to": "", - "data": "", + "data": "0x", "r": "44", "s": "4", "v": "27", - "value": "" + "value": "0" } }, @@ -624,11 +657,10 @@ }, "RSsecp256k1" : { - "expect" : "valid", - "transaction" : - { - "data" : "0x5544", - "gasLimit" : "2000", + "expect" : "invalid", + "transaction" : { + "data" : "0x", + "gasLimit" : "21000", "gasPrice" : "1", "nonce" : "3", "to" : "b94f5374fce5edbc8e2a8697c15331677e6ebf0b", From deff3f2b5022dec250b0ea9fb71312655f51d60a Mon Sep 17 00:00:00 2001 From: winsvega Date: Sun, 12 Apr 2015 17:14:14 +0300 Subject: [PATCH 40/45] Check State: Block Tests --- bcUncleHeaderValiditiyFiller.json | 98 +++++++++++++++++++++++++++++++ blockchain.cpp | 2 +- 2 files changed, 99 insertions(+), 1 deletion(-) diff --git a/bcUncleHeaderValiditiyFiller.json b/bcUncleHeaderValiditiyFiller.json index 9725a3241..ee36e230d 100644 --- a/bcUncleHeaderValiditiyFiller.json +++ b/bcUncleHeaderValiditiyFiller.json @@ -17,6 +17,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + }, + "acde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1312500000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -110,6 +121,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + }, + "acde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1312500000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -204,6 +226,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + }, + "acde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1312500000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -298,6 +331,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + }, + "acde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1312500000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -392,6 +436,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + }, + "acde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1312500000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -486,6 +541,17 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + }, + "acde5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1312500000000000000" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -580,6 +646,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "30" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "3" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -674,6 +748,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -768,6 +850,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", @@ -862,6 +952,14 @@ "transactionsTrie" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", "uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347" }, + "expect" : { + "095e7baea6a6c7c4c2dfeb977efac326af552d87" : { + "balance" : "20" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "2" + } + }, "pre" : { "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { "balance" : "10000000000000", diff --git a/blockchain.cpp b/blockchain.cpp index 23bfd665b..35fa8ccd7 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -617,7 +617,7 @@ BlockInfo constructBlock(mObject& _o) catch (Exception const& _e) { cnote << "block population did throw an exception: " << diagnostic_information(_e); - BOOST_ERROR("Failed block population with Exception: " << _e.what()); + //BOOST_ERROR("Failed block population with Exception: " << _e.what()); } catch (std::exception const& _e) { From 675975fad2c2efcd56f92025bbf2b1804adf2b7e Mon Sep 17 00:00:00 2001 From: winsvega Date: Mon, 13 Apr 2015 13:02:51 +0300 Subject: [PATCH 41/45] Check State: Style --- blockchain.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/blockchain.cpp b/blockchain.cpp index 35fa8ccd7..97171e3f2 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -617,7 +617,6 @@ BlockInfo constructBlock(mObject& _o) catch (Exception const& _e) { cnote << "block population did throw an exception: " << diagnostic_information(_e); - //BOOST_ERROR("Failed block population with Exception: " << _e.what()); } catch (std::exception const& _e) { From 8f659f39813d4418d1c1e016f4d84309a8044946 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 13 Apr 2015 18:12:05 +0200 Subject: [PATCH 42/45] Various fixes for mining. --- TestHelper.cpp | 31 +++++++++++++ TestHelper.h | 5 ++- blockchain.cpp | 111 +++++++++++++++++----------------------------- dagger.cpp | 12 ++--- stateOriginal.cpp | 11 +++-- 5 files changed, 85 insertions(+), 85 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index e86b84aad..8b528b3ee 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -62,6 +62,37 @@ void connectClients(Client& c1, Client& c2) c2.connect("127.0.0.1", c1Port); #endif } + +void mine(State& s, BlockChain const& _bc) +{ + s.commitToMine(_bc); + GenericFarm f; + bool completed = false; + f.onSolutionFound([&](ProofOfWork::Solution sol) + { + return completed = s.completeMine(sol); + }); + f.setWork(s.info()); + f.startCPU(); + while (!completed) + this_thread::sleep_for(chrono::milliseconds(20)); +} + +void mine(BlockInfo& _bi) +{ + GenericFarm f; + bool completed = false; + f.onSolutionFound([&](ProofOfWork::Solution sol) + { + ProofOfWork::assignResult(sol, _bi); + return completed = true; + }); + f.setWork(_bi); + f.startCPU(); + while (!completed) + this_thread::sleep_for(chrono::milliseconds(20)); +} + } namespace test diff --git a/TestHelper.h b/TestHelper.h index 04ca95be4..92745bc36 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -36,9 +36,12 @@ namespace eth { class Client; +class State; void mine(Client& c, int numBlocks); void connectClients(Client& c1, Client& c2); +void mine(State& _s, BlockChain const& _bc); +void mine(BlockInfo& _bi); } @@ -225,7 +228,5 @@ public: }; }; - - } } diff --git a/blockchain.cpp b/blockchain.cpp index 6d7bc97ef..258117695 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -190,11 +190,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) { state.sync(bc); state.sync(bc, txs, gp); - state.commitToMine(bc); - MineInfo info; - ProofOfWork pow; - for (info.completed = false; !info.completed; info = state.mine(&pow)) {} - state.completeMine(); + mine(state, bc); } catch (Exception const& _e) { @@ -519,76 +515,55 @@ bytes createBlockRLPFromFields(mObject& _tObj) return rlpStream.out(); } -void overwriteBlockHeader(BlockInfo& _currentBlockHeader, mObject& _blObj) +void overwriteBlockHeader(BlockInfo& _header, mObject& _blObj) { - if (_blObj["blockHeader"].get_obj().size() != 14) + auto ho = _blObj["blockHeader"].get_obj(); + if (ho.size() != 14) { - - BlockInfo tmp = _currentBlockHeader; - - if (_blObj["blockHeader"].get_obj().count("parentHash")) - tmp.parentHash = h256(_blObj["blockHeader"].get_obj()["parentHash"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("uncleHash")) - tmp.sha3Uncles = h256(_blObj["blockHeader"].get_obj()["uncleHash"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("coinbase")) - tmp.coinbaseAddress = Address(_blObj["blockHeader"].get_obj()["coinbase"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("stateRoot")) - tmp.stateRoot = h256(_blObj["blockHeader"].get_obj()["stateRoot"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("transactionsTrie")) - tmp.transactionsRoot = h256(_blObj["blockHeader"].get_obj()["transactionsTrie"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("receiptTrie")) - tmp.receiptsRoot = h256(_blObj["blockHeader"].get_obj()["receiptTrie"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("bloom")) - tmp.logBloom = LogBloom(_blObj["blockHeader"].get_obj()["bloom"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("difficulty")) - tmp.difficulty = toInt(_blObj["blockHeader"].get_obj()["difficulty"]); - - if (_blObj["blockHeader"].get_obj().count("number")) - tmp.number = toInt(_blObj["blockHeader"].get_obj()["number"]); - - if (_blObj["blockHeader"].get_obj().count("gasLimit")) - tmp.gasLimit = toInt(_blObj["blockHeader"].get_obj()["gasLimit"]); - - if (_blObj["blockHeader"].get_obj().count("gasUsed")) - tmp.gasUsed = toInt(_blObj["blockHeader"].get_obj()["gasUsed"]); - - if (_blObj["blockHeader"].get_obj().count("timestamp")) - tmp.timestamp = toInt(_blObj["blockHeader"].get_obj()["timestamp"]); - - if (_blObj["blockHeader"].get_obj().count("extraData")) - tmp.extraData = importByteArray(_blObj["blockHeader"].get_obj()["extraData"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("mixHash")) - tmp.mixHash = h256(_blObj["blockHeader"].get_obj()["mixHash"].get_str()); + BlockInfo tmp = _header; + if (ho.count("parentHash")) + tmp.parentHash = h256(ho["parentHash"].get_str()); + if (ho.count("uncleHash")) + tmp.sha3Uncles = h256(ho["uncleHash"].get_str()); + if (ho.count("coinbase")) + tmp.coinbaseAddress = Address(ho["coinbase"].get_str()); + if (ho.count("stateRoot")) + tmp.stateRoot = h256(ho["stateRoot"].get_str()); + if (ho.count("transactionsTrie")) + tmp.transactionsRoot = h256(ho["transactionsTrie"].get_str()); + if (ho.count("receiptTrie")) + tmp.receiptsRoot = h256(ho["receiptTrie"].get_str()); + if (ho.count("bloom")) + tmp.logBloom = LogBloom(ho["bloom"].get_str()); + if (ho.count("difficulty")) + tmp.difficulty = toInt(ho["difficulty"]); + if (ho.count("number")) + tmp.number = toInt(ho["number"]); + if (ho.count("gasLimit")) + tmp.gasLimit = toInt(ho["gasLimit"]); + if (ho.count("gasUsed")) + tmp.gasUsed = toInt(ho["gasUsed"]); + if (ho.count("timestamp")) + tmp.timestamp = toInt(ho["timestamp"]); + if (ho.count("extraData")) + tmp.extraData = importByteArray(ho["extraData"].get_str()); + if (ho.count("mixHash")) + tmp.mixHash = h256(ho["mixHash"].get_str()); + tmp.noteDirty(); // find new valid nonce - - if (tmp != _currentBlockHeader) + if (tmp != _header) { - _currentBlockHeader = tmp; - - ProofOfWork pow; - std::pair ret; - while (!ProofOfWork::verify(_currentBlockHeader)) - { - ret = pow.mine(_currentBlockHeader, 1000, true); - Ethash::assignResult(ret.second, _currentBlockHeader); - } + mine(tmp); + _header = tmp; } } else { // take the blockheader as is - const bytes c_blockRLP = createBlockRLPFromFields(_blObj["blockHeader"].get_obj()); + const bytes c_blockRLP = createBlockRLPFromFields(ho); const RLP c_bRLP(c_blockRLP); - _currentBlockHeader.populateFromHeader(c_bRLP, IgnoreNonce); + _header.populateFromHeader(c_bRLP, IgnoreNonce); } } @@ -620,13 +595,7 @@ BlockInfo constructBlock(mObject& _o) void updatePoW(BlockInfo& _bi) { - ProofOfWork pow; - std::pair ret; - while (!ProofOfWork::verify(_bi)) - { - ret = pow.mine(_bi, 10000, true); - Ethash::assignResult(ret.second, _bi); - } + mine(_bi); _bi.noteDirty(); } diff --git a/dagger.cpp b/dagger.cpp index 4abba5090..367c422ad 100644 --- a/dagger.cpp +++ b/dagger.cpp @@ -25,7 +25,7 @@ #include "JsonSpiritHeaders.h" #include #include -#include +#include #include #include "TestHelper.h" @@ -63,18 +63,18 @@ BOOST_AUTO_TEST_CASE(basic_test) unsigned cacheSize(o["cache_size"].get_int()); h256 cacheHash(o["cache_hash"].get_str()); - BOOST_REQUIRE_EQUAL(Ethasher::get()->params(header).cache_size, cacheSize); - BOOST_REQUIRE_EQUAL(sha3(bytesConstRef((byte const*)Ethasher::get()->light(header), cacheSize)), cacheHash); + BOOST_REQUIRE_EQUAL(EthashAux::get()->params(header).cache_size, cacheSize); + BOOST_REQUIRE_EQUAL(sha3(bytesConstRef((byte const*)EthashAux::get()->light(header), cacheSize)), cacheHash); #if TEST_FULL unsigned fullSize(o["full_size"].get_int()); h256 fullHash(o["full_hash"].get_str()); - BOOST_REQUIRE_EQUAL(Ethasher::get()->full(header).size(), fullSize); - BOOST_REQUIRE_EQUAL(sha3(Ethasher::get()->full(header)), fullHash); + BOOST_REQUIRE_EQUAL(EthashAux::get()->full(header).size(), fullSize); + BOOST_REQUIRE_EQUAL(sha3(EthashAux::get()->full(header)), fullHash); #endif h256 result(o["result"].get_str()); - Ethasher::Result r = Ethasher::eval(header); + Ethash::Result r = EthashAux::eval(header); BOOST_REQUIRE_EQUAL(r.value, result); BOOST_REQUIRE_EQUAL(r.mixHash, header.mixHash); } diff --git a/stateOriginal.cpp b/stateOriginal.cpp index 40f759434..e1a3c7c4a 100644 --- a/stateOriginal.cpp +++ b/stateOriginal.cpp @@ -25,7 +25,9 @@ #include #include #include +#include #include +#include "TestHelper.h" using namespace std; using namespace dev; using namespace dev::eth; @@ -67,10 +69,8 @@ BOOST_AUTO_TEST_CASE(Complex) cout << s; // Mine to get some ether! - s.commitToMine(bc); - ProofOfWork pow; - while (!s.mine(&pow).completed) {} - s.completeMine(); + mine(s, bc); + bc.attemptImport(s.blockData(), stateDB); cout << bc; @@ -89,8 +89,7 @@ BOOST_AUTO_TEST_CASE(Complex) // Mine to get some ether and set in stone. s.commitToMine(bc); s.commitToMine(bc); - while (!s.mine(&pow).completed) {} - s.completeMine(); + mine(s, bc); bc.attemptImport(s.blockData(), stateDB); cout << bc; From b6ee801879a583c5ca199262ab2df5babaea10c4 Mon Sep 17 00:00:00 2001 From: subtly Date: Tue, 14 Apr 2015 02:44:01 -0400 Subject: [PATCH 43/45] proper neighbours packet size w/test --- net.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/net.cpp b/net.cpp index ec1efb360..c6aeec8f1 100644 --- a/net.cpp +++ b/net.cpp @@ -190,6 +190,33 @@ BOOST_AUTO_TEST_CASE(v2PingNodePacket) BOOST_REQUIRE(p.version == 2); } +BOOST_AUTO_TEST_CASE(neighboursPacketLength) +{ + KeyPair k = KeyPair::create(); + std::vector> testNodes(TestNodeTable::createTestNodes(16)); + bi::udp::endpoint to(boost::asio::ip::address::from_string("127.0.0.1"), 30000); + + // hash(32), signature(65), overhead: packet(2), type(1), nodeList(2), ts(9), + static unsigned const nlimit = (1280 - 111) / 87; + for (unsigned offset = 0; offset < testNodes.size(); offset += nlimit) + { + Neighbours out(to); + + auto limit = nlimit ? std::min(testNodes.size(), (size_t)(offset + nlimit)) : testNodes.size(); + for (auto i = offset; i < limit; i++) + { + Neighbours::Node node; + node.ipAddress = boost::asio::ip::address::from_string("200.200.200.200").to_string(); + node.port = testNodes[i].second; + node.node = testNodes[i].first.pub(); + out.nodes.push_back(node); + } + + out.sign(k.sec()); + BOOST_REQUIRE_LE(out.data.size(), 1280); + } +} + BOOST_AUTO_TEST_CASE(test_neighbours_packet) { KeyPair k = KeyPair::create(); From d0efe9333fc88bae5ab82ef0435d99d9be4e21d4 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 11 Apr 2015 15:52:36 +0200 Subject: [PATCH 44/45] Some early refactoring to support async miners better. --- blockchain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockchain.cpp b/blockchain.cpp index 97171e3f2..8f5605898 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -587,7 +587,7 @@ void overwriteBlockHeader(BlockInfo& _currentBlockHeader, mObject& _blObj) _currentBlockHeader = tmp; ProofOfWork pow; - std::pair ret; + std::pair ret; while (!ProofOfWork::verify(_currentBlockHeader)) { ret = pow.mine(_currentBlockHeader, 1000, true); @@ -632,7 +632,7 @@ BlockInfo constructBlock(mObject& _o) void updatePoW(BlockInfo& _bi) { ProofOfWork pow; - std::pair ret; + std::pair ret; while (!ProofOfWork::verify(_bi)) { ret = pow.mine(_bi, 10000, true); From efdd3790a0405654933f456751230254cef95151 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 13 Apr 2015 18:12:05 +0200 Subject: [PATCH 45/45] Various fixes for mining. --- TestHelper.cpp | 31 +++++++++++++ TestHelper.h | 5 ++- blockchain.cpp | 111 +++++++++++++++++----------------------------- dagger.cpp | 12 ++--- stateOriginal.cpp | 11 +++-- 5 files changed, 85 insertions(+), 85 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index 45fe55b07..93c564e62 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -62,6 +62,37 @@ void connectClients(Client& c1, Client& c2) c2.connect("127.0.0.1", c1Port); #endif } + +void mine(State& s, BlockChain const& _bc) +{ + s.commitToMine(_bc); + GenericFarm f; + bool completed = false; + f.onSolutionFound([&](ProofOfWork::Solution sol) + { + return completed = s.completeMine(sol); + }); + f.setWork(s.info()); + f.startCPU(); + while (!completed) + this_thread::sleep_for(chrono::milliseconds(20)); +} + +void mine(BlockInfo& _bi) +{ + GenericFarm f; + bool completed = false; + f.onSolutionFound([&](ProofOfWork::Solution sol) + { + ProofOfWork::assignResult(sol, _bi); + return completed = true; + }); + f.setWork(_bi); + f.startCPU(); + while (!completed) + this_thread::sleep_for(chrono::milliseconds(20)); +} + } namespace test diff --git a/TestHelper.h b/TestHelper.h index 04ca95be4..92745bc36 100644 --- a/TestHelper.h +++ b/TestHelper.h @@ -36,9 +36,12 @@ namespace eth { class Client; +class State; void mine(Client& c, int numBlocks); void connectClients(Client& c1, Client& c2); +void mine(State& _s, BlockChain const& _bc); +void mine(BlockInfo& _bi); } @@ -225,7 +228,5 @@ public: }; }; - - } } diff --git a/blockchain.cpp b/blockchain.cpp index 8f5605898..4aa70c63a 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -191,11 +191,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin) { state.sync(bc); state.sync(bc, txs, gp); - state.commitToMine(bc); - MineInfo info; - ProofOfWork pow; - for (info.completed = false; !info.completed; info = state.mine(&pow)) {} - state.completeMine(); + mine(state, bc); } catch (Exception const& _e) { @@ -531,76 +527,55 @@ bytes createBlockRLPFromFields(mObject& _tObj) return rlpStream.out(); } -void overwriteBlockHeader(BlockInfo& _currentBlockHeader, mObject& _blObj) +void overwriteBlockHeader(BlockInfo& _header, mObject& _blObj) { - if (_blObj["blockHeader"].get_obj().size() != 14) + auto ho = _blObj["blockHeader"].get_obj(); + if (ho.size() != 14) { - - BlockInfo tmp = _currentBlockHeader; - - if (_blObj["blockHeader"].get_obj().count("parentHash")) - tmp.parentHash = h256(_blObj["blockHeader"].get_obj()["parentHash"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("uncleHash")) - tmp.sha3Uncles = h256(_blObj["blockHeader"].get_obj()["uncleHash"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("coinbase")) - tmp.coinbaseAddress = Address(_blObj["blockHeader"].get_obj()["coinbase"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("stateRoot")) - tmp.stateRoot = h256(_blObj["blockHeader"].get_obj()["stateRoot"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("transactionsTrie")) - tmp.transactionsRoot = h256(_blObj["blockHeader"].get_obj()["transactionsTrie"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("receiptTrie")) - tmp.receiptsRoot = h256(_blObj["blockHeader"].get_obj()["receiptTrie"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("bloom")) - tmp.logBloom = LogBloom(_blObj["blockHeader"].get_obj()["bloom"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("difficulty")) - tmp.difficulty = toInt(_blObj["blockHeader"].get_obj()["difficulty"]); - - if (_blObj["blockHeader"].get_obj().count("number")) - tmp.number = toInt(_blObj["blockHeader"].get_obj()["number"]); - - if (_blObj["blockHeader"].get_obj().count("gasLimit")) - tmp.gasLimit = toInt(_blObj["blockHeader"].get_obj()["gasLimit"]); - - if (_blObj["blockHeader"].get_obj().count("gasUsed")) - tmp.gasUsed = toInt(_blObj["blockHeader"].get_obj()["gasUsed"]); - - if (_blObj["blockHeader"].get_obj().count("timestamp")) - tmp.timestamp = toInt(_blObj["blockHeader"].get_obj()["timestamp"]); - - if (_blObj["blockHeader"].get_obj().count("extraData")) - tmp.extraData = importByteArray(_blObj["blockHeader"].get_obj()["extraData"].get_str()); - - if (_blObj["blockHeader"].get_obj().count("mixHash")) - tmp.mixHash = h256(_blObj["blockHeader"].get_obj()["mixHash"].get_str()); + BlockInfo tmp = _header; + if (ho.count("parentHash")) + tmp.parentHash = h256(ho["parentHash"].get_str()); + if (ho.count("uncleHash")) + tmp.sha3Uncles = h256(ho["uncleHash"].get_str()); + if (ho.count("coinbase")) + tmp.coinbaseAddress = Address(ho["coinbase"].get_str()); + if (ho.count("stateRoot")) + tmp.stateRoot = h256(ho["stateRoot"].get_str()); + if (ho.count("transactionsTrie")) + tmp.transactionsRoot = h256(ho["transactionsTrie"].get_str()); + if (ho.count("receiptTrie")) + tmp.receiptsRoot = h256(ho["receiptTrie"].get_str()); + if (ho.count("bloom")) + tmp.logBloom = LogBloom(ho["bloom"].get_str()); + if (ho.count("difficulty")) + tmp.difficulty = toInt(ho["difficulty"]); + if (ho.count("number")) + tmp.number = toInt(ho["number"]); + if (ho.count("gasLimit")) + tmp.gasLimit = toInt(ho["gasLimit"]); + if (ho.count("gasUsed")) + tmp.gasUsed = toInt(ho["gasUsed"]); + if (ho.count("timestamp")) + tmp.timestamp = toInt(ho["timestamp"]); + if (ho.count("extraData")) + tmp.extraData = importByteArray(ho["extraData"].get_str()); + if (ho.count("mixHash")) + tmp.mixHash = h256(ho["mixHash"].get_str()); + tmp.noteDirty(); // find new valid nonce - - if (tmp != _currentBlockHeader) + if (tmp != _header) { - _currentBlockHeader = tmp; - - ProofOfWork pow; - std::pair ret; - while (!ProofOfWork::verify(_currentBlockHeader)) - { - ret = pow.mine(_currentBlockHeader, 1000, true); - Ethash::assignResult(ret.second, _currentBlockHeader); - } + mine(tmp); + _header = tmp; } } else { // take the blockheader as is - const bytes c_blockRLP = createBlockRLPFromFields(_blObj["blockHeader"].get_obj()); + const bytes c_blockRLP = createBlockRLPFromFields(ho); const RLP c_bRLP(c_blockRLP); - _currentBlockHeader.populateFromHeader(c_bRLP, IgnoreNonce); + _header.populateFromHeader(c_bRLP, IgnoreNonce); } } @@ -631,13 +606,7 @@ BlockInfo constructBlock(mObject& _o) void updatePoW(BlockInfo& _bi) { - ProofOfWork pow; - std::pair ret; - while (!ProofOfWork::verify(_bi)) - { - ret = pow.mine(_bi, 10000, true); - Ethash::assignResult(ret.second, _bi); - } + mine(_bi); _bi.noteDirty(); } diff --git a/dagger.cpp b/dagger.cpp index 4abba5090..367c422ad 100644 --- a/dagger.cpp +++ b/dagger.cpp @@ -25,7 +25,7 @@ #include "JsonSpiritHeaders.h" #include #include -#include +#include #include #include "TestHelper.h" @@ -63,18 +63,18 @@ BOOST_AUTO_TEST_CASE(basic_test) unsigned cacheSize(o["cache_size"].get_int()); h256 cacheHash(o["cache_hash"].get_str()); - BOOST_REQUIRE_EQUAL(Ethasher::get()->params(header).cache_size, cacheSize); - BOOST_REQUIRE_EQUAL(sha3(bytesConstRef((byte const*)Ethasher::get()->light(header), cacheSize)), cacheHash); + BOOST_REQUIRE_EQUAL(EthashAux::get()->params(header).cache_size, cacheSize); + BOOST_REQUIRE_EQUAL(sha3(bytesConstRef((byte const*)EthashAux::get()->light(header), cacheSize)), cacheHash); #if TEST_FULL unsigned fullSize(o["full_size"].get_int()); h256 fullHash(o["full_hash"].get_str()); - BOOST_REQUIRE_EQUAL(Ethasher::get()->full(header).size(), fullSize); - BOOST_REQUIRE_EQUAL(sha3(Ethasher::get()->full(header)), fullHash); + BOOST_REQUIRE_EQUAL(EthashAux::get()->full(header).size(), fullSize); + BOOST_REQUIRE_EQUAL(sha3(EthashAux::get()->full(header)), fullHash); #endif h256 result(o["result"].get_str()); - Ethasher::Result r = Ethasher::eval(header); + Ethash::Result r = EthashAux::eval(header); BOOST_REQUIRE_EQUAL(r.value, result); BOOST_REQUIRE_EQUAL(r.mixHash, header.mixHash); } diff --git a/stateOriginal.cpp b/stateOriginal.cpp index 40f759434..e1a3c7c4a 100644 --- a/stateOriginal.cpp +++ b/stateOriginal.cpp @@ -25,7 +25,9 @@ #include #include #include +#include #include +#include "TestHelper.h" using namespace std; using namespace dev; using namespace dev::eth; @@ -67,10 +69,8 @@ BOOST_AUTO_TEST_CASE(Complex) cout << s; // Mine to get some ether! - s.commitToMine(bc); - ProofOfWork pow; - while (!s.mine(&pow).completed) {} - s.completeMine(); + mine(s, bc); + bc.attemptImport(s.blockData(), stateDB); cout << bc; @@ -89,8 +89,7 @@ BOOST_AUTO_TEST_CASE(Complex) // Mine to get some ether and set in stone. s.commitToMine(bc); s.commitToMine(bc); - while (!s.mine(&pow).completed) {} - s.completeMine(); + mine(s, bc); bc.attemptImport(s.blockData(), stateDB); cout << bc;