-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Revert reasons not detected with via-ir enabled #3750
Comments
Good point. I suspect it might be working with minimal optimizer and if it does, it should not be an issue for regular users. Our situation is a bit special, because being able to run tests with optimizer enabled in our CI is still useful. Especially for benchmarking the optimizer. And vast majority of tests do pass with optimization, we just have to manually disable the select ones that fail. We'll need to think what to do about it on our side going forward. I expected that they'll just work then you add support for via IR, but I should have realized that that's going to be the case only for unoptimized code :) By the way, what is Hardhat's behavior going to be when a user does try to run tests with optimizer anyway? Will you leave it as is and just recommend not to do it? Or will you block it? Or maybe something in between, e.g. detect and skip misbehaving tests or ignore the optimizer flag and run unoptimized? |
Probably that, yes. We wouldn't block it because several other things continue to work, and people might prefer running their tests that way (and losing some Hardhat features). |
Thanks @fvictorio, adding only the UnusedPruner step to However, there are still some other cases in our external tests that use hardhat and still failing with the same error even when using only the suggested optimizer step. So maybe we can keep this issue open until we fix it all? I couldn't find a minimal reproducible example yet, I will update this issue if I find some. But you can check some of the failed cases here: https://app.circleci.com/pipelines/github/r0qs/solidity/319/workflows/9c536705-b7d6-4e5f-958a-831d97a27288 For instance, this specific test from openzeppelin: https://app.circleci.com/pipelines/github/r0qs/solidity/319/workflows/9c536705-b7d6-4e5f-958a-831d97a27288/jobs/9088?invite=true#step-104-5087
You can see the compiler settings used to run the tests here: https://app.circleci.com/pipelines/github/r0qs/solidity/319/workflows/9c536705-b7d6-4e5f-958a-831d97a27288/jobs/9088?invite=true#step-104-30
|
Hey folks. First, sorry for taking so long to re-visit this, and thanks for the great reproduction info. I feel like this is no longer happening, although I'm not 100% sure. This is what I tried:
Hopefully I'm not missing anything here. If you have some other example of your CI failing because of Hardhat's viaIR support, please let me know. (I'm going to tentatively close this issue for bookkeeping reasons, but I'll re-open it, or open a new one, if there is another example of this problem.) |
Version of Hardhat
2.13.0
What happened?
Although a basic support to viaIR was added in #3365, and #2453 was closed in favor of it, the problem mentioned by this comment: #2453 (comment) still not fixed. So I'm opening this issue here so we can keep track of the problem.
It now throws the following error:
Transaction reverted and Hardhat couldn't infer the reason
as shown below:Minimal reproduction steps
Run the script below adapted from #2453 (comment), changing the solidity compiler version to
0.8.19
and0.8.12
to see the errors. Using the current latest solc version (0.8.19) all tests will fail as in the example above. Using the version0.8.12
only the two tests that hascurrent()
defined will pass as mentioned in the comment on the issue #2453.Search terms
No response
The text was updated successfully, but these errors were encountered: