-
Notifications
You must be signed in to change notification settings - Fork 20.2k
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
eth_estimateGas uses global gas cap as the high watermwark #29695
Comments
can we get the block gas cap in the (just bring the below code back and pass the block gas cap to so that we can make the higher boundary capped at the block gas cap rather than the call gas cap. |
Here's the MR to demonstrate my idea: #29732 |
I think we can just recap gas.args with header gasLimit when gas.args is greater than block gasLimit. Here's the suggested PR: #29738 I think it could be a simple change which meets the purpose of this issue. |
Tracker for #29509.
Gas estimation should cap itself to the block gas limit if none is given, currently it caps itself to the configured call gas cap. This is bad because it wastes estimation cycles.
Interestingly, the gas estimator itself works correctly, but is called bad (the gas is set before estimation to the global gas cap, so the poor estimator works with what it's given). The cause is a long stream of refactors and abstractions which gradually bubbles setting the gas value of a transaction in ToMessage, which sounds counterintuitive.
Fixing it is not super obvious, because changing ToMessage to not set the gas might have other implications. We should look through the call sites and see how to best fix without adding workarounds.
The text was updated successfully, but these errors were encountered: