Skip to content
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

Change error message in frontier to mimic ethereum #218

Open
joelamouche opened this issue Nov 24, 2020 · 4 comments
Open

Change error message in frontier to mimic ethereum #218

joelamouche opened this issue Nov 24, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@joelamouche
Copy link

Motivation

I was testing contract calls and the error messages were slightly different than expected:
Frontier reverts say: 'evm revert: Reverted' when a regular ethereum blockchain would say 'VM Exception while processing transaction: revert'
Screenshot 2020-11-24 at 11 07 44

Changing the Error message would allow devs to reuse ethereum tests for frontier based tests.

Suggested Solution

Just a slight change in error message

Alternatives

It's not a big deal but it would allow devs to reuse tests from ethereum to Frontier

@joelamouche joelamouche added the enhancement New feature or request label Nov 24, 2020
@tgmichel
Copy link
Contributor

tgmichel commented Nov 29, 2020

I think this is a good idea, however, there are several variants for the revert message from what I read. I.e. including decoded revert reason from solidity explicit revert calls.

  • VM Exception while processing transaction: revert
  • VM Exception while processing transaction: revert {decoded revert reason}
  • execution reverted: {decoded revert reason} (For Infura MainNet, Roptsen.. here)
  • VM execution error. (For Infura Kovan here). This call also includes Revert {encoded revert reason} in the data field.

So I'd say we want this to be configurable (actually for all ExitReason messages), including optional pre-decoded revert reasons that can also be part of ad-hoc tests in case the Dapp makes heavy use of explicit reverts in their code.

@joelamouche
Copy link
Author

I think the default should be VM Exception while processing transaction: revert {decoded revert reason}

@joelamouche
Copy link
Author

I still get the old error code when I run the tests in https://github.com/PureStake/moonbeam/pull/124/files @tgmichel

@joelamouche
Copy link
Author

oh wait but this is frontier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants