Skip to content

Conversation

@VictorTrustyDev
Copy link

@VictorTrustyDev VictorTrustyDev commented Jan 2, 2024

Refer to EIP-140

The opcode REVERT provides a way to stop execution and revert state changes, without consuming all provided gas.
That means, all the other failure will consume all gas.

By this PR, in ApplyTransaction implementation, by calling to ApplyMessageWithConfig, if not error return by Evm, will consider as not-caused-by-REVERT-opcode therefor consume all gas of tx.

@VictorTrustyDev VictorTrustyDev added the enhancement Enhancement / bug-fixes or re-work on old feature label Jan 2, 2024
@VictorTrustyDev VictorTrustyDev self-assigned this Jan 2, 2024
VictorTrustyDev added a commit that referenced this pull request Jan 2, 2024
…ssage-failure-backport-39

imp(evm): consume all gas upon `ApplyTransaction` failure without VM error (backport #39)
@VictorTrustyDev VictorTrustyDev merged commit 73e2ae8 into main Jan 2, 2024
@VictorTrustyDev VictorTrustyDev deleted the imp/consume-all-gas-upon-apply-message-failure branch January 2, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement / bug-fixes or re-work on old feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants