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

Calls made to the Execution Manager do not return data #474

Closed
snario opened this issue Apr 15, 2021 · 12 comments
Closed

Calls made to the Execution Manager do not return data #474

snario opened this issue Apr 15, 2021 · 12 comments
Assignees
Labels
C-bug Category: bugs

Comments

@snario
Copy link
Contributor

snario commented Apr 15, 2021

Presently it is impossible to get any return data data from transactions or calls made that go through the ExecutionManager such as revert reasons or other kinds of data geth may want to use. We've made a pull request in the past to address this but decided it was not the right way to go since a change was queued up (and is now implemented) to the Solidity compiler that modifies how the execution manager is interacted with. This issue is to document the work to be done to revive that PR based on the new work in the Solidity compiler.

@platocrat
Copy link
Contributor

To add to this issue, not getting any return data from calls affects our integration tests, e.g. our tutorials and code examples for our users.

I think the desired behavior, if a transaction fails, is that L2 geth should get the revert reason returned from the contract instead of throwing an estimate gas error.

@snario
Copy link
Contributor Author

snario commented Apr 19, 2021

Another previous issue: ethereum-optimism/go-ethereum#288

@platocrat
Copy link
Contributor

A hacker, @popcorndao, also experienced this issue.

He also noticed that after setting gasPrice to 0 in his tests and config, he had to the gasLimit to 8900000 in his tests, otherwise, they would fail.

@snario
Copy link
Contributor Author

snario commented Apr 20, 2021

@platocrat / @popcorndao it would be helpful to demonstrate a reproduction scenario or logs for what you're describing above. By "this issue", I'm assuming you mean that gas estimation is failing?

@platocrat
Copy link
Contributor

To be clear, there are 2 separate issues with integration testing that are related to this GitHub issue:

1

As I understand it, eth_estimateGas is not failing.
After talking about this issue with @K-Ho, the following error:

Error: cannot estimate gas; transaction may fail or may require a manual gas limit

is thrown whenever an L2 contract call reverts. Transactions will successfully revert, but we don't get the revert reason that we should be getting. Instead, we get the error shown above.
This issue is confirmed by observations of the tests for the Waffle-ERC20-Example repository

2

From having run variations of tests for the Truffle-ERC20-Example, there is a different error that is thrown when attempting to deploy a contract. The error thrown when deploying a contract with Truffle is something like:

Error: while migrating ERC20: invalid transaction: insufficient funds for gas * price + value

This error is thrown even after setting gasPrice to 0 in the network config and in the deployment and contract calls.


All that being said, it seems to me that these two separate errors are related

@snario
Copy link
Contributor Author

snario commented Apr 20, 2021

Thanks for the summary @platocrat. It seems like (1) exactly describes this issue, and a new issue with reproduction steps should be opened for (2), do you agree?

@platocrat
Copy link
Contributor

Thanks for the summary @platocrat. It seems like (1) exactly describes this issue, and a new issue with reproduction steps should be opened for (2), do you agree?

I agree. I'll open a new issue for the Truffle tests

@platocrat
Copy link
Contributor

@snario any updates on this?

@transmissions11
Copy link
Contributor

This is a pretty major devex pain right now 😅

@snario
Copy link
Contributor Author

snario commented Apr 28, 2021

Fixed by #643

@snario
Copy link
Contributor Author

snario commented Apr 28, 2021

This will be available in the 0.3.0 release schedule for mainnext next week.

@transmissions11
Copy link
Contributor

WOOHOO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bugs
Projects
None yet
Development

No branches or pull requests

6 participants