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

Why is library masking all gas estimation errors as TransactionFailed? #168

Open
uhbif19 opened this issue Sep 27, 2019 · 5 comments
Open

Comments

@uhbif19
Copy link

uhbif19 commented Sep 27, 2019

Version: 0.1.0b39

eth_tester is masking all errors on gas estimation as TransactionFailed. This does lose information about problem type (revert or opcode problem) and revert message. That is not very convenient for debugging, because developer does not get any information about contract error.

Here is related code:

https://github.com/ethereum/eth-tester/blob/master/eth_tester/backends/pyevm/main.py#L463

What is the reason for such behavior?

@pipermerriam
Copy link
Member

It should still be re-raising those exceptions, just with a common exception type. Is that not he behavior you're seeing?

@uhbif19
Copy link
Author

uhbif19 commented Oct 4, 2019

I see only reraised TransactionFailed exception, without its reason and revert message. If there is a field, there is an original exception stored, I have not found it.

@pipermerriam
Copy link
Member

👍 we should fix this to ensure that this information is properly preserved. Thanks for reporting this.

@pipermerriam
Copy link
Member

The fix for this is going to involve removal of the replace_exceptions decorator in favor of explicit exception handling to ensure the exception data is preserved.

@uhbif19
Copy link
Author

uhbif19 commented Oct 7, 2019

I could make some PR, if you provide description how this suppose to work and where related tests are located.

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

No branches or pull requests

2 participants