Skip to content

fix(cli): estimate gas limit during EVM execute and floor at message's execGasLimit - #1153

Merged
friedemannf merged 1 commit into
mainfrom
cli-evm-execute-gas-limit
Oct 23, 2026
Merged

friedemannf merged 1 commit into
mainfrom
cli-evm-execute-gas-limit

Conversation

@friedemannf

Copy link
Copy Markdown
Member

EVM transaction simulation during EVM execute does not behave as expected:

It defaults to the lowest possible gas limit that leads to the tx not reverting. The way the EVM contracts are designed, if a message is in state UNTOUCHED, a too-low gas limit will cause it to be put into FAILURE state with the transaction not reverting, which causes the transaction simulation to pick a too-low gas limit.

This means execution currently has to always be run twice, with the transaction moving UNTOUCHED -> FAILURE -> SUCCESS.
Updating the CLI to properly estimate the gas limit + floor it at the message's executionGasLimit, which should cause it to succeed on first try.

@friedemannf
friedemannf marked this pull request as ready for review October 23, 2026 15:16
@friedemannf
friedemannf requested a review from a team as a code owner October 23, 2026 15:16
@friedemannf
friedemannf merged commit c4b8524 into main Oct 23, 2026
45 of 46 checks passed
@friedemannf
friedemannf deleted the cli-evm-execute-gas-limit branch October 23, 2026 15:16
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.

2 participants