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
blockchain: clearly distinguish vm error from other errors #1763
Conversation
75bf7f6
to
df0f62f
Compare
I left a few minor reviews and this PR looks more clear than before. Thank you for hard work. I think we can remove the duplicated code( |
df0f62f
to
716527e
Compare
You have successfully added a new CodeQL configuration |
@kjeom I'm sorry for the late. Thank you for your patience. I agree with you about the refactoring of |
Proposed changes
klaytn code distinguishes the vm error and other errors, but the code was not clear enough. By bringing the ethereum PR, it clearly distinguish vm error from other errors.
vm error is an internal evm errror and we record this kind of error at the transaction receipt. If not, we don't record it, instead the error is returned immediately(call) or causes a bad block error(sendTransaction).
This PR is a refactoring, so the output of the rpc does not changes compared to the dev branch except revert reason.
TransitionDb()
andApplyMessage()
~ result.Return(), result.Revert()
~ result.Unwrap(), result.Failed()
In turn, some internal functions' return values are reorganized as well.
returnData, gas, status, err
ExecutionResult, err
returnData, gas, compCost, status, error
ExecutionResult, compCost, err
Types of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
$ make test
)Related issues
Further comments