Etcm 22 structured definitions for net gas metering#650
Merged
mmrozek merged 2 commits intophase/etc_forksfrom Aug 28, 2020
Merged
Etcm 22 structured definitions for net gas metering#650mmrozek merged 2 commits intophase/etc_forksfrom
mmrozek merged 2 commits intophase/etc_forksfrom
Conversation
6e3b2d3 to
8029fef
Compare
| ("60016000556002600055", 1, 5812, 0), | ||
| ("60016000556001600055", 1, 1612, 0), | ||
| ("600160005560006000556001600055", 0, 40818, 19200), | ||
| ("600060005560016000556000600055", 1, 10818, 19200) |
Contributor
There was a problem hiding this comment.
I found out that geth has two additional test cases : https://github.com/ethereum/go-ethereum/blob/b9df7ecdc3d3685180ceb29665bab59e9f614da5/core/vm/gas_table_test.go#L76.
{1, 2306, "0x6001600055", 2306, 0, ErrOutOfGas}, // 1 -> 1 (2300 sentry + 2xPUSH)
{1, 2307, "0x6001600055", 806, 0, nil}, // 1 -> 1 (2301 sentry + 2xPUSH)
Most probably testing some edge cases. Imo we should try to add them, as all this gass couting makes me nervous,
| val eip1283Enabled = isEip1283Enabled(ethFork) | ||
|
|
||
| if(eip2200Enabled && state.gas <= state.config.feeSchedule.G_callstipend){ | ||
| state.withError(OutOfGas) |
Contributor
There was a problem hiding this comment.
Usually OutOfGas errors zeros caller remaining gas like state.copy(gas = 0).withError(OutOfGas). Do you think we should try to do the same here ? (maybe it worth checking parity of geth)
Contributor
Author
There was a problem hiding this comment.
The tests from previous comment check that
8029fef to
648855d
Compare
KonradStaniec
approved these changes
Aug 28, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://eips.ethereum.org/EIPS/eip-2200