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

EIP2929 opcode repricing #2350

Conversation

iamdefinitelyahuman
Copy link
Contributor

What I did

  • Add EIP2929 opcode repricings
  • Set default evm version to berlin

How I did it

I took the new pricings from the EIP2929 spec. I didn't include any logic to account for hot-vs-cold access - in the same way that we always assume an SSTORE to cost 20,000 these values just give an upper-bound estimate.

I also bumped the default evm target to berlin. This has no effect aside from the gas estimates, as there are no new opcodes introduced.

All of this is required to make the test suite pass, because the latest release of eth-tester now uses berlin as the default ruleset.

How to verify it

Verify that the test suite is passing in the CI. I had to tweak a few tests, I tried to do so in a way such that we won't have to adjust them again for the next hardfork.

Cute Animal Picture

image

@codecov-io
Copy link

Codecov Report

Merging #2350 (830cb29) into master (1d2fdf1) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2350      +/-   ##
==========================================
- Coverage   85.88%   85.84%   -0.04%     
==========================================
  Files          90       90              
  Lines        8791     8791              
  Branches     2097     2097              
==========================================
- Hits         7550     7547       -3     
- Misses        753      755       +2     
- Partials      488      489       +1     
Impacted Files Coverage Δ
vyper/opcodes.py 100.00% <100.00%> (ø)
vyper/functions/functions.py 89.25% <0.00%> (-0.40%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d2fdf1...830cb29. Read the comment docs.

@iamdefinitelyahuman iamdefinitelyahuman merged commit 2eeb27f into vyperlang:master Apr 13, 2021
@iamdefinitelyahuman iamdefinitelyahuman deleted the feat-eip-2929-repricing branch April 13, 2021 15:31
skellet0r added a commit to skellet0r/curve-contract that referenced this pull request Apr 19, 2021
Additional improvements to mitigate memory corruption bug in vyper.
Additional optimizations.

vyperlang/vyper#2345
vyperlang/vyper#2350
vyperlang/vyper#2352
skellet0r added a commit to skellet0r/curve-contract that referenced this pull request Apr 29, 2021
Additional improvements to mitigate memory corruption bug in vyper.
Additional optimizations.

vyperlang/vyper#2345
vyperlang/vyper#2350
vyperlang/vyper#2352
oddcommit pushed a commit to oddcommit/curve-contract that referenced this pull request Dec 30, 2023
Additional improvements to mitigate memory corruption bug in vyper.
Additional optimizations.

vyperlang/vyper#2345
vyperlang/vyper#2350
vyperlang/vyper#2352
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