Skip to content

Conversation

hallazzang
Copy link
Contributor

@hallazzang hallazzang commented Apr 24, 2025

Description

This PR removes x/feemarket module.

Closes: MILK-259


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

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

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

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

Summary by CodeRabbit

  • Refactor

    • Removed all references to the FeeMarket module from the application, including related logic, configuration, and decorators.
    • Simplified transaction fee handling by reverting to standard Cosmos SDK mechanisms.
    • Cleaned up module initialization and keeper setup to exclude FeeMarket components.
  • Chores

    • Updated upgrade logic to delete FeeMarket-related store keys during the next upgrade.

@hallazzang hallazzang self-assigned this Apr 24, 2025
Copy link

coderabbitai bot commented Apr 24, 2025

Walkthrough

This set of changes removes all code related to the FeeMarket module from the application. All references, imports, keepers, decorators, handlers, and logic associated with FeeMarket are deleted from the ante handler, application initialization, keepers, modules, and post-handler setup. The FeeMarket’s store key is now marked for deletion in the v11 upgrade constants. The codebase is refactored to rely solely on standard Cosmos SDK fee handling mechanisms, eliminating FeeMarket-specific fee checking, deduction, and post-processing logic.

Changes

File(s) Change Summary
ante/ante.go Removed all FeeMarket module references, decorators, imports, and logic from ante handler setup; updated HandlerOptions struct and NewAnteHandler function to exclude FeeMarket.
app/app.go Eliminated FeeMarketKeeper, related ante handler options, post handler setup, and minTxFeesChecker function from app initialization.
app/keepers/keepers.go Removed FeeMarketKeeper field from AppKeepers struct, FeeMarket keeper initialization, DefaultFeemarketDenomResolver type, and related methods.
app/keepers/keys.go Removed feemarkettypes import and FeeMarket store key from KV store keys generation.
app/keepers/modules.go Deleted feemarket module import and its inclusion in AppModuleBasics.
app/modules.go Removed all FeeMarket module references from imports, MaccPerms, appModules, and module execution order functions.
app/post.go Deleted file: removed PostHandlerOptions struct and NewPostHandler function for FeeMarket post-handler logic.
app/sim_test.go Removed ante import and disabling of FeeMarket decorator in TestAppStateDeterminism.
app/upgrades/v11/constants.go Added feemarkettypes import and included FeeMarket store key in the list of stores to delete during upgrade.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CosmosSDK
    participant App

    User->>App: Submit Transaction
    App->>CosmosSDK: AnteHandler (no FeeMarket logic)
    CosmosSDK->>App: Standard Fee Checking & Deduction
    App->>User: Transaction Result
Loading

Poem

Farewell to the FeeMarket, it’s time to say goodbye,
The ante is simpler, no extra fees to apply.
Keepers and handlers, now lean and clean,
The code hops forward, efficient and keen.
With a twitch of my nose and a wiggle of ear,
The MilkyWay app runs smoother this year!
🐇✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8bfde46 and a9be025.

📒 Files selected for processing (9)
  • ante/ante.go (2 hunks)
  • app/app.go (0 hunks)
  • app/keepers/keepers.go (2 hunks)
  • app/keepers/keys.go (0 hunks)
  • app/keepers/modules.go (0 hunks)
  • app/modules.go (0 hunks)
  • app/post.go (0 hunks)
  • app/sim_test.go (0 hunks)
  • app/upgrades/v11/constants.go (2 hunks)
💤 Files with no reviewable changes (6)
  • app/sim_test.go
  • app/keepers/keys.go
  • app/modules.go
  • app/keepers/modules.go
  • app/post.go
  • app/app.go
🔇 Additional comments (8)
app/upgrades/v11/constants.go (2)

9-9: Import added for feemarket store key deletion.

This import is necessary to reference the feemarket module's store key that will be deleted during the v11 upgrade.


29-31:

✅ Verification successful

Properly marking feemarket store for deletion during upgrade.

The feemarket store key is correctly added to the list of stores to be deleted during the v11 upgrade, which ensures proper cleanup of the module's state as part of the module removal.


🏁 Script executed:

#!/bin/bash
# Verify that there are no remaining references to the feemarket store key in new code
# that might attempt to access a store that will be deleted

rg -i "feemarket.(Store|Module)" --type go --glob "!app/upgrades/**"

Length of output: 70


I’ll perform a broader search for any remaining feemarket references outside the upgrade code:

This will help confirm that no code still depends on the feemarket store being present.


🏁 Script executed:

#!/bin/bash
# Search for any references to 'feemarket' outside the app/upgrades directory
rg -n "feemarket" --type go --glob '!app/upgrades/**'

Length of output: 53


v11 upgrade: Remove feemarket store

The feemarkettypes.StoreKey is now correctly included in the Deleted slice in app/upgrades/v11/constants.go, ensuring the fee-market module’s KV store is cleaned up during migration. A code-wide search confirms there are no remaining references to feemarket outside the upgrade logic.

app/keepers/keepers.go (2)

31-32: Import reorganization after feemarket removal.

These import lines have been reorganized after removing feemarket-related imports. The imports are now properly sorted and maintained.

Also applies to: 37-37, 45-45, 61-64


108-177: FeeMarketKeeper field removed from AppKeepers struct.

The AppKeepers struct no longer contains a FeeMarketKeeper field, which is consistent with the removal of the feemarket module.

ante/ante.go (4)

4-4: Standard bank keeper import replaces feemarket imports.

The feemarket imports have been replaced with the standard Cosmos SDK bank keeper import, which is appropriate since the ante handler will now use the standard fee handling mechanisms.


35-37: HandlerOptions struct simplified.

The HandlerOptions struct now uses the standard account and bank keepers instead of feemarket-specific options. This simplifies the ante handler interface and removes dependency on the feemarket module.


44-56: Simplified AnteHandler validation.

The AnteHandler validation logic remains robust with appropriate error checking for the required keepers. The removal of feemarket-specific validation maintains code quality while simplifying the implementation.


67-82:

✅ Verification successful

Removed feemarket decorators from ante handler chain.

The ante decorator chain has been simplified by removing the feemarket-specific decorators. Transaction fee validation and deduction will now use the standard Cosmos SDK mechanisms.


🏁 Script executed:

#!/bin/bash
# Check if there are any remaining references to feemarket decorators in the codebase
# This helps verify that all usage points have been cleaned up

rg "feemarket.(NewMinGasPriceDecorator|NewDeductFeeDecorator)" --type go

Length of output: 74


🏁 Script executed:

#!/bin/bash
# Search for any remaining references to 'feemarket' across the repository
rg "feemarket" -n .

Length of output: 437


Confirmed: Feemarket decorators fully removed

  • No occurrences of NewMinGasPriceDecorator or NewDeductFeeDecorator remain in the codebase.
  • The only remaining feemarket references are in app/upgrades/v11/constants.go (for upgrade constants) and in go.mod/go.sum, which are expected for the v11 upgrade.

All feemarket-specific ante decorators have been cleaned up—approving these changes.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedApr 24, 2025, 6:06 AM

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@hallazzang hallazzang marked this pull request as ready for review April 24, 2025 06:22
@RiccardoM RiccardoM merged commit 8075405 into main Apr 24, 2025
25 checks passed
@RiccardoM RiccardoM deleted the hallazzang/remove-feemarket branch April 24, 2025 14:32
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