Skip to content

core: make gas estimate more accurate #599

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

Open
wants to merge 1 commit into
base: optimism
Choose a base branch
from

Conversation

zhiqiangxu
Copy link
Contributor

@zhiqiangxu zhiqiangxu commented May 6, 2025

In DoEstimateGas, both skipNonceCheck and skipEoACheck are set to true (source), so the gas cost doesn't include l1 cost and operator fee.

This PR makes it behave more accurately (e.g., it should return an error if user balance can't afford L2 fee + L1 fee + operator fee).

Besides, when !st.msg.SkipNonceChecks && !st.msg.SkipFromEOACheck is false, operatorFee is still being distributed here, which is not symmetrical.

Also semantically, skipNonceCheck/skipEoACheck should have nothing to do with skipping calculation of l1 cost and operator fee.

@zhiqiangxu zhiqiangxu requested a review from a team as a code owner May 6, 2025 16:51
@zhiqiangxu zhiqiangxu requested a review from teddyknox May 6, 2025 16:51
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.

1 participant