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

EIP-1559: Be resilient to target gas used 0 and cap gas used to gas limit #1885

Merged
merged 13 commits into from
Oct 23, 2024

Conversation

jewei1997
Copy link
Contributor

@jewei1997 jewei1997 commented Oct 2, 2024

Describe your changes and provide context

2 minor fixes:

  • be resilient to target gas used = 0. Right now, if target gas used is 0, it would crash.
  • cap block gas used to block gas limit in case for whatever reason block gas used is larger than block gas limit

Testing performed to validate your change

unit tests

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.55%. Comparing base (a45b5ca) to head (773c69d).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1885      +/-   ##
==========================================
+ Coverage   61.47%   61.55%   +0.08%     
==========================================
  Files         263      263              
  Lines       23312    23306       -6     
==========================================
+ Hits        14332    14347      +15     
+ Misses       7970     7951      -19     
+ Partials     1010     1008       -2     
Files with missing lines Coverage Δ
x/evm/keeper/fee.go 87.50% <100.00%> (+1.78%) ⬆️
x/evm/types/params.go 74.28% <100.00%> (+4.79%) ⬆️

... and 2 files with indirect coverage changes

@jewei1997 jewei1997 changed the title eip-1559 fixes EIP-1559: Be resilient to target gas used 0 and cap gas used to gas limit Oct 2, 2024
@jewei1997 jewei1997 merged commit 81c0d5f into main Oct 23, 2024
49 checks passed
@jewei1997 jewei1997 deleted the eip-1559-fixes branch October 23, 2024 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants