-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle balance overflow as evm exception #720
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! That's approved.
codecov is erroring on a negative diff change but I don't see one. Not sure what's happening there.
|
Codecov uses a quite confusing notation for coverage. There are two metrics: The codecov/patch check refers only to the changes we made, and that's fully covered: The codecov/project check compares to the parent commit, which is usually I assume that was just a rounding error, the change looks 👌 and there are tests for it. |
@evertonfraga if possible we should also add some pragmatic thresholds here for CodeCov (this was at least possible for Coveralls), so to allow for minor decreases (like 0.5% or so, eventually a bit less) together with some absolute threshold not be allowed to fall below. These little decreases occur all the time (e.g. on 1-2 liner PRs without tests, rewriting little things/splitting stuff up for clarity,...). This gets annoying without some basic flexibility. |
Yes! I have just described tweaking config in this issue: #723 |
Revival of #676
Includes review fixes by @evertonfraga
Addresses #672.
Have made a minimal reproduction of #672 at cgewecke/checkpoint-repro. It runs two transactions vs. ganache-core:
Value overflow
Cannot get state root with uncommitted checkpoints
, indicating that the previous tx has left the vm in an unresolved state.This happens because the balance overflow error is thrown directly from
evm._executeCall
andevm._executeCreate
without being handled via the revert/commit steps in the method which calls them (evm.executeMessage)PR
Value overflow
exceptions as part of the vm result (instead of throwing), similar to the way contract creation address collisions are handledValue overflow
a VMErrorNB: Looks like invalid precompiles also trigger an uncontrolled throw (here). Haven't addressed that but if this PR is the correct approach, perhaps that could be resolved here as well.