Workers Auto Approve
Separate API Tests for the VM
**Introduction / Situation**
In 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.
This 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).
This 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*).
This 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.
Like 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.
On 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.
A suite of initially maybe 15-20 additional tests - e.g. in ``tests/api/`` should be developed which tests:
- At least 2-3 additional instantiation paths of the ``VM`` in [index.js](https://coveralls.io/builds/17945610/source?filename=lib/index.js)
- Larger parts of [runBlockchain.js](https://coveralls.io/builds/17945610/source?filename=lib/runBlockchain.js)
- Larger parts of [runBlock.js](https://coveralls.io/builds/17945610/source?filename=lib/runBlock.js)
- 1-2 new instantiation paths in [runTx.js](https://coveralls.io/builds/17945610/source?filename=lib/runTx.js)
- 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)
- ``StateManager`` is under refactoring so not too much emphasis on this, maybe 1-2 tests to start would be nevertheless good
Generally 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.
For 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.
Generally 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.
Setup your profile
Tell us a little about you:
No results found for
Type to search skills..
Required [[totalcharacter]] / 240
Are you currently looking for work?
[[ option.string ]]
Setup your profile
Our tools are based on the principles of earn (💰), learn (📖), and meet (💬).
Select the ones you are interested in. You can change it later in your settings.
I'm also an organization manager looking for a great community.
Enable your organization profile
Gitcoin products can help grow community around your brand. Create your tribe, events, and incentivize your community with bounties. Announce new and upcoming events using townsquare. Find top-quality hackers and fund them to work with you on a grant.
These are the organizations you own. If you don't see your organization here please be sure that information is public on your GitHub profile. Gitcoin will sync this information for you.
Select the products you are interested in:
Out of the box you will receive Tribes Lite for your organization. Please provide us with a contact email: