Skip to content
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

Fixes: REVERT counts code storage gas cost while shouldn't #1270

Merged
merged 1 commit into from
Apr 1, 2019

Conversation

zilm13
Copy link
Collaborator

@zilm13 zilm13 commented Mar 30, 2019

Fixes recent conflict on Ropsten.
Reference: EIP-140 (REVERT)

The cost of the REVERT instruction equals to that of the RETURN instruction, i.e. the rollback itself does not consume all gas, the contract only has to pay for memory.

In case there is not enough gas left to cover the cost of REVERT or there is a stack underflow, the effect of the REVERT instruction will equal to that of a regular out of gas exception, i.e. it will consume all gas.

@zilm13 zilm13 requested a review from mkalinin March 30, 2019 18:27
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 57.163% when pulling 9c656b7 on fix/ropsten-revert into 0464c1d on develop.

@mkalinin mkalinin merged commit e54131f into develop Apr 1, 2019
@zilm13 zilm13 deleted the fix/ropsten-revert branch April 1, 2019 11:43
derekzuk pushed a commit to derekzuk/ethereumj that referenced this pull request Apr 3, 2019
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.

3 participants