{"action":"created","issue":{"url":"https://api.github.com/repos/ethereumjs/ethereumjs-vm/issues/310","repository_url":"https://api.github.com/repos/ethereumjs/ethereumjs-vm","labels_url":"https://api.github.com/repos/ethereumjs/ethereumjs-vm/issues/310/labels{/name}","comments_url":"https://api.github.com/repos/ethereumjs/ethereumjs-vm/issues/310/comments","events_url":"https://api.github.com/repos/ethereumjs/ethereumjs-vm/issues/310/events","html_url":"https://github.com/ethereumjs/ethereumjs-vm/issues/310","id":340934502,"node_id":"MDU6SXNzdWUzNDA5MzQ1MDI=","number":310,"title":"Separate API Tests for the VM","user":{"login":"holgerd77","id":931137,"node_id":"MDQ6VXNlcjkzMTEzNw==","avatar_url":"https://avatars0.githubusercontent.com/u/931137?v=4","gravatar_id":"","url":"https://api.github.com/users/holgerd77","html_url":"https://github.com/holgerd77","followers_url":"https://api.github.com/users/holgerd77/followers","following_url":"https://api.github.com/users/holgerd77/following{/other_user}","gists_url":"https://api.github.com/users/holgerd77/gists{/gist_id}","starred_url":"https://api.github.com/users/holgerd77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holgerd77/subscriptions","organizations_url":"https://api.github.com/users/holgerd77/orgs","repos_url":"https://api.github.com/users/holgerd77/repos","events_url":"https://api.github.com/users/holgerd77/events{/privacy}","received_events_url":"https://api.github.com/users/holgerd77/received_events","type":"User","site_admin":false},"labels":[{"id":234790104,"node_id":"MDU6TGFiZWwyMzQ3OTAxMDQ=","url":"https://api.github.com/repos/ethereumjs/ethereumjs-vm/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":234790105,"node_id":"MDU6TGFiZWwyMzQ3OTAxMDU=","url":"https://api.github.com/repos/ethereumjs/ethereumjs-vm/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-07-13T08:49:53Z","updated_at":"2018-08-04T23:35:11Z","closed_at":null,"author_association":"MEMBER","body":"**Introduction / Situation**\r\n\r\nIn the current [tests](https://github.com/ethereumjs/ethereumjs-vm/tree/master/tests) setup only the official Ethereum state and blockchain [tests](https://github.com/ethereum/tests) are run to test the VM functionality.\r\n\r\nThis gives a good impression of the current state of compatibility towards the latest HF changes but leaves the outer API of the library more-or-less untested, see the red files in one of the latest [coverage reports](https://coveralls.io/github/ethereumjs/ethereumjs-vm).\r\n\r\nThis is simply not sufficient, since this currently means that various possible invocations of the API (instantiation with or without ``blockchain``,...) as well as larger parts of the non-VM-executing code parts remain completely untested, see e.g. the poor coverage for the ``runBlock.js`` file (< 20%, *sigh*).\r\n\r\n**Task Description**\r\n\r\nThis can be tackled by adding a second test suite and setup, resembling more traditional tests like e.g. in the [block](https://github.com/ethereumjs/ethereumjs-block/blob/master/tests/block.js) library (super-random example, don't go along too closely) and testing the different instantiation and execution paths for the VM.\r\n\r\nLike always with tests even a very basic test setup with just a handful of tests would already make a huge difference and prevent issues like https://github.com/ethereumjs/ethereumjs-vm/issues/303 where functionality completely broke and no one noticed.\r\n\r\nOn a side note: Beside improve test coverage and library quality this will also have the benefit of giving a comprise and up-to-date overview on library usage and instantiation, since our [examples](https://github.com/ethereumjs/ethereumjs-vm/tree/master/examples) have a tendency to always be out-of-date.\r\n\r\n**Goals**\r\n\r\nA suite of initially maybe 15-20 additional tests - e.g. in ``tests/api/`` should be developed which tests:\r\n\r\n- At least 2-3 additional instantiation paths of the ``VM`` in [index.js](https://coveralls.io/builds/17945610/source?filename=lib/index.js)\r\n- Larger parts of [runBlockchain.js](https://coveralls.io/builds/17945610/source?filename=lib/runBlockchain.js)\r\n- Larger parts of [runBlock.js](https://coveralls.io/builds/17945610/source?filename=lib/runBlock.js)\r\n- 1-2 new instantiation paths in [runTx.js](https://coveralls.io/builds/17945610/source?filename=lib/runTx.js)\r\n- Additional parts of [bloom.js](https://coveralls.io/builds/17945610/source?filename=lib/bloom.js), [fakeBlockChain.js](https://coveralls.io/builds/17945610/source?filename=lib/fakeBlockChain.js), [runJit.js](https://coveralls.io/builds/17945610/source?filename=lib/runJit.js) (scope to be determined)\r\n- ``StateManager`` is under refactoring so not too much emphasis on this, maybe 1-2 tests to start would be nevertheless good\r\n\r\nGenerally the setup of a high-quality test structure with non-code repetition, utility functions and eventually good structured test data has precedence over the amount and extent of tests or coverage.\r\n\r\n**Skills**\r\n\r\nFor taking on this issue a solid understanding of the internal working of the Ethereum VM and some broader picture of the execution process within a blockchain environment is needed.\r\n\r\nGenerally this should be a really rewarding task since this will frankly lead to a deeper understanding of the various parts of the VM on tackling."},"comment":{"url":"https://api.github.com/repos/ethereumjs/ethereumjs-vm/issues/comments/410484564","html_url":"https://github.com/ethereumjs/ethereumjs-vm/issues/310#issuecomment-410484564","issue_url":"https://api.github.com/repos/ethereumjs/ethereumjs-vm/issues/310","id":410484564,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDQ4NDU2NA==","user":{"login":"Thoughtscript","id":10905039,"node_id":"MDQ6VXNlcjEwOTA1MDM5","avatar_url":"https://avatars2.githubusercontent.com/u/10905039?v=4","gravatar_id":"","url":"https://api.github.com/users/Thoughtscript","html_url":"https://github.com/Thoughtscript","followers_url":"https://api.github.com/users/Thoughtscript/followers","following_url":"https://api.github.com/users/Thoughtscript/following{/other_user}","gists_url":"https://api.github.com/users/Thoughtscript/gists{/gist_id}","starred_url":"https://api.github.com/users/Thoughtscript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thoughtscript/subscriptions","organizations_url":"https://api.github.com/users/Thoughtscript/orgs","repos_url":"https://api.github.com/users/Thoughtscript/repos","events_url":"https://api.github.com/users/Thoughtscript/events{/privacy}","received_events_url":"https://api.github.com/users/Thoughtscript/received_events","type":"User","site_admin":false},"created_at":"2018-08-04T23:35:11Z","updated_at":"2018-08-04T23:35:11Z","author_association":"NONE","body":"Hi! Just checking to see if there's any work on this that still needs doing! Thanks!"}}
{"actor":{"display_login":"Thoughtscript"}}