Bounty: An automated reproduction for issue #417

trufflesuite

ganache-cli, trufflesuite, JavaScript

In issue #417 we see at least two distinct types of crashes: `TypeError: Cannot read property 'pop' of undefined` and `TypeError: Cannot read property 'get' of undefined` (see issue for full traces). We believe that this issue is the most common cause of crashes Ganache and `ganache-cli`. We believe that these crashes share an underlying root cause, and while we have some idea of where this is happening, we don't yet have a reliable reproduction which demonstrates how `ganache-core` is causing this problem to occur. Bounty acceptance criteria: 1. Submission must be in the form of a pull request containing one or more automated tests 2. Tests must fail reliably with deterministic results 3. Tests must exercise `ganache-core` to demonstrate the specific process by which `ganache-core` triggers these bugs in the [`merkle-patricia-tree`](https://github.com/ethereumjs/merkle-patricia-tree) module, or whichever module is ultimately responsible for the behavior observed. 4. Test must demonstrate the root cause of both crashes described in the description of issue #417 and mentioned above. 5. Submissions may make reasonable modifications to ganache-core to improve its testability for the purpose of this task, provided that they are logically equivalent to the unmodified code and that they do not impact normal runtime performance Note that while the intention is for us to merge the submitter's PR so that the tests therein can guard against the future regression of this issue, in certain cases we may elect not to do so. If this happens, provided the above criteria are still met, the bounty will still be awarded. Bounty details, including award amount, will be available via [GitCoin](https://gitcoin.co/funding/details?url=https://github.com/trufflesuite/ganache-cli/issues/450) once the issue is funded. **Notes/Notices**: There is some discussion on this bounty on [this /r/ethdev post](https://www.reddit.com/r/ethdev/comments/7l5ug9/the_truffle_team_is_offering_up_a_05_eth_bounty/) From what I can tell, this bug is not specific to a particular version of node. If you think you've found a reproduction in one version of node, but it doesn't reproduce in another, you probably aren't triggering the right bug. However if that happens, please tell us about it!