-
Notifications
You must be signed in to change notification settings - Fork 907
imp(ante): Remove unnecessary fee ante handler and use Cosmos one instead #2741
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
Conversation
WalkthroughThe changes enhance the efficiency of fee handling in the Cosmos SDK by streamlining the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Signed-off-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- CHANGELOG.md (1 hunks)
- app/ante/cosmos.go (1 hunks)
- app/ante/cosmos/utils_test.go (2 hunks)
Additional comments not posted (4)
app/ante/cosmos.go (1)
31-31
: LGTM! But verify the function usage in the codebase.The code changes are approved.
However, ensure that all function calls to
ante.NewDeductFeeDecorator
match the new parameters.Verification successful
Verified: The function call to
ante.NewDeductFeeDecorator
inapp/ante/cosmos.go
matches the new parameters. No other instances of this function call were found in the codebase, confirming that the changes are correctly applied.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `ante.NewDeductFeeDecorator` match the new parameters. # Test: Search for the function usage. Expect: Only occurrences of the new parameters. rg --type go -A 5 $'ante.NewDeductFeeDecorator'Length of output: 641
app/ante/cosmos/utils_test.go (2)
Line range hint
1-1
:
Verify the sufficiency of the remaining test coverage.The removal of
intSlice
suggests a potential simplification in the test suite. Ensure that the test coverage remains sufficient.
Line range hint
1-1
:
Verify the sufficiency of the remaining test coverage.The removal of
setupDeductFeeDecoratorTestCase
suggests a shift in the testing strategy. Ensure that the test coverage remains sufficient.Verification successful
Verify the sufficiency of the remaining test coverage.
The removal of
setupDeductFeeDecoratorTestCase
suggests a shift in the testing strategy. However, the search results indicate that fee deduction is still being tested across various files. The test coverage for fee deduction remains sufficient.
- Examples of test files referencing fee deduction:
x/vesting/types/clawback_vesting_account_test.go
x/staking/keeper/integration_test.go
x/inflation/v1/keeper/inflation_test.go
x/feemarket/keeper/utils_test.go
app/post/burn_test.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the sufficiency of the remaining test coverage. # Test: Search for remaining test functions. Expect: Sufficient test coverage for fee deduction. rg --type go -A 5 $'func (suite *AnteTestSuite)'Length of output: 49
Script:
#!/bin/bash # Description: Verify the sufficiency of the remaining test coverage for fee deduction. # Test: Search for test functions that reference DeductFeeDecorator or related keywords. rg --type go -A 5 'DeductFeeDecorator' --glob '*_test.go'Length of output: 57
Script:
#!/bin/bash # Description: Verify the sufficiency of the remaining test coverage for fee deduction. # Test: Search for test functions that include keywords related to fee deduction or decorators. rg --type go -A 5 'fee|deduct|decorator' --glob '*_test.go'Length of output: 188804
CHANGELOG.md (1)
132-132
: Changelog entry is clear and concise.The entry provides the necessary context for the change.
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- CHANGELOG.md (1 hunks)
- app/ante/cosmos.go (1 hunks)
- app/ante/cosmos/utils_test.go (2 hunks)
Files skipped from review due to trivial changes (1)
- app/ante/cosmos/utils_test.go
Additional comments not posted (2)
app/ante/cosmos.go (1)
31-31
: Verify the correctness of parameter changes.The parameters for
ante.NewDeductFeeDecorator
have been reduced from five to four, removingDistributionKeeper
andStakingKeeper
. Ensure this change aligns with the intended functionality and does not introduce any regressions.CHANGELOG.md (1)
132-132
: Changelog entry approved.The changelog entry accurately reflects the changes made in the code and is appropriately placed under the "Unreleased" section.
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.
Actionable comments posted: 0
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! Great work @MalteHerrmann!!
This PR is a follow up to #2719. The implementation of the DeductFeeDecorator is identical to the one in the Cosmos SDK after removing the staking rewards withdrawal, so we don't need to keep these separate files anymore.
Summary by CodeRabbit
New Features
Bug Fixes
Chores