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

Stop masking Revert error as TransactionFailed #180

Closed
wants to merge 1 commit into from

Conversation

kclowes
Copy link
Contributor

@kclowes kclowes commented Feb 24, 2020

What was wrong?

Original issue is here.

I'm not sure what the original rationale was, but the Revert error was getting turned into a TransactionFailed error. I want to test that Revert is raised in web3.py in this PR.

This is my first PR in eth-tester, so I'm not sure if there is something else that I need to do in py-evm, or what sorts of unintended consequences there will be in other libraries as this is a breaking change.

How was it fixed?

Removed TransactionFailed from the decorator that replaces exceptions.

Cute Animal Picture

image

@kclowes kclowes changed the title Stop masking Revert error as TransactionFailed [WIP] Stop masking Revert error as TransactionFailed Feb 24, 2020
@kclowes kclowes changed the title [WIP] Stop masking Revert error as TransactionFailed Stop masking Revert error as TransactionFailed Feb 25, 2020
@kclowes
Copy link
Contributor Author

kclowes commented Feb 26, 2020

On second thought, this is not the change I need. Will open another one!

@carver
Copy link
Contributor

carver commented Feb 26, 2020

I'm not sure what the original rationale was, but the Revert error was getting turned into a TransactionFailed error. I want to test that Revert is raised in web3.py in this PR.

FWIW, the rationale was to raise an exception that is not back-end dependent. eth-tester was trying to hide the pyethereum vs py-evm backends, so that the user can be agnostic. As py-evm has become more robust, this is maybe less important, and we can just make eth-tester like a convenience toolset with py-evm as the only explicit backend. Then we could pass through things like the underlying py-evm exceptions.

That's a chunk of work that's not done, and probably requires some discussion first.

@kclowes
Copy link
Contributor Author

kclowes commented Feb 27, 2020

Aha, I see. Thanks for the clarification! Is pyethereum still in use? It looks from the readme like it's not...

@carver
Copy link
Contributor

carver commented Feb 27, 2020

Nope. Really the only reason to keep the backend concept around is if we think it's important to support future backends (a world where py-evm becomes deprecated? or... some kind of c binding into a different evm engine?). I think the chances are small enough that I'm okay abandoning the backend idea. Though it would be nice to chat with Piper before actually digging into implementing that change.

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

Successfully merging this pull request may close these issues.

2 participants