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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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.31%. Comparing base (da7280d) to head (5ebfc62).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1885      +/-   ##
==========================================
+ Coverage   61.25%   61.31%   +0.05%     
==========================================
  Files         263      263              
  Lines       23275    23276       +1     
==========================================
+ Hits        14257    14271      +14     
+ Misses       8011     8000      -11     
+ Partials     1007     1005       -2     
Files with missing lines Coverage Δ
x/evm/keeper/fee.go 87.50% <100.00%> (+1.78%) ⬆️
x/evm/keeper/msg_server.go 70.34% <ø> (-0.23%) ⬇️
x/evm/module.go 40.10% <ø> (-0.31%) ⬇️
x/evm/types/params.go 74.28% <100.00%> (+4.79%) ⬆️

... and 3 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
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.

1 participant