core/vm: use dedicated SLOAD gas constant for EIP-2200#20646
Merged
Conversation
Contributor
Author
|
Not sure why there are a few tests failing on the AMD tests, any insights would be great! |
Member
|
@GregTheGreek If we're going to merge this, I really prefer the diff @meowsbits submitted to ETC. It's cleaner and more elegantly separates things. Wanna change the PR to that? |
Contributor
Author
|
@karalabe makes a lot of sense to me, I've updated it |
karalabe
reviewed
Feb 12, 2020
| SloadGasFrontier uint64 = 50 | ||
| SloadGasEIP150 uint64 = 200 | ||
| SloadGasEIP1884 uint64 = 800 // Cost of SLOAD after EIP 1884 (part of Istanbul) | ||
| SloadGasEIP2200 uint64 = 800 // Cost of SLOAD after EIP 2200 (part of Istanbul) |
Member
There was a problem hiding this comment.
Pls fix formatting, otherwise linter will whine :D
Contributor
Author
There was a problem hiding this comment.
Sorry on it! Spent the weekend without a computer... Crazy I know.
|
Thanks, everyone! |
kjx98
pushed a commit
to kjx98/go-ethereum
that referenced
this pull request
Mar 17, 2020
7 tasks
enriquefynn
pushed a commit
to enriquefynn/go-ethereum
that referenced
this pull request
Mar 10, 2021
9 tasks
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.
I was doing some bench marking and analysis surrounding some of the recent EIPs. While tinkering with EIP-1884 I accidentally created a split on a private network between Parity, Besu and Geth, where Parity and Geth forked together with SLOAD_GAS of 200 rather than 800. After investigating, I discovered that EIP-2200 was "technically" incorrectly implemented.
EIP-1884 and EIP-2200 both adjust
SLOAD_GASfrom200to800- but the current implementation of EIP-2200 assumes that EIP-1884 is already implemented, and only adjustsSSTORE.This PR adds the EIP-1884
SLOAD_GASchanges to EIP-2200.There is a Sibling PR in Parity