-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Fix Infinite Feegrant Bug #16097
Fix Infinite Feegrant Bug #16097
Conversation
This test is designed to reproduce an infinite Feegrant bug that occurs when using AllowedMsgAllowance with an internal BasicAllowance. I suspect that this line (https://github.com/scrtlabs/cosmos-sdk/blob/61091b357e/x/feegrant/basic_fee.go#L31) does not update the internal BasicAllowance after using part of the grant. This may be related to this line (https://github.com/scrtlabs/cosmos-sdk/blob/61091b357e/x/feegrant/filtered_fee.go#L47) as well.
The internal allowance update in AllowedMsgAllowance was never propagated to the parent AllowedMsgAllowance.
What is the impact of such bug? Given that v0.45.x is EOL, only security fixes are included in this branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
nit: Changelog pls 🙏
I'll update the changelog when making the release notes, merging now, so we can prepare the release. |
Sorry, next time! 😬 |
(cherry picked from commit d3370f2) (cherry picked from commit 5b1bd64aaad9a679d5bc3d63f0770a4c64781cf5)
Description
EDIT: Fix the bug. The internal allowance update was never propagated to the parent
AllowedMsgAllowance
.This test is designed to reproduce an infinite Feegrant bug that occurs when using
AllowedMsgAllowance
with an internalBasicAllowance
.I suspect that this line does not update the internal
BasicAllowance
after using part of the grant. This may be related to this line as well.Thanks @DrPresident from Shade Protocol for initially reporting this issue.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change