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

"re-correct" EIP2200 (SLOAD gas does not shift to 800 via this EIP) #35

Closed
meowsbits opened this issue Feb 21, 2020 · 1 comment
Closed

Comments

@meowsbits
Copy link
Member

meowsbits commented Feb 21, 2020

EIP2200 was "fixed" with etclabscore/multi-geth-fork#144 (see documented refs there).

But, as it would appear now, EIP2200 does not actually specify SLOAD gas to 800; rather, it depends on EIP1884, which does makes that specification. Instead, EIP2200 (silently, not explicitly in its specification) requires EIP1884 as a precondition for algorithmic soundness.

This means that by the hard spec the "original" etclabscore/multi-geth(-fork) implementation was actually correct.

This will also invalidate EIP1086, which was originally documented as a PR here: etclabscore/multi-geth-fork#151, and merged to this codebase here 57eef09. With this "retrospective allowance" becoming nullified, those changes should at least be un-enabled if not un-implemented totally.

To capture the (technically undocumented, basically just on twitter) intention of EIP2200, the code should implement logic which requires EIP1884 as a condition of EIP2200 enablement. (This should be it's own issue and change set.)

Applying 2200 without 1884 was never intended and is in fact buggy (SLOAD/SSTORE gas costs are quite messed up in that situation)
ethereum/EIPs#2514 (comment)
2020-02-21-075845_921x245_screenshot

@meowsbits
Copy link
Member Author

Fixed with #36

meowsbits added a commit that referenced this issue Jul 27, 2020
Whether on not EIP2200 specifies SLOAD constant gas is a matter of interpretation and contention.
The document presumes the simultaneity of 1884, but does not do so explicitly.
However, EIP2200's engineering DOES NEED the SLOAD constant gas at 800, whether it specifies it or not.
Please see #35 as a starting point for reading through some of the history
here.

For all networks supported, and theoretically all networks properly using 2200,
change is a noop; since 2200 MUST be accompanied by 1884.

The reason for this change is to make the code the same as ethereum/go-ethereum,
eliminating recurring merge conflicts that raise eyebrows.

Signed-off-by: meows <b5c6@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant