-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[isoltest] Add a way to query gas usage #10474
Comments
If it's easier, then checking constructor costs could also only be allowed if there's an explicit |
approval |
What about gas usage in different runs (with IR and with old codegen)? |
I think one needs to duplicate files and explicitly disable specific options, e.g. At the start we do not want to run gas tests for every single semantic tests, but rather have a bunch of larger examples which we use. |
It might be better to have multiple fields for the different runs, so they can also be compared. It could be multiple lines. |
I would prefer it to be in a single file, as we don't need to change enfoce-via-yul feature. We can write two lines in expectations, one for gas usage for old codegen, and one via IR. |
I'd argue if we do that, then we should also consider doing the same for the other flags... One option could be grouping expectations for different flags, e.g.:
|
@axic One example is But than, this should be done in two steps:
|
|
I would start working on this, I can report gas usage as @chriseth suggested, and we can change it later |
In my opinion that is a bad direction and #10474 (comment) is a better one to take. |
I was about to argue against #10474 (comment) by saying that there are options that don't affect gas costs... but in fact the only option for semantic tests that's generally independent of gas costs is So given that, the main drawback of #10474 (comment) is the need to repeat the calls, which is not so nice for complex signatures... In any case: the fact that the selected evm version affects the gas cost will come up using #10474 (comment) as is only... |
My proposal is not only useful for this particular use case, but for numerous other settings we have: IR/wasm/evmVersion/abiversion/etc. Currently we are duplicating files for these. |
Your proposal has been a plan for a while... there's an issue for it I'm sure... |
Maybe not, strange, I was sure... the idea at some point was to also add syntax warnings to semantic tests as one such expectation block... |
I would still prefer adding a filter to the gas cost statement instead of repeating all calls. |
As discussed on today's call, a potential way is to have a line similar to
storage:
calledgasUsed: <value>
. This line would refer to the gas usage of the preceding call (including the explicit constructor call).If there is not preceding call, that is a misformatted expectation. If it is the very first line, would that however count as the constructor cost?
The text was updated successfully, but these errors were encountered: