Skip to content

fix: cosmos evm review fixes#4086

Merged
skosito merged 2 commits intodevelopfrom
review-fixes
Aug 8, 2025
Merged

fix: cosmos evm review fixes#4086
skosito merged 2 commits intodevelopfrom
review-fixes

Conversation

@skosito
Copy link
Member

@skosito skosito commented Aug 7, 2025

Description

review comments from here #3991

How Has This Been Tested?

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Summary by CodeRabbit

  • Bug Fixes

    • Improved input validation for fee history queries by enforcing limits on block count and percentile array size.
  • Chores

    • Updated module dependencies to newer versions.
    • Adjusted internal configuration for module permissions and blocked accounts.
    • Modified module execution order for end block processing.
  • Refactor

    • Removed legacy transaction fee validation logic, streamlining transaction processing.

@skosito skosito requested a review from a team as a code owner August 7, 2025 16:59
@skosito skosito added the no-changelog Skip changelog CI check label Aug 7, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 7, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

The changes remove the entire app/ante/fees.go file, eliminating fee validation decorators for both Cosmos SDK and Ethereum transactions. Updates are made to module account permissions and end blocker ordering. Dependency versions for the EVM module are incremented. The FeeHistory RPC method now includes stricter input validation for block count and reward percentiles.

Changes

Cohort / File(s) Change Summary
Fee Decorators Removal
app/ante/fees.go
Deleted the file, removing all fee validation AnteDecorators and their constructors.
Module Account Permissions
app/app.go
Added feemarkettypes.ModuleName to maccPerms and updated blockedReceivingModAcc to block EVM and fee market modules from receiving tokens.
End Blocker Ordering
app/modules.go
Changed the order of evmtypes.ModuleName in the returned slice of orderEndBlockers().
Dependency Updates
go.mod, contrib/rpcimportable/go.mod
Upgraded the github.com/zeta-chain/evm module replacement version.
FeeHistory Validation
rpc/backend/chain_info.go
Added input validation to FeeHistory to restrict userBlockCount and rewardPercentiles to a maximum of 100 each.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Backend

    Client->>Backend: FeeHistory(userBlockCount, rewardPercentiles)
    Backend->>Backend: Check userBlockCount > 100?
    alt Exceeds limit
        Backend-->>Client: Return error
    else
        Backend->>Backend: Check len(rewardPercentiles) > 100?
        alt Exceeds limit
            Backend-->>Client: Return error
        else
            Backend->>Backend: Validate percentiles and process request
            Backend-->>Client: Return FeeHistory result
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–20 minutes

  • Removal of fee decorators is significant and requires careful review for downstream effects.
  • Updates to module permissions and end blocker order are straightforward but critical for system correctness.
  • Dependency bumps and input validation are simple but must be verified for compatibility and correctness.
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch review-fixes

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.
    • Explain this complex logic.
    • 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 explain this code block.
  • 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 explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate unit tests to generate unit tests for 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.

@skosito skosito added this pull request to the merge queue Aug 8, 2025
Merged via the queue into develop with commit 8551aaf Aug 8, 2025
49 checks passed
@skosito skosito deleted the review-fixes branch August 8, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Skip changelog CI check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants