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

Add max gas limit check in ante handler #532

Merged
merged 6 commits into from
Aug 28, 2024
Merged

Add max gas limit check in ante handler #532

merged 6 commits into from
Aug 28, 2024

Conversation

yzang2019
Copy link
Collaborator

@yzang2019 yzang2019 commented Aug 9, 2024

Describe your changes and provide context

Context for this change is from an immunefi bug report:

when process the proposal block, sei protocol will check the gas fee is valid or not, if totalGasWanted is bigger than ctx.ConsensusParams().Block.MaxGas will return false,

And then in the tendermint will reject the proposal in validblock, but the bad thing is the sei protcol try to process this block in a loop and will not produce the new block. so will lead to the

sei network not being able to confirm new transactions.

Testing performed to validate your change

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 54.83%. Comparing base (3395ce7) to head (aea9278).
Report is 1 commits behind head on main.

Files Patch % Lines
x/auth/ante/setup.go 0.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #532      +/-   ##
==========================================
- Coverage   54.84%   54.83%   -0.01%     
==========================================
  Files         631      631              
  Lines       54806    54807       +1     
==========================================
- Hits        30057    30055       -2     
- Misses      22598    22601       +3     
  Partials     2151     2151              
Files Coverage Δ
simapp/test_helpers.go 0.00% <ø> (ø)
x/auth/ante/setup.go 64.44% <0.00%> (-12.83%) ⬇️

... and 1 file with indirect coverage changes

@yzang2019 yzang2019 enabled auto-merge (squash) August 28, 2024 03:13
@yzang2019 yzang2019 merged commit f364e37 into main Aug 28, 2024
13 checks passed
@yzang2019 yzang2019 deleted the yzang/SEI-7926 branch August 28, 2024 03:17
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.

2 participants